PSLmodels / OG-UK

An overlapping generations model to simulate fiscal policy the United Kingdom.
https://pslmodels.github.io/OG-UK
Other
6 stars 7 forks source link

Unable to solve the steady-state equilibrium #24

Closed nikhilwoodruff closed 3 years ago

nikhilwoodruff commented 3 years ago

@jdebacker @rickecon @jpycroft

Just thought I'd put this here for reference, as I haven't so far been able to get an error-free output. The only difference in my installation is that I commented out the OG-USA pip requirement in environment.yml and installed first from the repo for reasons described here. I've now run the model with both the toy dataset and the FRS microdata, and I've put the outputs below. For the steady-state not found, is there any parameter I could try changing (keep solving for longer before timing out, have a higher error tolerance)?

I guess the good news is that since the synthetic dataset is known to solve (in the GH actions), so this must be a local issue rather than a more fundamental problem.

Synthetic dataset

(oguk-calibrate-dev) nikhil@nikhil-pc:~/pslmodels/OG-UK-Calibration/examples$ python run_og_uk.py 
Number of workers =  7
Using baseline tax parameters from  /home/nikhil/pslmodels/OG-UK-Calibration/examples/OG-UK-Example/OUTPUT_BASELINE/TxFuncEst_baseline.pkl
BW =  1 begin year =  2018 end year =  2018
Running current law policy baseline
Running current law policy baseline
Running current law policy baseline
Running current law policy baseline
year= 2018 age= all ages
Finished tax function loop through 1 years and 1 ages per year.
Tax function estimation time: 57.336 sec
Tax Function Path Exists
GE loop errors =  0.16873132432590995 [0.00854495 0.00380366 0.00212239 0.00112091 0.00227139 0.01442625
 0.00069104] -0.029809757642844752 -0.08771342561301192
GE loop errors =  0.0938859271437045 [0.00718279 0.00502081 0.00480162 0.00206539 0.01172154 0.01355787
 0.00261889] -0.024941394590888226 -0.088140730059848
GE loop errors =  0.03960428627200378 [0.00612703 0.01306545 0.01498456 0.00929644 0.0111842  0.01293781
 0.00249954] -0.01909336878856921 -0.09037733409133764
GE loop errors =  0.04045797774000311 [0.00548695 0.01307483 0.01499524 0.00930304 0.01119212 0.01294696
 0.0025013 ] -0.01954638222833647 -0.08995226695059433
GE loop errors =  0.04125011656649831 [0.00491021 0.01308354 0.01500516 0.00930918 0.01119949 0.01295546
 0.00250294] -0.019954603687413704 -0.08956453847712907
GE loop errors =  0.04182110858065084 [0.00456652 0.01308992 0.01501243 0.00931367 0.01120488 0.01296168
 0.00250414] -0.020188178057209592 -0.08935010157200582
GE loop errors =  0.03590913789432605 [0.00936885 0.01302396 0.01493732 0.00926722 0.01114913 0.01289734
 0.00249175] -0.01770183949976003 -0.09153669704225972
GE loop errors =  0.03590913789488247 [0.00936885 0.01302396 0.01493732 0.00926722 0.01114913 0.01289734
 0.00249175] -0.017701839499749517 -0.09153669704231807
GE loop errors =  0.03590913789488499 [0.00936885 0.01302396 0.01493732 0.00926722 0.01114913 0.01289734
 0.00249175] -0.01770183949975239 -0.0915366970423153
GE loop errors =  0.035909137894961404 [0.00936885 0.01302396 0.01493732 0.00926722 0.01114913 0.01289734
 0.00249175] -0.017701839499752757 -0.09153669704232134
GE loop errors =  0.03590913789541279 [0.00936885 0.01302396 0.01493732 0.00926722 0.01114913 0.01289734
 0.00249175] -0.017701839499735597 -0.09153669704237782
GE loop errors =  0.035909138713930075 [0.00936885 0.01302396 0.01493732 0.00926722 0.01114913 0.01289734
 0.00249175] -0.01770184050125033 -0.0915366970563983
GE loop errors =  0.035909137977244696 [0.00936885 0.01302396 0.01493732 0.00926722 0.01114913 0.01289734
 0.00249175] -0.017701839502317636 -0.0915366991237018
GE loop errors =  0.0035692047849879144 [0.00580862 0.00887381 0.00646866 0.0098411  0.0096554  0.00821211
 0.0024593 ] 0.054853808109144545 -1.6226026641723021
GE loop errors =  0.04746942765389746 [0.00777096 0.01084621 0.01077555 0.00936743 0.01028934 0.01052931
 0.00244705] -0.017608597429732108 -1.5512352784313532
GE loop errors =  0.03590913675375883 [0.00936885 0.01302396 0.01493732 0.00926722 0.01114913 0.01289734
 0.00249175] -0.017701839519594406 -0.09153669701168643
GE loop errors =  0.03590913789400234 [0.00936885 0.01302396 0.01493732 0.00926722 0.01114913 0.01289734
 0.00249175] -0.017701839499732308 -0.09153669704226083
GE loop errors =  0.03590913789403495 [0.00936885 0.01302396 0.01493732 0.00926722 0.01114913 0.01289734
 0.00249175] -0.017701839499750356 -0.09153669704224482
GE loop errors =  0.035909137894326024 [0.00936885 0.01302396 0.01493732 0.00926722 0.01114913 0.01289734
 0.00249175] -0.01770183949976003 -0.09153669704225971
GE loop errors =  0.03590913789488247 [0.00936885 0.01302396 0.01493732 0.00926722 0.01114913 0.01289734
 0.00249175] -0.017701839499749517 -0.09153669704231807
GE loop errors =  0.03590913789488499 [0.00936885 0.01302396 0.01493732 0.00926722 0.01114913 0.01289734
 0.00249175] -0.01770183949975239 -0.0915366970423153
GE loop errors =  0.03590913789496138 [0.00936885 0.01302396 0.01493732 0.00926722 0.01114913 0.01289734
 0.00249175] -0.01770183949975275 -0.09153669704232134
GE loop errors =  0.03590913789541279 [0.00936885 0.01302396 0.01493732 0.00926722 0.01114913 0.01289734
 0.00249175] -0.017701839499735597 -0.09153669704237782
GE loop errors =  0.035909138713930075 [0.00936885 0.01302396 0.01493732 0.00926722 0.01114913 0.01289734
 0.00249175] -0.01770184050125033 -0.0915366970563983
GE loop errors =  0.03590913797724467 [0.00936885 0.01302396 0.01493732 0.00926722 0.01114913 0.01289734
 0.00249175] -0.01770183950231763 -0.09153669912370181
GE loop errors =  -0.09027502944225481 [0.09745754 0.01152885 0.01325216 0.00828047 0.01000183 0.01198989
 0.00243446] 0.020937362250964105 -0.1002841779641968
GE loop errors =  -0.014027781440052692 [0.05178487 0.01117441 0.01282908 0.00793915 0.00954012 0.01087878
 0.00205652] 0.0004975237543831737 -0.10381140261683931
GE loop errors =  0.014947873258345346 [0.02920112 0.01201503 0.01377854 0.00854747 0.01028219 0.01188238
 0.00229254] -0.006511190801051496 -0.09549582370796467
GE loop errors =  0.0021573896891330657 [0.0392231  0.0117071  0.01342828 0.00833267 0.01002508 0.01160167
 0.00224273] -0.0014946594902629784 -0.0973914896986846
GE loop errors =  0.008923386064147651 [0.03419959 0.0118583  0.01359904 0.00843588 0.01014797 0.01172562
 0.00226182] -0.0042672588760173935 -0.09669334938355029
GE loop errors =  0.011919884170420447 [0.03170035 0.01193273 0.01368445 0.00848914 0.01021208 0.01180102
 0.00227676] -0.005370357772164762 -0.09605481634948243
GE loop errors =  0.013426493144443746 [0.03045073 0.01197321 0.01373072 0.00851783 0.01024657 0.01184114
 0.00228457] -0.0059372812813574954 -0.09576769635418678
GE loop errors =  0.014185653434227216 [0.02982592 0.01199395 0.01375443 0.00853253 0.01026423 0.01186161
 0.00228853] -0.006223431621650302 -0.09562999672858519
GE loop errors =  0.014566367111750564 [0.02951352 0.01200445 0.01376643 0.00853997 0.01027318 0.01187196
 0.00229053] -0.006367105062695749 -0.09556246136514465
GE loop errors =  0.014757020850922953 [0.02935732 0.01200973 0.01377247 0.00854371 0.01027767 0.01187716
 0.00229153] -0.006439096275830135 -0.09552903021680956
GE loop errors =  0.01485242223403116 [0.02927922 0.01201238 0.0137755  0.00854559 0.01027993 0.01187976
 0.00229203] -0.006475130425287828 -0.09551239850361812
GE loop errors =  0.014900141592869676 [0.02924017 0.01201371 0.01377702 0.00854653 0.01028106 0.01188107
 0.00229228] -0.006493157139365741 -0.09550410360360748
GE loop errors =  0.014924005945291585 [0.02922065 0.01201437 0.01377778 0.008547   0.01028163 0.01188172
 0.00229241] -0.006502172906801128 -0.09549996139192202
Traceback (most recent call last):
  File "/home/nikhil/pslmodels/OG-UK-Calibration/examples/run_og_uk.py", line 193, in <module>
    main()
  File "/home/nikhil/pslmodels/OG-UK-Calibration/examples/run_og_uk.py", line 71, in main
    ss_outputs = SS.run_SS(p, client=client)
  File "/home/nikhil/pslmodels/OG-USA/ogusa/SS.py", line 575, in run_SS
    raise RuntimeError('Steady state equilibrium not found')
RuntimeError: Steady state equilibrium not found

2018 FRS Microdata

(oguk-calibrate-dev) nikhil@nikhil-pc:~/pslmodels/OG-UK-Calibration/examples$ python run_og_uk.py 
Number of workers =  7
Using baseline tax parameters from  /home/nikhil/pslmodels/OG-UK-Calibration/examples/OG-UK-Example/OUTPUT_BASELINE/TxFuncEst_baseline.pkl
BW =  1 begin year =  2018 end year =  2018
Running current law policy baseline
Running current law policy baseline
Running current law policy baseline
Running current law policy baseline
year= 2018 age= all ages
Finished tax function loop through 1 years and 1 ages per year.
Tax function estimation time: 1 min, 12.2 sec
Tax Function Path Exists
GE loop errors =  0.16851858680016132 [0.00854624 0.00380311 0.00212203 0.00112069 0.00227104 0.01443708
 0.00069091] -0.02979732113216193 -0.08895474064564036
GE loop errors =  0.09372047969404959 [0.00718412 0.00502064 0.00480211 0.00206538 0.01173005 0.01356849
 0.00262119] -0.024926196299282374 -0.08937690102874696
GE loop errors =  0.04560394931567245 [0.00616255 0.01314553 0.0150762  0.00425477 0.01125271 0.01301763
 0.00251515] -0.0199972784300474 -0.0911109942662219
GE loop errors =  0.040329775537556165 [0.00548814 0.01308385 0.01500597 0.00930988 0.01120057 0.01295747
 0.00250357] -0.019528389336769626 -0.09114780478532064
GE loop errors =  0.04112011027140293 [0.00491128 0.01309256 0.01501588 0.00931601 0.01120793 0.01296595
 0.0025052 ] -0.0199366752225184 -0.09076935440678152
GE loop errors =  0.04158536528800645 [0.00469281 0.01309783 0.01502189 0.00931972 0.01121239 0.0129711
 0.00250619] -0.020079816853057986 -0.09065113852010119
GE loop errors =  0.03578838906370767 [0.00937491 0.01303304 0.0149481  0.00927409 0.01115762 0.01290789
 0.00249402] -0.017683357079775947 -0.09269438848507466
GE loop errors =  0.03578838906426328 [0.00937491 0.01303304 0.0149481  0.00927409 0.01115762 0.01290789
 0.00249402] -0.017683357079765427 -0.09269438848513156
GE loop errors =  0.03578838906426578 [0.00937491 0.01303304 0.0149481  0.00927409 0.01115762 0.01290789
 0.00249402] -0.017683357079768293 -0.09269438848512887
GE loop errors =  0.03578838906434205 [0.00937491 0.01303304 0.0149481  0.00927409 0.01115762 0.01290789
 0.00249402] -0.01768335707976866 -0.09269438848513475
GE loop errors =  0.03578838906479277 [0.00937491 0.01303304 0.0149481  0.00927409 0.01115762 0.01290789
 0.00249402] -0.017683357079751508 -0.09269438848518985
GE loop errors =  0.03578838988153375 [0.00937491 0.01303304 0.0149481  0.00927409 0.01115762 0.01290789
 0.00249402] -0.01768335808115694 -0.09269438849874581
GE loop errors =  0.03578838914646813 [0.00937491 0.01303304 0.0149481  0.00927409 0.01115762 0.01290789
 0.00249402] -0.017683357082328204 -0.09269439056639567
GE loop errors =  -0.06962742952051144 [0.00764436 0.01064917 0.0068861  0.0382008  0.00435472 0.00322156
 0.00042797] 0.360820203081863 -0.45473056567600734
GE loop errors =  -0.0737954074267775 [0.00692938 0.00966427 0.00823221 0.02218871 0.00583372 0.00575064
 0.00115128] 0.38599707749974116 -0.5099315377547433
GE loop errors =  0.03578838792258161 [0.00937491 0.01303304 0.0149481  0.00927409 0.01115762 0.01290789
 0.00249402] -0.0176833570995674 -0.09269438845523613
GE loop errors =  0.03578838906338448 [0.00937491 0.01303304 0.0149481  0.00927409 0.01115762 0.01290789
 0.00249402] -0.017683357079748267 -0.09269438848507575
GE loop errors =  0.03578838906341701 [0.00937491 0.01303304 0.0149481  0.00927409 0.01115762 0.01290789
 0.00249402] -0.0176833570797663 -0.09269438848506012
GE loop errors =  0.03578838906370767 [0.00937491 0.01303304 0.0149481  0.00927409 0.01115762 0.01290789
 0.00249402] -0.017683357079775953 -0.09269438848507465
GE loop errors =  0.03578838906426328 [0.00937491 0.01303304 0.0149481  0.00927409 0.01115762 0.01290789
 0.00249402] -0.017683357079765427 -0.09269438848513156
GE loop errors =  0.03578838906426578 [0.00937491 0.01303304 0.0149481  0.00927409 0.01115762 0.01290789
 0.00249402] -0.017683357079768293 -0.09269438848512887
GE loop errors =  0.03578838906434205 [0.00937491 0.01303304 0.0149481  0.00927409 0.01115762 0.01290789
 0.00249402] -0.01768335707976866 -0.09269438848513475
GE loop errors =  0.03578838906479277 [0.00937491 0.01303304 0.0149481  0.00927409 0.01115762 0.01290789
 0.00249402] -0.017683357079751508 -0.09269438848518985
GE loop errors =  0.03578838988153375 [0.00937491 0.01303304 0.0149481  0.00927409 0.01115762 0.01290789
 0.00249402] -0.01768335808115694 -0.09269438849874581
GE loop errors =  0.03578838914646813 [0.00937491 0.01303304 0.0149481  0.00927409 0.01115762 0.01290789
 0.00249402] -0.01768335708232821 -0.09269439056639567
GE loop errors =  -0.05515631680670745 [0.02729929 0.0090835  0.01033544 0.04091077 0.00778526 0.00921842
 0.00186062] 0.004482008331827027 -0.06770483826636534
GE loop errors =  -0.12653447759399356 [0.04742907 0.00773792 0.0087061  0.07215134 0.00640996 0.00833088
 0.00174014] 0.02264673088705233 -0.0571638457656754
GE loop errors =  -0.08728123865449416 [0.03604814 0.00765764 0.00875727 0.05529973 0.00663205 0.00770116
 0.00156085] 0.010379749998624212 -0.06911742291011222
GE loop errors =  -0.054700543937694954 [0.02730146 0.00908793 0.01034031 0.03867745 0.00778893 0.00922285
 0.00186152] 0.0030474340831121785 -0.06611287163616128
GE loop errors =  -0.054571898057185264 [0.02730208 0.00908919 0.0103417  0.0380765  0.00778998 0.00922411
 0.00186178] 0.0026614759288703174 -0.06566707342060976
GE loop errors =  -0.054453800372512226 [0.02730265 0.00909036 0.01034299 0.03753559 0.00779095 0.00922528
 0.00186202] 0.0023140935613718966 -0.0652591860289839
GE loop errors =  -0.054345580344913075 [0.02730318 0.00909144 0.01034417 0.03704871 0.00779184 0.00922636
 0.00186224] 0.002001432729868566 -0.06488655940117649
GE loop errors =  -0.05424657628728685 [0.02730366 0.00909242 0.01034526 0.03661047 0.00779266 0.00922735
 0.00186245] 0.0017200241239240452 -0.06454662322152697
GE loop errors =  -0.054156141001605165 [0.0273041  0.00909333 0.01034625 0.03621602 0.00779341 0.00922825
 0.00186263] 0.0014667448952828469 -0.06423690640433269
GE loop errors =  -0.05407364737679937 [0.02730451 0.00909416 0.01034717 0.03586098 0.0077941  0.00922908
 0.0018628 ] 0.0012387841004264863 -0.06395505133983573
GE loop errors =  -0.053998493227245994 [0.02730488 0.00909491 0.010348   0.03554141 0.00779473 0.00922984
 0.00186296] 0.0010336115571809232 -0.06369882343500283
GE loop errors =  -0.053930104248708755 [0.02730522 0.00909561 0.01034876 0.03525378 0.0077953  0.00923053
 0.0018631 ] 0.0008489491787075157 -0.06346611681721863
GE loop errors =  -0.05386793759579968 [0.02730553 0.00909623 0.01034945 0.0349949  0.00779583 0.00923116
 0.00186323] 0.0006827489482279722 -0.06325495879547943
GE loop errors =  -0.034760723570727875 [0.02454277 0.0086227  0.00978238 0.02523603 0.00730116 0.00875336
 0.00177422] -0.002282450498904201 -0.06958855153282031
GE loop errors =  -0.011838298366174407 [0.0211755  0.00813384 0.00917467 0.01553647 0.00680479 0.00826527
 0.00169148] -0.004740408997936062 -0.07725274773784335
GE loop errors =  0.03964887725803511 [0.01161546 0.00755677 0.00809956 0.00414251 0.00610352 0.00765446
 0.00163192] -0.0004506211184721193 -0.10669289754352083
GE loop errors =  0.034907551633173856 [0.01236717 0.00693155 0.00756173 0.01319036 0.00551441 0.00697606
 0.00146816] 0.004471220208550772 -0.10660268786763435
GE loop errors =  -0.013116910815521673 [0.02117013 0.00812431 0.00916394 0.02110848 0.00679673 0.00825579
 0.00168961] -0.00047300068441518545 -0.08221468430382621
GE loop errors =  -0.012920376209037368 [0.02117109 0.00812601 0.00916585 0.02036139 0.00679817 0.00825749
 0.00168994] -0.0010216562663839177 -0.08163224436391203
GE loop errors =  -0.01273851709002434 [0.02117198 0.0081276  0.00916764 0.01968888 0.00679951 0.00825907
 0.00169025] -0.0015154865446781324 -0.08109614798859158
GE loop errors =  -0.01257064639151341 [0.02117282 0.00812908 0.00916931 0.01908351 0.00680076 0.00826053
 0.00169054] -0.001959967672119242 -0.08060371608837422
GE loop errors =  -0.012416036839098546 [0.02117359 0.00813045 0.00917085 0.0185386  0.00680192 0.00826189
 0.00169081] -0.002360029093339912 -0.08015224017486337
GE loop errors =  -0.012273936189316978 [0.0211743  0.00813171 0.00917227 0.0180481  0.00680299 0.00826315
 0.00169106] -0.002720108124330406 -0.07973902439856576
GE loop errors =  -0.012143581263584127 [0.02117496 0.00813288 0.00917358 0.01760658 0.00680397 0.00826431
 0.00169129] -0.003044199050028784 -0.07936141987778772
GE loop errors =  -0.012024210318770615 [0.02117556 0.00813395 0.00917479 0.01720917 0.00680488 0.00826537
 0.0016915 ] -0.003335897343072443 -0.07901685183473693
GE loop errors =  -0.01191507250768066 [0.02117612 0.00813493 0.00917589 0.01685145 0.00680571 0.00826635
 0.00169169] -0.003598440180745524 -0.0787028403985954
GE loop errors =  -0.01181543798740349 [0.02117662 0.00813584 0.00917691 0.01652946 0.00680647 0.00826725
 0.00169187] -0.0038347386692554886 -0.07841701790524529
GE loop errors =  0.004738222788828905 [0.02054256 0.00805627 0.00906611 0.02115143 0.00671927 0.0081858
 0.00168107] -0.01782766247937323 -0.04840304185878139
GE loop errors =  0.047547340674843966 [0.01971239 0.0097923  0.01153722 0.03073229 0.00758466 0.00942035
 0.00189392] -0.0526933717227511 0.022068228540783375
GE loop errors =  -0.0039916577101760525 [0.01977375 0.00820635 0.00949208 0.01574199 0.0065487  0.00809455
 0.00164808] -0.007184975827498878 -0.07228063549866383
GE loop errors =  0.005146118086986867 [0.02054528 0.00806085 0.00907119 0.02043986 0.00672311 0.00819025
 0.00168195] -0.018349271232960665 -0.04777435494257036
GE loop errors =  0.005258217727378639 [0.02054603 0.00806212 0.00907259 0.02024837 0.00672416 0.00819148
 0.00168219] -0.018489611423727667 -0.04760283116737801
GE loop errors =  0.005359988117807968 [0.02054671 0.00806326 0.00907387 0.02007601 0.00672512 0.0081926
 0.00168241] -0.018615927067932442 -0.0474475750667481
GE loop errors =  0.005452304990099965 [0.02054732 0.00806431 0.00907503 0.01992087 0.006726   0.00819361
 0.00168261] -0.01872961891056897 -0.0473071228438516
GE loop errors =  0.005544887245901714 [0.02054792 0.00806532 0.00907615 0.01968822 0.00672684 0.00819459
 0.00168281] -0.0188616713013312 -0.0471421246274722
GE loop errors =  0.005619877594491368 [0.02054843 0.00806617 0.00907709 0.01957182 0.00672755 0.00819542
 0.00168297] -0.018950800789695736 -0.04703101340269884
GE loop errors =  0.005687749835275535 [0.02054888 0.00806694 0.00907795 0.01946705 0.0067282  0.00819617
 0.00168312] -0.01903102147798226 -0.04693064834978342
GE loop errors =  0.0057491459120122546 [0.0205493  0.00806764 0.00907873 0.01937274 0.00672879 0.00819685
 0.00168325] -0.019103223482508765 -0.04684002285865236
K_d has negative elements. Setting them positive to prevent NAN.
GE loop errors =  0.23746547045852223 [2.26014243e-02 1.15312890e-02 1.29245335e-02 6.36093251e+00
 9.62793105e-03 1.15642168e-02 2.34971157e-03] 60.86598198719324 -0.10051607954262091
GE loop errors =  -0.14135161778763683 [1.94052109e-02 6.13661165e-03 6.93464074e-03 1.50943798e+06
 5.11247671e-03 6.31949860e-03 1.31169440e-03] 9772.346245119448 -0.10064653296729423
GE loop errors =  nan [nan nan nan nan nan nan nan] nan nan
GE loop errors =  nan [nan nan nan nan nan nan nan] nan nan
GE loop errors =  nan [nan nan nan nan nan nan nan] nan nan
GE loop errors =  nan [nan nan nan nan nan nan nan] nan nan
GE loop errors =  nan [nan nan nan nan nan nan nan] nan nan
GE loop errors =  nan [nan nan nan nan nan nan nan] nan nan
GE loop errors =  nan [nan nan nan nan nan nan nan] nan nan
GE loop errors =  nan [nan nan nan nan nan nan nan] nan nan
Traceback (most recent call last):
  File "/home/nikhil/pslmodels/OG-UK-Calibration/examples/run_og_uk.py", line 193, in <module>
    main()
  File "/home/nikhil/pslmodels/OG-UK-Calibration/examples/run_og_uk.py", line 71, in main
    ss_outputs = SS.run_SS(p, client=client)
  File "/home/nikhil/pslmodels/OG-USA/ogusa/SS.py", line 575, in run_SS
    raise RuntimeError('Steady state equilibrium not found')
RuntimeError: Steady state equilibrium not found

The NaNs seem strange in the microdata one, and even stranger they only appear after this line: K_d has negative elements. Setting them positive to prevent NAN.

jdebacker commented 3 years ago

@nikhilwoodruff Sorry to miss this.

There maybe some difference in the solvers used on your computer and what is run on GH Actions.

Often, you can get the SS to solve by changing the initial values, especially the interest rate. To do this, modify line 70 of the run_og_uk.py script (p.initial_guess_r_SS = 0.07) to be some other value (e.g., 0.05 or 0.09). You might focus on the toy data first then move to the full data after you get that to work.

nikhilwoodruff commented 3 years ago

Hi Jason,

Thanks very much for this, it seems to have worked. (I changed the initial guess of the interest rate from 0.07 to 0.04, with the microdata and the errors were then all < 1e-10.

nikhilwoodruff commented 3 years ago

Happy to say it did indeed finish, returning this output for the PA reduction from £12.5k to £10k. @jdebacker does anything look off here?

Percentage changes in aggregates: 
Year                    Variable  2018  2019  2020  2021  2022  2023  2024  2025  2026  2027  2018-2027    SS
0                    GDP ($Y_t$) -0.00 -0.01  0.00  0.01  0.01  0.01  0.01  0.01  0.01  0.00       0.00 -0.00
1            Consumption ($C_t$)  0.02 -0.08 -0.08  0.01  0.01  0.01  0.01  0.01  0.01  0.01      -0.01 -0.00
2          Capital Stock ($K_t$) -0.00 -0.01  0.01  0.03  0.03  0.03  0.03  0.02  0.02  0.02       0.02  0.00
3                  Labor ($L_t$) -0.01 -0.01 -0.01 -0.00 -0.00 -0.00 -0.00 -0.00 -0.00 -0.00      -0.00 -0.00
4     Real interest rate ($r_t$) -0.01 -0.00 -0.02 -0.04 -0.04 -0.03 -0.03 -0.03 -0.03 -0.02      -0.03  0.00
5                      Wage rate  0.00  0.00  0.01  0.01  0.01  0.01  0.01  0.01  0.01  0.01       0.01  0.00
nikhilwoodruff commented 3 years ago

Closing this because I can now solve for the steady-state, thanks Jason.

jdebacker commented 3 years ago

LGTM - glad you got it to solve!