Economic modelling in python