PSLmodels / OG-USA

Overlapping-generations macroeconomic model for evaluating fiscal policy in the United States
https://pslmodels.github.io/OG-USA/
Creative Commons Zero v1.0 Universal
19 stars 34 forks source link

Add code for handling the SCF + work with OG-Core 0.9.0 #66

Closed jdebacker closed 2 years ago

jdebacker commented 2 years ago

This PR adds wealth.py, which has functions to download the SCF and then to compute moments of the wealth distribution with the SCF micro data. This was moved directly over from ogcore.

jdebacker commented 2 years ago

I believe the URL for the SCF files has changed. Will update that before this PR is ready for review.

codecov-commenter commented 2 years ago

Codecov Report

Merging #66 (a348628) into master (8e57b99) will increase coverage by 0.11%. The diff coverage is 80.48%.

:exclamation: Current head a348628 differs from pull request most recent head bd619bb. Consider uploading reports for the commit bd619bb to get more accurate results

@@            Coverage Diff             @@
##           master      #66      +/-   ##
==========================================
+ Coverage   78.35%   78.46%   +0.11%     
==========================================
  Files          19       21       +2     
  Lines        1303     1384      +81     
==========================================
+ Hits         1021     1086      +65     
- Misses        282      298      +16     
Flag Coverage Δ
unittests 78.46% <80.48%> (+0.11%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
ogusa/wealth.py 77.14% <77.14%> (ø)
ogusa/estimate_beta_j.py 18.66% <100.00%> (ø)
ogusa/tests/test_wealth.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8e57b99...bd619bb. Read the comment docs.

jdebacker commented 2 years ago

@rickecon All local tests pass for me. This PR is ready for your review. BTW, it has necessary changes to work with OG-Core 0.9.0 (fixing dimensions of firm parameters in the default parameters file).

rickecon commented 2 years ago

@jdebacker. This is great. Thanks for the effort. Merging.