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

adding test for default solution to PerfForesightConsumerType #506

Merged
merged 31 commits into from
Feb 26, 2020
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c8dffd8
adding test for default solution to PerfForesightConsumerType. See #504
sbenthall Feb 9, 2020
3290286
Merge branch 'master' into i504-unittests
llorracc Feb 10, 2020
b229a2c
adding test for IndShockConsumerType.getShocks()
sbenthall Feb 10, 2020
75e57ec
adding tests for IndShockConsumerType class, based on BufferStock REM…
sbenthall Feb 15, 2020
68f4144
using assertAlmostEqual for tests to avoid failures due to operating …
sbenthall Feb 15, 2020
1c8df30
adding tests for failed GIC and AIC conditions on GICFailedExample. S…
sbenthall Feb 15, 2020
6c1acc7
removing comments from tests that was causing unicode error on Travis
sbenthall Feb 15, 2020
24293a3
moving test into ConsumptionSaving/tests
sbenthall Feb 17, 2020
91c2128
__init__.py for tests directory
sbenthall Feb 18, 2020
4fe33e5
Merge branch 'master' into i510
llorracc Feb 20, 2020
2dd4966
Merge branch 'master' into i494-test
sbenthall Feb 20, 2020
0d01217
Merge branch 'master' into i494-test
sbenthall Feb 20, 2020
b4e06b9
Merge branch 'master' into i504-unittests
sbenthall Feb 20, 2020
9d7f61c
Final updates for checkConditions before turnover to Seb and Mridul
Feb 20, 2020
1fce464
Merge pull request #535 from econ-ark/FinalUpdatesToCheckConditions
llorracc Feb 20, 2020
dc39bf8
Merge branch 'master' into i510
sbenthall Feb 21, 2020
dac07bf
update IndShockConsumerType conditions check
sbenthall Feb 21, 2020
181e3b4
Merge pull request #526 from sbenthall/i510
sbenthall Feb 21, 2020
a71e950
functionalize out the conditions (AIC, GICPF, RIC, FHWC) from checkCo…
sbenthall Feb 21, 2020
c5f0ee5
functionalize out IndShockConsumerType conditions
sbenthall Feb 21, 2020
d575be3
violated now stored in the agent object to persist across tests
sbenthall Feb 21, 2020
9f08b7e
Merge pull request #536 from sbenthall/i534
sbenthall Feb 21, 2020
2d21be4
Merge branch 'master' into i494-test
sbenthall Feb 21, 2020
0e8f1eb
moving the getShocks() test into ConsumptionSaving/tests/
sbenthall Feb 21, 2020
18fddd7
Merge pull request #508 from sbenthall/i494-test
sbenthall Feb 21, 2020
5f19fb7
fix up notebook utilities (#537)
Feb 21, 2020
8e94853
url -> self.url in checkConditions print logic. fixed #539 (#540)
sbenthall Feb 24, 2020
e1b52e5
fix checkConditions refactor in ConsIndShockModel (#541)
Feb 24, 2020
78210a5
add jpg to make_figs (#544)
Feb 26, 2020
fb920cf
Merge branch 'i504-unittests' of github.com:sbenthall/HARK into i504-…
sbenthall Feb 26, 2020
cf4972f
moving test_PerfForesightConsumerType to ConsumptionSaving/tests/
sbenthall Feb 26, 2020
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
Prev Previous commit
Next Next commit
removing comments from tests that was causing unicode error on Travis
sbenthall committed Feb 15, 2020
commit 6c1acc7e067339d7ad8866d24f3d080d16e15c3a
10 changes: 5 additions & 5 deletions HARK/tests/test_IndShockConsumerType.py
Original file line number Diff line number Diff line change
@@ -35,9 +35,9 @@ def test_baseEx(self):

m = np.linspace(0,9.5,1000)

c_m = baseEx.cFunc[0](m) # c_m can be used to define the limiting infinite-horizon consumption rule here
c_t1 = baseEx.cFunc[-2](m) # c_t1 defines the second-to-last period consumption rule
c_t5 = baseEx.cFunc[-6](m) # c_t5 defines the T-5 period consumption rule
c_m = baseEx.cFunc[0](m)
c_t1 = baseEx.cFunc[-2](m)
c_t5 = baseEx.cFunc[-6](m)
c_t10 = baseEx.cFunc[-11](m)

self.assertAlmostEqual(c_m[500], 1.4008090582203356)
@@ -56,8 +56,8 @@ def test_GICFails(self):
cycles=0, # cycles=0 makes this an infinite horizon consumer
**GIC_fail_dictionary)

GICFailExample.solve() # Above, we set up the problem but did not solve it
GICFailExample.unpackcFunc() # Make the consumption function easily accessible for plotting
GICFailExample.solve()
GICFailExample.unpackcFunc()
m = np.linspace(0,5,1000)
c_m = GICFailExample.cFunc[0](m)