Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portfolio model with income deduction scheme. #832

Merged
merged 230 commits into from
Jun 17, 2021
Merged
Show file tree
Hide file tree
Changes from 219 commits
Commits
Show all changes
230 commits
Select commit Hold shift + click to select a range
3d0ab42
Create files (just copies of riskyPortfolio for now)
Mv77 Jul 30, 2020
0f5e7d2
Update solution class
Mv77 Jul 30, 2020
d58bfa4
Create base parameters
Mv77 Jul 30, 2020
e72bbc3
Class definition and terminal solution
Mv77 Jul 31, 2020
da580e6
Partial progress
Mv77 Aug 6, 2020
3a87e77
Merge branch 'master' into RiskyContrib
Mv77 Aug 6, 2020
bf9d223
Merge branch 'master' into RiskyContrib
Mv77 Aug 13, 2020
f905024
Change filename
Mv77 Aug 13, 2020
7b7180e
Create parent class for risky-asset types
Mv77 Aug 13, 2020
93f0e64
Setup agent and solution classes
Mv77 Aug 13, 2020
19e77ff
Terminal solution
Mv77 Aug 13, 2020
43986c4
Typo
Mv77 Aug 13, 2020
42ab217
Make grids coarser while coding up the model
Mv77 Aug 14, 2020
64da543
Add tax parameter
Mv77 Aug 14, 2020
0e5e55a
Solve problem up to optimal rebalancing of assets
Mv77 Aug 14, 2020
29efa9e
Solve up to consumption candidates for adj agent
Mv77 Aug 15, 2020
e29092a
Merge branch 'master' into RiskyContrib
Mv77 Aug 19, 2020
1e8be31
Add common m grid for upper envelopes
Mv77 Aug 19, 2020
7030753
Finalize 1st pass at adjusting agent solution
Mv77 Aug 19, 2020
248dc2d
Start solving the restricted agent
Mv77 Aug 20, 2020
df3d963
Interpolate dvdn's without inversion. It can be 0.
Mv77 Aug 20, 2020
856df40
Finalize first pass at solution
Mv77 Aug 20, 2020
7671ecc
matrix to ndarray. Interp does not like matrices
Mv77 Aug 20, 2020
84b334f
Set up an example
Mv77 Aug 20, 2020
1108aa3
Start plotting policy rules
Mv77 Aug 21, 2020
1850154
Make tau and adjustPrb time-varying
Mv77 Aug 21, 2020
87fc5c1
Improve example and visualization
Mv77 Aug 22, 2020
9a3b0e5
Terminal functions with HARK interpolators
Mv77 Aug 22, 2020
8e925b6
Add a check for non-increasing V
Mv77 Aug 22, 2020
a93dd62
Remove envelopes
Mv77 Aug 23, 2020
f473deb
Explicitly check if withdrawing all is optimal
Mv77 Aug 23, 2020
90a336f
Improve D optimization
Mv77 Aug 23, 2020
df4739a
Correct derivatives of v2adj
Mv77 Aug 23, 2020
04208b6
Merge branch 'RiskyContrib' into NoEnvelope
Mv77 Aug 23, 2020
47b876f
Remove envelope for FXD agent
Mv77 Aug 23, 2020
9285056
Lower extrap dvdn
Mv77 Aug 23, 2020
95d4ddb
Improve dvdn
Mv77 Aug 24, 2020
84105a9
Fix sharegrid bug
Mv77 Aug 24, 2020
6b2af58
Merge branch 'RiskyContrib' into NoEnvelope
Mv77 Aug 24, 2020
1461361
Improve plotting capabilities
Mv77 Aug 24, 2020
61efb8d
Merge branch 'RiskyContrib' into NoEnvelope
Mv77 Aug 24, 2020
788fa75
Add 4-d plotting capability
Mv77 Aug 26, 2020
b581725
Merge branch 'master' into RiskyContrib
Mv77 Aug 26, 2020
565ffc9
Replace solution init
Mv77 Aug 26, 2020
ed529fe
Fix small bugs
Mv77 Aug 26, 2020
a8d00fd
Finish init
Mv77 Aug 26, 2020
eaef2b2
Terminal solution
Mv77 Aug 26, 2020
8031dfa
Start solving. Unpack
Mv77 Aug 26, 2020
130d5cc
Have an exogenous mGrid
Mv77 Aug 27, 2020
8bd3746
Typo
Mv77 Aug 27, 2020
b8326ed
Compute end-of-period objects
Mv77 Aug 27, 2020
5b8a626
Complete consumption stage
Mv77 Aug 27, 2020
357baac
Flip order of adjusting and contrib stages
Mv77 Aug 27, 2020
d18d10d
Fix dimensions of vAdj_term
Mv77 Aug 27, 2020
29047d6
Solve the contribution stage
Mv77 Aug 27, 2020
a7008da
Check for discrete shares
Mv77 Aug 27, 2020
56e9252
Change rebalancing functions to new model version
Mv77 Aug 27, 2020
48adfc8
Make optimizer return vNvrs
Mv77 Aug 27, 2020
e1b0a42
Fix some notation
Mv77 Aug 27, 2020
a631751
Interpolate dvds
Mv77 Aug 27, 2020
8d32b9e
Complete first pass
Mv77 Aug 27, 2020
1b2a97b
Update example
Mv77 Aug 27, 2020
8162a53
Fix labels
Mv77 Aug 27, 2020
7803d0c
Set up a toy example
Mv77 Aug 27, 2020
63d10af
Add share interp TODO
Mv77 Aug 28, 2020
9f8b4c4
First implementation of unemployment
Mv77 Aug 29, 2020
63c34de
Change init params and example
Mv77 Aug 29, 2020
9cdce2b
Merge branch 'CrontribMod/unemp' into NewContrib
Mv77 Aug 29, 2020
1566a66
Merge branch 'master' into NewContrib
Mv77 Aug 29, 2020
a039106
Add note on d optimization
Mv77 Sep 2, 2020
69124b9
Change example a little
Mv77 Sep 2, 2020
9dd4c12
Add a D grid
Mv77 Sep 3, 2020
e6fc2ae
Frist attempt at optimizing with FOC.
Mv77 Sep 3, 2020
fe8dc92
Complete first attempt at using d's FOC
Mv77 Sep 3, 2020
214b24b
Merge branch 'master' into NewContrib
Mv77 Sep 13, 2020
4a889a4
Work with time-varying SolveOnePeriod
Mv77 Sep 13, 2020
a4185ac
Add classes for stage solutions
Mv77 Sep 13, 2020
72b8b0c
Keep track of Adj and Fxd version. Rename stages.
Mv77 Sep 13, 2020
21d2c87
Firs pass at Con-stage solver.
Mv77 Sep 13, 2020
1387ae9
Partial progress
Mv77 Sep 14, 2020
f22d3e5
Merge branch 'timeVarySolver' into NewContrib
Mv77 Sep 14, 2020
277ea15
Revert "Merge branch 'timeVarySolver' into NewContrib"
Mv77 Sep 14, 2020
8cd5d9c
Merge branch 'timeVarySolver' into ContribMod/Stages
Mv77 Sep 14, 2020
e50e055
Fix cons stage solver
Mv77 Sep 14, 2020
bdbf2c2
First pass at contribution stage solver
Mv77 Sep 14, 2020
6e1bd33
finish stage-by-stage solver
Mv77 Sep 14, 2020
df9efb8
Adapt example to stages setup
Mv77 Sep 21, 2020
e374a4c
Add simulation to example (fails for now)
Mv77 Sep 21, 2020
80082aa
Start simulation method
Mv77 Sep 23, 2020
fd8cf78
Make rebalancing work with np arrays
Mv77 Sep 23, 2020
a9a1c6d
Merge branch 'NewContrib' into ContribMod/Stages
Mv77 Sep 23, 2020
d6e9d1d
fix merge and start postStatesreb
Mv77 Sep 23, 2020
efa03f0
Finish rebalancing stage
Mv77 Sep 23, 2020
9eb2505
First working sim method
Mv77 Sep 23, 2020
3583837
Slightly better calibration
Mv77 Sep 23, 2020
06fe1e1
Make irrelevant variables nan
Mv77 Sep 23, 2020
38f74e3
Extract data from simulation example
Mv77 Sep 23, 2020
df21d12
Merge branch 'master' into NewContrib
Mv77 Sep 23, 2020
70a5afb
Merge branch 'master' into NewContrib
Mv77 Oct 3, 2020
a0c41d8
Start rolling back stages*period setup
Mv77 Oct 3, 2020
ba233c8
Rm unused params from solvers
Mv77 Oct 3, 2020
97f208e
Merge branch 'NewContrib' into ContribMod/StagesInPeriod
Mv77 Oct 3, 2020
cc91f4e
Make solve method single-period
Mv77 Oct 4, 2020
8557c75
First pass at simulation
Mv77 Oct 4, 2020
3fb10d3
Explicitly bound consumption in simulation
Mv77 Oct 4, 2020
c73f51f
Create LC example with CGM calib
Mv77 Oct 6, 2020
dfccf0a
Handle AjustPrb=1 directly
Mv77 Oct 6, 2020
e416233
Merge branch 'NewContrib' into ContribMod/StagesInPeriod
Mv77 Oct 6, 2020
7989726
Pass AdjustPrb to share solver
Mv77 Oct 6, 2020
2fe3d9e
Merge branch 'ContribMod/StagesInPeriod' into ContribMod/LCExample
Mv77 Oct 6, 2020
8590675
Optimize d in inverse space
Mv77 Oct 7, 2020
da38138
Merge branch 'NewContrib' into ContribMod/StagesInPeriod
Mv77 Oct 7, 2020
bcd243f
Merge branch 'ContribMod/StagesInPeriod' into ContribMod/LCExample
Mv77 Oct 7, 2020
a955da8
Plot dec rules separately
Mv77 Oct 9, 2020
5ff9eea
Plot dec rules separately
Mv77 Oct 9, 2020
fc937e9
Add Chris' comments
Mv77 Oct 9, 2020
c7fa00f
Group parameters
Mv77 Oct 9, 2020
cf4b42c
Make period solution a dictionary
Mv77 Oct 9, 2020
213d446
Make solve and sim methods iterate through stages
Mv77 Oct 9, 2020
255b49b
Merge branch 'ContribMod/StagesInPeriod' into ContribMod/LCExample
Mv77 Oct 9, 2020
eea28f6
Adjust to new solution setup
Mv77 Oct 9, 2020
0d38fcb
(Cons, Con) -> Cns
Mv77 Oct 18, 2020
6001542
Improve EndOfPrddvds calculation
Mv77 Oct 18, 2020
1c88cef
Merge branch 'NewContrib' into ContribMod/LCExample
Mv77 Oct 18, 2020
f7ddb9c
Con -> Cns
Mv77 Oct 18, 2020
ede9cde
Merge branch 'master' into NewContrib
Mv77 Oct 18, 2020
7dc1090
Merge branch 'NewContrib' into ContribMod/LCExample
Mv77 Oct 18, 2020
67bf8d2
First version of continuous share optimizer
Mv77 Oct 19, 2020
a5443d4
Merge branch 'NewContrib' into ContribMod/LCExample
Mv77 Oct 19, 2020
b73080e
Use continuous share
Mv77 Oct 20, 2020
14cbb88
Ommit value function evaluation if needed
Mv77 Oct 20, 2020
f8796bf
Merge branch 'ContribMod/ContinuousShare' into ContribMod/LCExample
Mv77 Oct 20, 2020
2b59e5c
Dont compute v
Mv77 Oct 20, 2020
3f8dc12
Construct portfolio share
Mv77 Oct 22, 2020
ab15218
Merge branch 'master' into NewContrib
Mv77 Oct 25, 2020
976b462
Start incorporating changes from recent hark pr
Mv77 Oct 26, 2020
068d4b4
Larger grids
Mv77 Oct 26, 2020
dc40e24
Set nNrmTildeNow = 0 at birth
Mv77 Oct 26, 2020
6b19af8
Merge branch 'NewContrib' into ContribMod/StateHandling
Mv77 Oct 26, 2020
3434cf2
First seemingly working version
Mv77 Oct 27, 2020
7455ca0
Merge branch 'NewContrib' into ContribMod/LCExample
Mv77 Oct 27, 2020
8c17c41
Cast bilinear-on-1d interpolators to reg interps
Mv77 Oct 27, 2020
aac1723
Merge branch 'ContribMod/Speedup' into ContribMod/LCExample
Mv77 Oct 27, 2020
4f64249
Do irreg grid interp only once
Mv77 Oct 27, 2020
616affb
Merge branch 'ContribMod/Speedup' into ContribMod/LCExample
Mv77 Oct 27, 2020
9dc45e5
Clarify unused paremeters in solvers
Mv77 Oct 28, 2020
f25e3fb
Rm unnecessary value function calculations
Mv77 Oct 28, 2020
af45c3a
Merge branch 'ContribMod/Speedup' into ContribMod/LCExample
Mv77 Oct 28, 2020
3cc0393
Merge branch 'ContribMod/Speedup' into NewContrib
Mv77 Oct 30, 2020
571227c
Merge branch 'master' into ContribMod/HARKupdate
Mv77 Oct 30, 2020
83b491a
Update control handling
Mv77 Oct 30, 2020
de10925
Merge branch 'NewContrib' into ContribMod/LCExample
Mv77 Oct 30, 2020
5ed294c
Find d through the FOC without loops
Mv77 Oct 31, 2020
addfb2e
Docstrings for solution classes
Mv77 Oct 31, 2020
15e8691
Merge branch 'master' into NewContrib
Mv77 Nov 8, 2020
fd219fa
Merge branch 'NewContrib' into ContribMod/Speedup
Mv77 Nov 8, 2020
e23d2c3
Make things work up to distance metric
Mv77 Nov 9, 2020
2962bd6
Working infinite horizon solution
Mv77 Nov 12, 2020
4052539
Organize infinite horizon example
Mv77 Nov 13, 2020
cd493d9
Remove TODOs
Mv77 Nov 13, 2020
34f1767
Merge branch 'master' into NewContrib
Mv77 Nov 13, 2020
91bed30
Merge branch 'ContribMod/InfHorizon' into NewContrib
Mv77 Nov 13, 2020
76ac833
Organize parameters
Mv77 Nov 13, 2020
e8aa439
Add discrete interpolator
Mv77 Nov 15, 2020
062b756
Fix upper end of grid index
Mv77 Nov 15, 2020
6ecc4d6
Rm TODO
Mv77 Nov 15, 2020
334a6b7
Improve infinite horizon distance criterion
Mv77 Nov 16, 2020
d12525e
Make infinite horizon example discrete and sticky
Mv77 Nov 19, 2020
d9aa584
Change the application of the withdrawal tax
Mv77 Nov 22, 2020
ee57fbc
Merge branch 'master' into NewContrib
Mv77 Jan 20, 2021
05d3125
Use new n-dimensional (Marg)ValueFuncCrra
Mv77 Jan 20, 2021
7ebcac4
Merge branch 'master' into NewContrib
Mv77 Jan 26, 2021
e035282
Apply MetricObject and IncShkDstn changes
Mv77 Jan 26, 2021
3cc525b
Use distance metric for dictionaries
Mv77 Jan 26, 2021
3155a8a
Add continuous finite test
Mv77 Jan 26, 2021
3e528ff
Fix discrete interp single-input bug
Mv77 Jan 26, 2021
a5c46e7
Add finite discrete test
Mv77 Jan 26, 2021
d6c6d73
Change example params
Mv77 Jan 26, 2021
c6421c2
Lint
Mv77 Jan 26, 2021
c1d8cb3
Use calcExpectation in consumption stage
Mv77 Jan 26, 2021
34cceb8
Use meshgrid instead of tile
Mv77 Jan 27, 2021
36ced07
Merge branch 'master' into ContribMod/Main
Mv77 Jan 27, 2021
d14900c
Create speedtest file
Mv77 Jan 29, 2021
7af2282
Use Numba interpolators
Mv77 Jan 30, 2021
bce8a32
Unify derivative function
Mv77 Jan 31, 2021
74725e2
Switch insert for concatenate
Mv77 Jan 31, 2021
14fbe41
Distance metric (incomplete)
Mv77 Jan 31, 2021
9e01a7a
Flag todo
Mv77 Jan 31, 2021
dd42c4f
Merge branch 'master' into ContribMod/Speed
Mv77 Feb 9, 2021
da30306
Merge branch 'master' into ContribMod/Main
Mv77 Feb 9, 2021
8ec651b
Remove "Now" and use state_now and state_prev
Mv77 Feb 9, 2021
23c12e1
Merge branch 'ContribMod/Main' into ContribMod/Speed
Mv77 Feb 9, 2021
6164b3e
Incorporate value function into calcExpectations
Mv77 Feb 9, 2021
f305d87
Adjust "Share" behavior to new handling of states
Mv77 Feb 17, 2021
a2510c4
Rm duplicated methods
Mv77 Feb 21, 2021
cad02b1
Use updated "updateRiskyDstn"
Mv77 Feb 21, 2021
ac730b3
Fix PlvlAgg and Adjust
Mv77 Feb 22, 2021
059e868
Merge branch 'master' into ContribMod/Main
Mv77 Mar 4, 2021
6e84edb
Minimal changes to make it work with 0.11
Mv77 Mar 4, 2021
75bbc02
Concentrate expectations in single function
Mv77 Apr 29, 2021
fada180
Nomenclature
Mv77 Apr 29, 2021
a19dbe5
Merge branch 'master' into ContribMod/Main
Mv77 Apr 29, 2021
762f028
Re-organize and comment class definitions
Mv77 Apr 30, 2021
0a5ea74
Lint
Mv77 Apr 30, 2021
62e16ba
Comment classes and aux functions
Mv77 May 1, 2021
e17fb3f
Finish reformatting
Mv77 May 1, 2021
3c4c2c7
Re-do initial parameters
Mv77 May 1, 2021
079874c
Adjust tests con conform to new parameters
Mv77 May 7, 2021
797947f
Change filename
Mv77 Jun 1, 2021
7a5db15
Merge branch 'ContribMod/RiskyAssetClass' into ContribMod/Sep-files
Mv77 Jun 1, 2021
597d1aa
Fix imports and tests
Mv77 Jun 1, 2021
16e37bd
CammelNotation to underscore_notation
Mv77 Jun 1, 2021
c762e47
d/D -> dfrac
Mv77 Jun 1, 2021
6cb3db8
Fxd -> _Fxd
Mv77 Jun 1, 2021
3bece70
lint
Mv77 Jun 1, 2021
6b80824
Merge branch 'master' into ContribMod/Sep-files
Mv77 Jun 9, 2021
046af05
fix examples
Mv77 Jun 11, 2021
973c94b
Lint
Mv77 Jun 11, 2021
f7b173e
Update CHANGELOG.md
Mv77 Jun 14, 2021
2d9ab76
Change variable names in example
Mv77 Jun 16, 2021
6e6f961
Remove redundant stage tags
Mv77 Jun 16, 2021
824d4f8
Add docstrings to solution functions
Mv77 Jun 16, 2021
cd2b313
Fix a couple typos
Mv77 Jun 16, 2021
efa3cd7
Explain new state variables
Mv77 Jun 16, 2021
3f63d3b
Use snake_case for new interpolator
Mv77 Jun 16, 2021
453140a
Use snake_case in example
Mv77 Jun 16, 2021
f791518
set_* -> get_*
Mv77 Jun 16, 2021
8f8acf0
Clear unused conditional
Mv77 Jun 17, 2021
13c35cf
Update ConsRiskyAssetModel
Mv77 Jun 17, 2021
602f8ab
Fix NullFunc import
Mv77 Jun 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Documentation/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Release Data: TBD

#### Major Changes

* Adds new consumption-savings-portfolio model `RiskyContrib`, which represents an agent who can save in risky and risk-free assets but faces
frictions to moving funds between them. To circumvent these frictions, he has access to an income-deduction scheme to accumulate risky assets.
PR: [#832](https://github.com/econ-ark/HARK/pull/832). See [this forthcoming REMARK](https://github.com/Mv77/RiskyContrib) for the model's details.

#### Minor Changes

* Fix bug in DCEGM's primary kink finder due to numpy no longer accepting NaN in integer arrays [#990](https://github.com/econ-ark/HARK/pull/990).
Expand Down
Loading