pslmodels / cge Goto Github PK
View Code? Open in Web Editor NEWAn Open Source Computational General Equilibrium Model
Home Page: https://pslmodels.github.io/CGE/
License: Creative Commons Zero v1.0 Universal
An Open Source Computational General Equilibrium Model
Home Page: https://pslmodels.github.io/CGE/
License: Creative Commons Zero v1.0 Universal
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.
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.
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?
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.
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?
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.
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.).
Once some unit tests are created, we should setup Travis CI for this project for continuous integration testing of PRs.
CGE should:
default_parameters.json
file that stores all the default parameter values (which are currently hardcoded into calibrate.py
).ParamTools
to deal with the above (and make compatible with COMP).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.
To ensure replicability, a virtual environment should be specified and an environment.yml
file should be included in this repo for creating that environment.
Add a .gitignore
file to the repo to keep it clean.
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.
We need to setup a unit testing framework. Included in this:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.