Git Product home page Git Product logo

cge's People

Contributors

dprihardini avatar duncanhobbs avatar jdebacker avatar matthjensen avatar rkasher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cge's Issues

Unit testing

We need to setup a unit testing framework. Included in this:

  • All functions should be tested to ensure that they produce the expected outputs.
  • There should be tests of price neutrality
  • There should be tests of real neutrality
  • There should be some tests to ensure that the SAM file conforms (e.g., have appropriate columns headers that line up with the industries specified)

Checking model solution

The CGE module solves with the baseline parameterization and SAM file. @DPrihardini is going to solve this model in GAMS with the same inputs to confirm that the solution found here corresponds to that found in other software.

CGE text online

The Hosoe, Gawana, and Hashimoto CGE text is available here. This is a good reference and their Simple CGE chapter is the basis for our simple model.

Join the Policy Simulation Library?

Hi all -- this GitHub organization (Open-Source-Economics) is becoming a home for the Policy Simulation Library, and will be renamed PSLmodels on December 3rd. Starting then, we'd like for every project in PSLmodels to either be in PSL or be in the process of joining PSL.

CGE is very welcome in PSL! If you are interested in joining, could you please let me know by Dec 3? If the project is not interested in joining, I'll help you move this repo to a different organization or remove it.

Please let me know how you'd like to proceed -- I'll be keeping an eye on this issue, and I'm also happy to schedule a call anytime.

Conform with PSL and COMP parameters

CGE should:

  • Have a default_parameters.json file that stores all the default parameter values (which are currently hardcoded into calibrate.py).
  • Have a parameters class that does parameter validation and updating, consistent with PSL criteria.
  • Use ParamTools to deal with the above (and make compatible with COMP).

Duplicate fuctions in aggregates.py

In aggregates.py there are two functions for total investment eqXg and eqXXv. Both are defined as g * KK (long-run growth rate multiplied by the total capital stock.

In CGE_equations.py, eqXg is defined as "government expenditures on commodity j"

Do you want to keep eqXXv as the investment function in aggregates.py and add a function eqXg for "government expenditures on commodity j" to government.py?

@jdebacker

Create separate function to compute disposable income

The function for consumer demand for commodity i, CGE_equations.eqXp(), is given as:

Xp = alpha * ((pf * Ff).sum() - Sp - Td - Fsh + Trf) / pq

The term in brackets, ((pf * Ff).sum() - Sp - Td - Fsh + Trf) is equal to I.

It might be easier to think about how this function matches up to the theory if I were computed in a separate function and passed to the eqXp() equation.

Consistent notation and terminology across files

I think files should use consistent notation and terminology across files to denote goods, firms and factors.

In aggregates.py, j refers to both industries and goods in different equations. But i is also used to denote both goods and commodities.

In firms.py, h denotes factors of production j denotes goods and i denotes both commodities and intermediate inputs.

The Hashimoto book uses i to index goods, j to index firms and h to index factors.

Is this the format we want to follow? I think it seems reasonable.

What notation do we want for industries? Currently we use j to refer to both firms and industries?

I can work on cleaning and standardizing the notation if that would be helpful.

@jdebacker

Travis CI

Once some unit tests are created, we should setup Travis CI for this project for continuous integration testing of PRs.

Specify an environment

To ensure replicability, a virtual environment should be specified and an environment.yml file should be included in this repo for creating that environment.

Separate modules for equations

Having CGE_equations.py contain all the model equations makes it difficult to read and find equations one is looking for. This issue is to suggest that we separate the equations into different modules in groupings that make sense (e.g., all equations related to the household problem in one module, those related to the firms' problems in another, etc.).

Rename CGE equations

The equations specified in CGE_equations.py have names that make it hard to infer what the equation represents. This issue is to suggest that these names be updated to be more descriptive.

Should `deltad` be a required argument for eqM?

In simpleCGE.py line 69, the eq.M() function takes 8 arguments (p.gamma, p.deltam, p.deltad, p.eta, Qbar, pq, pm, p.taum).

In the function definition in firms.py, it looks like eqM() does not use deltad when calculating M.

On page 104 of the Hashimoto text, it looks as though the M equation only includes deltam and not deltad

Should deltad be a required argument for eqM?

@jdebacker

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.