GithubHelp home page GithubHelp logo

randall-romero / compecon Goto Github PK

View Code? Open in Web Editor NEW
63.0 8.0 23.0 60.96 MB

A Python version of Miranda and Fackler's CompEcon toolbox

License: MIT License

Python 2.82% Jupyter Notebook 97.18% TeX 0.01%

compecon's Introduction

CompEcon

A Python version of Miranda and Fackler's CompEcon toolbox

The aim of this toolbox is to provide a Python toolbox to replicate the funcionality of Miranda and Fackler's CompEcon toolbox, which was written to accompany their Computational Economics and Finance and is coded in Matlab.

The source for this project is available in Github.

A major difference in this implementation is that much of the code is object-oriented, providing classes to represent:

  • Interpolation bases: Chebyshev, Spline, and Linear
  • Dynamic programming models: with discrete and/or continuous state and action variables
  • Nonlinear problems
  • Optimization problems

Some other differences are:

  • The solution of dynamic models is returned as a pandas dataframe, as opposed to a collection of vectors and matrices.
  • Some additional functionality is included, most notably for Smolyak interpolation.
  • Basis objects are callable, so they can be used to interpolation function by "calling" the basis.

The toolbox also replicates some of the demos and examples from Miranda and Fackler's textbook. The examples can be found in the .\textbook directory, while the demos are in the directories .\demos (for .py files) and .\notebooks (for Jupyter notebooks).

At this time the documentation is incomplete, so the best way to get going with this toolbox is by exploring the notebooks.

compecon's People

Contributors

randall-romero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

compecon's Issues

Issue on page /notebooks/slv/05 Cournot equilibrium model.html

Hola Randall, hoy instale Compecon y estaba probando el código con el ejercicio que dejo en la clase de Cournot con el método de Broyden. Como el error que me genera habla del jacobiano, pensé que podría ser la nueva actualización.
Error:

Capture

Cualquier cosa mi código es este (si es un error mío disculpas):

https://github.com/Asdael/Computational-Economics-Course/blob/main/First%20assignment/Cournot%20model%20in%20explicit%20form.ipynb

Muchas gracias por su tiempo y saludos,
Alexander Robles.

Errors installing/importing in python3.6

Hi Randall,

Thanks for putting this project together. I'm using python3.6 and attempting a plain install python setup.py install and getting the following error:

File "build/bdist.macosx-10.5-x86_64/egg/compecon/quadrature.py", line 9
    def __init__(self, dist, *args):
                                   ^
SyntaxError: unexpected EOF while parsing

Weird as it is, it doesn't break the install. When I try to from compecon import Basis I get this error:

In [2]: from compecon import Basis
  File "/Users/btengels/Dropbox/Econ/VCS_Tengelsen/Book code/CompEcon-python-master/compecon/demos/setup.py", line 106
    fname = name + f'--{n+1:02d}.pdf'
                                    ^
SyntaxError: invalid syntax

Is this familiar at all?

Error in Asset Replacement Model model.solve()

Dear Randall,

I'm getting an error when trying to run the Asset Replacement Model notebook in the Discrete Time Continuous State Dynamic Programming section, specifically in the model.solve() code.

image

please your support
thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.