scieee Science in your language
[en] (orig)

A machine learning projection method for macro-finance models

Author: Valaitis, Vytautas,Villa, Alessandro T.
Publisher: New Haven, CT: The Econometric Society
Year: 2024
DOI: 10.3982/QE1403
Source: https://www.econstor.eu/bitstream/10419/296356/1/quan200305.pdf
Valai is, Vy au as; Villa, Alessand o T.
A icle
A machine lea ning p ojec ion me hod o mac o- inance
models
Quan i a i e Economics
P o ided in Coope a ion wi h:
The Econome ic Socie y
Sugges ed Ci a ion: Valai is, Vy au as; Villa, Alessand o T. (2024) : A machine lea ning p ojec ion
me hod o mac o- inance models, Quan i a i e Economics, ISSN 1759-7331, The Econome ic
Socie y, New Ha en, CT, Vol. 15, Iss. 1, pp. 145-173,
h ps://doi.o g/10.3982/QE1403
This Ve sion is a ailable a :
h ps://hdl.handle.ne /10419/296356
S anda d-Nu zungsbedingungen:
Die Dokumen e au EconS o dü en zu eigenen wissenscha lichen
Zwecken und zum P i a geb auch gespeiche und kopie we den.
Sie dü en die Dokumen e nich ü ö en liche ode komme zielle
Zwecke e iel äl igen, ö en lich auss ellen, ö en lich zugänglich
machen, e eiben ode ande wei ig nu zen.
So e n die Ve asse die Dokumen e un e Open-Con en -Lizenzen
(insbesonde e CC-Lizenzen) zu Ve ügung ges ell haben soll en,
gel en abweichend on diesen Nu zungsbedingungen die in de do
genann en Lizenz gewäh en Nu zungs ech e.
Te ms o use:
Documen s in EconS o may be sa ed and copied o you pe sonal
and schola ly pu poses.
You a e no o copy documen s o public o comme cial pu poses, o
exhibi he documen s publicly, o make hem publicly a ailable on he
in e ne , o o dis ibu e o o he wise use he documen s in public.
I he documen s ha e been made a ailable unde an Open Con en
Licence (especially C ea i e Commons Licences), you may exe cise
u he usage igh s as speci ied in he indica ed licence.
h ps://c ea i ecommons.o g/licenses/by-nc/4.0/
Quan i a i e Economics 15 (2024), 145–173 1759-7331/20240145
A machine lea ning p ojec ion me hod o
mac o- inance models
Vy au as Valai is
School o Economics, Uni e si y o Su ey
Alessand o T. Villa
Economic Resea ch Depa men , Fede al Rese e Bank o Chicago
We use supe ised machine lea ning o app oxima e he expec a ions ypically
con ained in he op imali y condi ions o an economic model in he spi i o he
pa ame e ized expec a ions algo i hm (PEA) wi h s ochas ic simula ion. When
he se o s a e a iables is gene a ed by a s ochas ic simula ion, i is likely o su -
e om mul icollinea i y. We show ha a neu al ne wo k-based expec a ions al-
go i hm can deal e icien ly wi h mul icollinea i y by ex ending he op imal deb
managemen p oblem s udied by Fa aglia, Ma ce , Oikonomou, and Sco (2019)
o ou ma u i ies. We ind ha he op imal policy p esc ibes an ac i e ole o
he newly added medium- e m ma u i ies, enabling he planne o aise inancial
income wi hou inc easing i s o al bo owing in esponse o expendi u e shocks.
Th ough his mechanism, he go e nmen e ec i ely subsidizes he p i a e sec o
du ing ecessions.
Keywo ds. Machine lea ning, incomple e ma ke s, p ojec ion me hods, op imal
iscal policy, ma u i y managemen .
JEL classi ica ion. C63, D52, E32, E37, E62, G12.
1. In oduc ion
In his pape , we exploi he compu a ional gains ha de i e om he obus ness o
mul icollinea i y o neu al ne wo ks o ex end he op imal deb managemen p oblem
s udied by Fa aglia e al. (2019) o ou ma u i ies. The hedging bene i s p o ided by he
addi ional ma u i ies allow he go e nmen o espond o expendi u e shocks by aising
inancial income wi hou inc easing he o al ou s anding deb . Th ough his mecha-
nism, he go e nmen e ec i ely subsidizes he p i a e sec o in ecessions.
Vy au as Valai is: [email p o ec ed]
Alessand o T. Villa: [email p o ec ed]
We a e hank ul o And ea Lan e i, Lukas Schmid, and Ma hias Keh ig o hei encou agemen . The pa-
pe ecei ed he S uden Awa d o he Socie y o Compu a ional Economics and bene i ed om commen s
by Albe Ma ce , Se guei Malia , Lilia Malia , Swapnil Singh, and semina pa icipan s a he Duke Mac o
B eak as , he 2018 Bal ic Economic Con e ence, he Socie y o Compu a ional Economics 24 h In e na-
ional Con e ence, he 2018 Econome ic Socie y Summe Eu opean Mee ing, and he 2019 Econome ic
Socie y A ican mee ing. Disclaime : The iews exp essed in his pape do no ep esen he iews o he
Fede al Rese e Bank o Chicago o he Fede al Rese e Sys em. Decla a ion o con lic s o in e es : none.
©2024 The Au ho s. Licensed unde he C ea i e Commons A ibu ion-NonComme cial License 4.0.
A ailable a h p://qeconomics.o g.h ps://doi.o g/10.3982/QE1403
146 Valai is and Villa Quan i a i e Economics 15 (2024)
We use a neu al ne wo k (NN) in a supe ised machine lea ning ashion o ap-
p oxima e he expec a ion e ms ypically con ained in he op imali y condi ions o an
economic model, in he spi i o he Pa ame e ized Expec a ions Algo i hm (PEA) wi h
s ochas ic simula ion, in oduced by den Haan and Ma ce (1990) and in a simila ash-
ion o Du y and McNelis (2001). On he one hand, s ochas ic simula ion me hods allow
us o ackle p oblems wi h a high numbe o s a e a iables, since hey calcula e so-
lu ions only in he s a es ha a e isi ed in equilib ium (i.e., he e godic se ). On he
o he hand, when he se o s a e a iables is gene a ed by a s ochas ic simula ion, i
is likely o su e om mul icollinea i y. In his con ex , his pape makes wo con i-
bu ions. Fi s , we show ha an NN-based expec a ions algo i hm can deal e icien ly
wi h mul icollinea i y by ex ending he op imal deb managemen p oblem s udied by
Fa aglia e al. (2019) o ou ma u i ies. Second, we show ha he op imal deb man-
agemen policy p esc ibes an ac i e ole o he medium- e m ma u i ies, enabling he
planne o aise inancial income wi hou inc easing i s o al bo owing in esponse o
expendi u e shocks. We conside his p oblem a pa icula ly in e es ing economic ap-
plica ion ha also poses signi ican compu a ional challenges o ou easons.
Fi s , he numbe o s a e a iables inc eases in he numbe and leng h o ma u i-
ies a ailable. Second, his class o p oblems includes o wa d-looking cons ain s, and
he p oblem can be made ecu si e a he cos o adding e en mo e s a e a iables. Fol-
lowing Ma ce and Ma imon (2019), we o mula e he ecu si e Lag angian o sol e o
he ime-inconsis en op imal policy unde ull commi men wi h mul iple ma u i ies.
When ma ke s a e incomple e, he Ramsey planne needs o keep ack o all p omises
made in he p e ious pe iods. Because o hese easons, op imal ma u i y managemen
p oblems su e om he cu se o dimensionali y (see Bellman (1961)). Fo example, he
op imal deb managemen p oblem wi h ou ma u i ies conside ed in Sec ion 4 ea-
u es 46 s a e a iables. Thi d, because o he ma u i ies, many o hese s a e a iables
a e mul icollinea when he model is sol ed by using a s ochas ic simula ion app oach.1
Fou h, his class o p oblems does no ha e a s ochas ic s eady s a e, as documen ed in
Aiyaga i, Ma ce , Sa gen , and Sappala (2002), and ends o equen ly hi he bo ow-
ing and lending cons ain s. Such p ope ies ende he model pa icula ly ha d o sol e
using pe u ba ion me hods a ound a pa icula poin .2
In Sec ion 4, we use he me hodology o s udy he op imal go e nmen deb man-
agemen policy when he Ramsey planne can issue an inc easing numbe o deb in-
1The s a e space includes lagged alues o he same a iables (e.g., lagged alues o ou s anding bonds
and Lag ange mul iplie s). Mul icollinea i y in he s a e space migh p e en s anda d eg ession-based al-
go i hms om con e ging because he es ima ed eg ession coe icien s may ne e s abilize due o high
es ima ion a iance and because misspeci ica ion o he ue policy unc ion unde mul icollinea i y may
lead o se e e p edic ion bias, as we show in Sec ion 2.5. Al e na i ely, people ha e used he s ochas ic sim-
ula ion based on egula iza ion (see Judd, Malia , and Malia (2011)) o ha e ex ended he PEA algo i hm
o condensed PEA; see Fa aglia e al. (2019). In Sec ion 5, we discuss how he NN-based expec a ions algo-
i hm imp o es upon hese me hods.
2Bhanda i, E ans, Goloso , and Sa gen (2017b) p opose a me hod ha allows one o app oxima e a
sys em a ound a cu en le el o go e nmen deb , and Lus ig, Slee , and Yel ekin (2008) on he o he hand,
sol e he op imal iscal policy p oblem in incomple e ma ke s wi h se en ma u i ies up o 7 pe iods using
alue unc ion i e a ion on a spa se g id.
Quan i a i e Economics 15 (2024) A machine lea ning p ojec ion me hod 147
s umen s wi h di e en ma u i ies. In ui i ely, he p ices o longe ma u i ies a e yp-
ically mo e esponsi e o shocks han p ices o sho e ma u i ies. This di e en ial e-
sponse c ea es oppo uni ies o hedging by bo owing in long- e m and sa ing in sho -
e m bonds. In his case, he alue o liabili ies alls by mo e han he alue o asse s
in esponse o nega i e shocks (see Angele os (2002), Bue a and Nicolini (2004)and
Fa aglia e al. (2019)). Addi ionally, he ac ha sho bond p ices a e no as espon-
si e o shocks allows he planne o smoo h he p ice o new deb issuance by ebal-
ancing he po olio owa d he longe ma u i ies in economic booms and owa d he
sho e ma u i ies in ecessions. We ind ha he planne ac i ely uses he addi ional
medium- e m ma u i ies o exploi bo h he hedging and he p ice smoo hing bene i s.
The go e nmen holds le e aged posi ions in all bonds and ebalances he po olio wi h
mo e emphasis on he sho e ma u i ies in ecessions. We ind ha , when he numbe
o a ailable ma u i ies inc eases om wo o h ee (and ou ), he o al amoun o ou -
s anding deb becomes p ocyclical. The addi ional ma u i ies allow he go e nmen o
espond o expendi u e shocks by aising inancial income wi hou inc easing he o al
ou s anding deb . Th ough his mechanism, he go e nmen e ec i ely subsidizes he
p i a e sec o in ecessions, esul ing in highe leisu e and less ola ile labo axes.
1.0.0.1 Li e a u e e iew This pape con ibu es o wo s ands o li e a u e: (i) nume -
ical me hods in economics and (ii) op imal iscal policy.
In e ms o me hods, his pape builds on he seminal wo k o den Haan and Ma ce
(1990), who in oduced PEA. The idea o using neu al ne wo ks o pa ame e ize deci-
sion ules in a simila ashion o PEA goes back o Du y and McNelis (2001). Ou pape
con ibu es o his li e a u e by showing ha an NN-based expec a ions algo i hm can
deal e icien ly wi h mul icollinea i y by ex ending he op imal deb managemen p ob-
lem s udied by Fa aglia e al. (2019) o mo e han wo ma u i ies. In pa icula , we exploi
he compu a ional gains o s udy he op imal go e nmen deb managemen p oblem o
Fa aglia e al. (2019) wi h h ee and ou ma u i ies, which yields new economic insigh s.
No e ha PEA has been ex ended mo e ecen ly (see Fa aglia, Ma ce , Oikonomou, and
Sco (2014)andFa aglia e al. (2019)) o deal wi h mul icollinea i y (condensed PEA)
and o e iden i ica ion (Fo wa d-S a es PEA). Ou me hodology builds on condensed
PEA and Fo wa d-S a es PEA, in he con ex o op imal iscal policy, allowing o ma-
chine lea ning o educe he s a e space endogenously and handling mul icollinea i y
e ec i ely when a s ochas ic simula ion app oach is adop ed. In con as , condensed
PEA achie es his esul by in oducing an ex e nal loop ha es s a subse o he s a e
space as a candida e o sol e he model.
In con empo aneous wo k, Malia , Malia , and Winan (2021)andMalia and Malia
(2022) discuss how neu al ne wo ks can handle mul icollinea i y. In pa icula , hey do
so in he con ex o he K usell and Smi h (1998) model. We complemen hei wo k by
demons a ing he obus ness o mul icollinea i y in he con ex o op imal iscal policy.
Addi ionally, we show ha he in e ac ion be ween he capabili y o a neu al ne wo k o
deal wi h mul icollinea i y and i s lexibili y in app oxima ing gene ic policy unc ions
plays an impo an ole in gene a ing unbiased p edic ions. In Sec ion 2.5, we show ha
i a esea che p ecommi s o app oxima e he policy unc ions wi h polynomials ha
148 Valai is and Villa Quan i a i e Economics 15 (2024)
a e misspeci ied hen, unde mul icollinea i y among he s a e a iables, he p edic ions
will be biased. Thanks o he lexible nonpa ame ic na u e o a neu al ne wo k, which
does no equi e making ex an e assump ions abou he unc ional o m o he policy
unc ions, his p oblem disappea s.
PEA can po en ially be used in combina ion wi h o he s anda d econome ic ech-
niques ha ackle he p oblem o mul icollinea i y, as in Judd, Malia , and Malia (2011).
Simila o ou pape , Judd, Malia , and Malia (2011) adop a s ochas ic simula ion ap-
p oach and show how al eady es ablished me hods in econome ics can be used o alle-
ia e he mul icollinea i y p oblem using a mul icoun y neoclassical g ow h model. We
discuss he ela ion be ween ou me hod and he me hods o Fa aglia e al. (2019)and
Judd, Malia , and Malia (2011) in g ea e de ail in Sec ion 5.
O he pape s ha use machine lea ning o sol e economic models include Schei-
degge and Bilionis (2019), Azino ic, Gaegau , and Scheidegge (2022), Fe nández-
Villa e de, Hu ado, and Nuño (2023), and Dua e, Dua e, and Sil a (2023). Fe nández-
Villa e de, Hu ado, and Nuño (2023) use deep neu al ne wo ks o app oxima e he ag-
g ega e laws o mo ion in a he e ogeneous agen s model ea u ing s ong nonlinea i-
ies and agg ega e shocks. Dua e, Dua e, and Sil a (2023) cas s he economic model
in con inuous ime and uses neu al ne wo ks o app oxima e he Bellman equa ion.
Malia , Malia , and Winan (2021)andAzino ic, Gaegau , and Scheidegge (2022)ap-
p oxima e all he model equilib ium condi ions using neu al ne wo ks and use he sim-
ula ed da a o ain hem. Azino ic, Gaegau , and Scheidegge (2022) sol e he li e-cycle
model wi h bo owing cons ain s, agg ega e shocks, and inancial ic ions using un-
supe ised machine lea ning. The main di e ence o ou pape is o le e age on supe -
ised machine lea ning o deal e ec i ely wi h he p oblem o mul icollinea i y ypical
o s ochas ic simula ion app oaches. In his con ex , we show how ou algo i hm can
alle ia e he cu se o dimensionali y, allowing us o explo e he p oblem o he op imal
ma u i y s uc u e o go e nmen deb in a mo e ealis ic en i onmen .
Ou applica ion also con ibu es o he s and o li e a u e on op imal iscal policy.
In pa icula , i is ele an o he li e a u e on he op imal ma u i y s uc u e o go e n-
men deb .3
Lus ig, Slee , and Yel ekin (2008) ind ha he op imal policy p esc ibes an
almos exclusi e ole o he longes ma u i y in a model wi h no-lending cons ain s and
a New Keynesian model whe e bonds a e nominal. In ou se ing, we allow o go e n-
men lending and s udy he hedging bene i s o a choice be ween mul iple ma u i ies
o eal bonds. Bhanda i e al. (2017b) s udy he op imal ma u i y s uc u e in an open
economy wi h wo ma u i ies, and Bigio, Nuño, and Passado e (2023) allow o a ini e
numbe o ma u i ies in an economy wi h liquidi y cos s o issuing deb , whe e liquid-
i y cos s di e by ma u i y. Fa aglia e al. (2019) is he closes pape o ou s and s udies
he ole o ic ions in a closed economy wi h wo ypes o bonds. Sol ing he Ramsey
p oblem conside ed in his pape is pa icula ly challenging, as he dimension o i s
s a e space inc eases signi ican ly in unc ion o he leng h o he ma u i ies and he
numbe o bonds. Mo eo e , his class o p oblem includes o wa d-looking cons ain s,
3Aiyaga i e al. (2002), Angele os (2002), Bue a and Nicolini (2004), Lus ig, Slee , and Yel ekin (2008),
Fa aglia e al. (2019), Bhanda i e al. (2017b), and Bigio, Nuño, and Passado e (2023).

Quan i a i e Economics 15 (2024) A machine lea ning p ojec ion me hod 149
so he commonly used ecu si e ep esen a ion can no be adop ed. Ma ce and Ma i-
mon (2019) p o ide an al e na i e o mula ion o sol e o he ime-inconsis en op i-
mal con ac unde ull commi men : a ecu si e Lag angian o saddle-poin unc ional
equa ion. The solu ion in ol es adding e en mo e s a e a iables o he o iginal p ob-
lem. These addi ional s a e a iables, necessa y o ecu si y he p oblem, c ea e his o y
dependence. In his con ex , we use ou me hodology o ex end he li e a u e o s udy
op imal deb managemen wi h h ee and ou ma u i ies in a closed economy. We ind
ha he op imal policy p esc ibes an ac i e ole o he medium- e m bonds. The addi-
ional ma u i ies enable he planne o aise inancial e enue wi hou inc easing he o-
al ou s anding deb , in esponse o a posi i e expendi u e shock. We show ha , h ough
his mechanism, he go e nmen uses he addi ional ma u i ies o e ec i ely subsidize
he p i a e sec o in ecessions, esul ing in mo e leisu e and less ola ile labo axes.
The pape is o ganized as ollows. Sec ion 2is a use guide ha in oduces he eade
o PEA, machine lea ning, and how o combine hem in a simple Neoclassical In es -
men Model example. Sec ion 3in oduces he eade o he p oblem o mul icollinea -
i y using a one-bond economy s udied in Aiyaga i e al. (2002) and desc ibes he de-
ails o he NN-based expec a ions algo i hm using a gene al model wi h Nma u i ies.
Sec ion 4p esen s and discusses he calib a ion and he quan i a i e esul s o he ex-
ended model wi h h ee and ou ma u i ies. Sec ion 5discusses and compa es he NN-
based expec a ions algo i hm o o he s a e-o - he-a me hods. Sec ion 6concludes.
2. Use guide:Machine lea ning and PEA
This sec ion se es as an in oduc ion o supe ised machine lea ning. Speci ically, i
ocuses on how o use i o sol e a dynamic economic model in a simila ashion o PEA
wi h s ochas ic simula ion.4Hence, he pu pose o his sec ion is solely o in oduce he
me hodology in a simple en i onmen . The me hod allows us o in es iga e mo e eal-
is ic models o inc eased complexi y. I s bene i s a e highligh ed in he applica ion p e-
sen ed in Sec ion 3and a ise om he abili y o he algo i hm o app oxima e nonlinea
policy unc ions in he p esence o a la ge and mul icollinea s a e space.
2.1 En i onmen
The ypical dynamic model con ains in e empo al Eule equa ions, in a empo al Eule
equa ions, and laws o mo ion
In e (c ,X )=βEg(c +1,X +1)|X ,
In a(c ,X )=0,
X +1=h(X ,c ,ξ +1),
4Fo a gene al in oduc ion o machine lea ning, he eade can e e o Has ie, Tibshi ani, and F iedman
(2009). Fo a cou se ailo ed o economis s, he eade can e e o he lec u e no es by Jesús Fe nández-
Villa e de a ailable he e: h ps://www.sas.upenn.edu/~jesus / eaching.h ml.
150 Valai is and Villa Quan i a i e Economics 15 (2024)
whe e c ∈RCis a ec o o Ccon ols (wi h Edynamic choices and C−Es a ic choices),
X ∈RSis a ec o o endogenous and exogenous s a e a iables, β∈(0, 1)is a ime-
discoun ac o , In e :RC×RS→RE, In a :RC×RS→RC−E,g:RC×RS→RE,and
ξ +1∈RIis a ec o o inno a ion shocks. Fo example, in he s ochas ic neoclassical
in es men model, c co esponds o consump ion, In e co esponds o he ma ginal
u ili y o consump ion, In a does no apply i he model does no include in a empo al
choices (e.g., labo ), g≡ (c +1)(z +1αKα−1
+1+1−δ),X ≡{K ,z }is a ec o ha con ains
capi al s ock and TFP, and h(X ,c ,ξ +1)is a unc ion ha desc ibes he laws o mo ion
o capi al s ock, gi en by he esou ce cons ain K +1=(1−δ)K −c +z Kα
and he
TFP Ma ko p ocess, ha is,
X +1=h(X ,c ,ξ +1)=K +1
logz +1=(1−δ)K −c +z Kα
ρlogz +ξ +1.
The ypical PEA app oxima es he condi ional expec a ions in he in e empo al Eule
equa ions as polynomial unc ions o he s a e space X ,
∀e∈[1, E]:Ege(c +1,X +1)|X ≃Pn(X ;ηe).
The polynomial ypically used in he PEA is
Pn(X ;ηe)=expηe,0 +
P

p=1
S

s=1ηe,p,s·(lnXs, )p,
whe e ηe=[ηe,0,ηe,1,1,,ηe,1,S,]. Fo a gi en sequence o exogenous agg ega e
shocks {ξ }T
=1, an ini ial guess o he polynomials’ pa ame e s η1, he s anda d s ochas-
ic PEA (desc ibed in Algo i hm 1) aims o ind pa ame e s ηn={ηn
1,,ηn
E} ha sol e
all Eule equa ions and all laws o mo ion.
When X≡{X }T−1
=T0is gene a ed by a s ochas ic simula ion as in Algo i hm 1, hema-
ix XTXis o en ill-condi ioned.5Hence, wi h a ini e-p ecision compu e , he in e se
o XTXcanno be compu ed eliably and i is challenging o compu e he linea eg es-
sion in line 9 o Algo i hm 1. This p oblem po en ially leads o jumps in he eg ession
coe icien s and ailu e o con e ge.
Mo eo e , in he simple illus a i e case o he neoclassical in es men model, a i s -
o de polynomial (P=1) is enough o app oxima e he expec a ion e m in he Eule
equa ion. Gene ically speaking, iche models ha ea u e a la ge s a e space and non-
linea i ies equi e he use o highe -o de app oxima ion (P1) and/o c oss-s a e
e ms. These ci cums ances u he agg a a e he mul icollinea i y p oblem as he ma-
ix ˆ
XTˆ
X,wi h ˆ
X≡{X ,X2
,}T
=0, is e en mo e ill-condi ioned.
2.2 Supe ised machine lea ning
In his pape , we use machine lea ning as a ool o lea n how o ep esen he unc-
ion ha maps om he se o simula ed s a e a iables {X }T
=0 o he se o simula ed
5Le λ=λ1,,λSbe he ec o o eigen alues o he ma ix XTX,such ha λ1≥λ2≥ ··· ≥ λS≥0.
Ill-condi ioning e e s o he ac ha he a io λ1/λnis la ge, implying he ma ix is close o being singula .
Quan i a i e Economics 15 (2024) A machine lea ning p ojec ion me hod 151
Algo i hm 1 S ochas ic (simula ions) PEA.
P econdi ion: ini ial s a e X0,sequence{ξ }T
=0, ini ial guess η1
n, and dampening 0 <
w<1
1: while ηi
ncon e ges do
2: o ←0 oTdo Gene a e X≡{X }T
=0
3: c ←Sol e In a(c ,X )=0and In e (c ,X )=βPn(X ;ηn)
4: X +1←h(X ,c ,ξ +1)
5: end o
6: o ←0 oT−1do Gene a e Y≡{y }T−1
=0
7: y ←g(c +1,X +1)
8: end o
9: ˆηi
n←(XTX)−1XTYReg ess o ind new weigh s
10: ηi+1
n←w·ˆηi
n+(1−w)·ηi
nUpda e wi h dampening
11: end while
e ms {y }T−1
=0. Fo example, in he neoclassical in es men model wi h log-u ili y o e
consump ion, his would se e he pu pose o ep esen ing he unc ion
P(K ,z )=Ec−1
+1z +1αKα−1
+1+1−δ|K ,z .
Machine lea ning p oposes a lexible s uc u e o he unc ion Pand in e s a unc ion
om he gene a ed da a {X }T−1
=T0(which we label aining da a) o he se o gene a ed
examples {y }T−1
=T0(which we label aining examples). This pa icula ask o using ma-
chine lea ning o lea n a unc ion ha maps om inpu s o ou pu s based on aining
da a and examples is e e ed in he li e a u e as supe ised lea ning. And neu al ne -
wo ks a e a powe ul class o uni e sal app oxima o s able o deal wi h s ong nonlin-
ea i ies.
2.3 Fi ing neu al ne wo ks
In he NN-based expec a ions algo i hm, he equi alen o he eg ession phase is called
he aining phase. As desc ibed in Supplemen al Appendix C (Valai is and Villa (2024)),
a neu al ne wo k is cha ac e ized by unknown weigh s {w,ψ}.6Simila o a eg ession,
he objec i e is o seek weigh s such ha he neu al ne wo k i s he samples {X ,y }T−1
=0.
Mo e p ecisely, he p oblem is o ind
{w0,m,wm;m=1, 2, ,M},{ψ0,e,ψe;e=1, 2, ,E},
such ha he sum o squa es
R(w,β)=
E

e=1
T−1

=0y ,e−Fe(X ;w,ψ)2
6Appendix C con ains de ails abou he neu al ne wo k s uc u e used in his sec ion.
152 Valai is and Villa Quan i a i e Economics 15 (2024)
is minimized. In a s anda d linea eg ession se ing, ypically (bu no necessa ily) his
p oblem is sol ed analy ically. This p oblem could also be sol ed using a g adien i e a-
i e p ocedu e (e.g., g adien descen ). This app oach is ypically mo e obus o mul i-
collinea i y since i does no equi e in e ing he ma ix ˆ
XTˆ
X. An i e a ion no g adien
descen upda es he weigh s o he neu al ne wo k acco ding o
w(n+1)
m=w(n)
m−γ
K

k=1
∂Rk(w)
∂wm
,(1)
ψ(n+1)
e=ψ(n)
e−γ
K

k=1
∂Rk(w)
∂ψe
,(2)
whe e he g adien can be de i ed using he chain ule o di e en ia ion. Mo e speci -
ically, he pa ial de i a i es ∂Rk(w)
∂wmand ∂Rk(w)
∂βein equa ions (1)and(2) can be e i-
cien ly compu ed h ough a wo-pass algo i hm called backp opaga ion (Rumelha ,
Hin on, and Williams (1986)). Backp opaga ion applies he chain- ule sequen ially, i e -
a ing om he ou pu laye o he inpu laye . Each neu on in he hidden laye ecei es
and dispa ches in o ma ion only om and o neu ons ha a e di ec ly connec ed. Fo
his eason, his p ocess can be e icien ly pa allelized. When he backp opaga ion algo-
i hm is applied o a single-laye neu al ne wo k, i is known as he del a ule (Wid ow
and Ho (1960)). One cycle h ough he ull aining samples is called a aining epoch.
In o he wo ds, comple ing a aining epoch means ha all aining samples ha e had
a chance o upda e he model pa ame e s. Ba ch (o o line) lea ning builds he model
diges ing he en i e aining se a once, whe eas online aining allows he ne wo k o
upda e he weigh s as new obse a ions come in. The o me is ypically implemen ed
by ba ch g adien descen , when he la e can ypically handle la ge aining se s and
is implemen ed by s ochas ic g adien descen . When he neu al ne wo k weigh s a e
upda ed, he speed a which he model changes can be upda ed h ough he pa ame e s
γ in equa ions (1)and(2). The pa ame e γ is called he lea ning a e and i is simi-
la in spi i o a dampening pa ame e . In ui i ely, i ep esen s how quickly he model
“lea ns.” I can ei he be a cons an ( o ba ch lea ning) o op imized dynamically a
each upda e by minimizing he e o unc ion.
O he aspec s ha can a ec he i ing o he neu al ne wo k a e: (i) he ini ial
weigh s, (ii) he p oblem o o e i ing, (iii) inpu s no maliza ion, and (i ) he numbe
o neu ons. Ini ial neu al ne wo k weigh s a e chosen as nea ze o andom alues. Fig-
u e C.2 sugges s ha when he weigh αis close o ze o, he sigmoid app oaches a linea
unc ion. This choice o ini ial weigh s allows he model o adap o nonlinea i ies s a -
ing om he linea case.7In p ac ical e ms, we sol e he model by i s ini ializing he
neu al ne wo k o a simpli ied e sion o he model. Fo example, be o e sol ing he neo-
classical in es men model as desc ibed in Algo i hm 2, i is possible o sol e he model
analy ically (in his pa icula case, by se ing δ=1), simula e an equilib ium sequence
7Subs an ial esea ch e o has been pu in o choosing he ini ial weigh s depending on he speci ic
neu al ne wo k a chi ec u e (e.g., see Glo o and Bengio (2010) o deep neu al ne wo ks).
Quan i a i e Economics 15 (2024) A machine lea ning p ojec ion me hod 159
Figu e 3. Au oco ela ion unc ion o he equilib ium bond sequence. No e: The igu e shows
he au oco ela ion unc ion o bN
. The numbe s a e ob ained a e simula ing he model equi-
lib ium dynamics o T=5000.
whe e μ is he Lag ange mul iplie on he ime measu abili y cons ain , and ξU, and
ξL, a e he Lag ange mul iplie s on he uppe and he lowe bounds, espec i ely. By
issuing deb a ime , he go e nmen commi s o inc easing axes and/o o eissuing
deb a ime +N. When he go e nmen se s axes be ween ime and ime +N,i
needs o ake in o accoun i s pas ac ions in he o m o all lags o he s a e a iables up
o N. Mo e o mally, he Ramsey planne ’s s a e space X is
X =g ,{μ −i}N
i=1,bN
−iN−1
i=0.
The s a e space con ains 2N+1 a iables, wi h many lags o he same s a e a iable (e.g.,
μ), which end o be highly co ela ed wi h each o he . Mo eo e , equa ion (6) e eals
ha he Lag ange mul iplie on he implemen abili y cons ain μ ollows a andom
walk, c ea ing an addi ional sou ce o mul icollinea i y be ween he s a e a iables. We
sol e he model wi h ma u i y N=10, and we epo in Figu e 3 he au oco ela ion
unc ion o he simula ed equilib ium bond’s sequence {bN
}. I is clea ha he p e ious
10 lags o he same a iable, which a e all pa o he s a e space, a e highly co ela ed
wi h each o he in he simula ed sequence.
Fo his eason, he model is ha dly sol able using PEA (Algo i hm 1). In he li -
e a u e, his p oblem has been ackled by an algo i hm called condensed PEA. Con-
densed PEA p oposes o app oxima e he expec ed alues in equa ions ((5), (6), and
(7)) using unc ions o a subse XC
o he s a e space X (XC
is also called he co e
se ). These app oxima ions a e E (uc, +N)≃P1(XC
;η1),E (uc, +N−1)≃P2(XC
;η2)and
E (uc, +Nμ +1)≃P3(XC
;η3), whe e bo h he unc ions and he co e se (including i s
ca dinali y) a e ex an e unknown. The subse XCo he in o ma ion se Xis selec ed
h ough an i e a i e p ocedu e called condensed PEA. In essence, his me hod adds
an addi ional loop o PEA and keeps ex ac ing o hogonal componen s om he s a e
space, simila o he P inciple Componen Analysis (PCA), bu he numbe o ac o s
does no ha e o be chosen ex an e. A mo e de ailed desc ip ion o he p ocedu e can be

160 Valai is and Villa Quan i a i e Economics 15 (2024)
ound in Sec ion 5, Algo i hm 4, whe e we compa e ou me hodology o exis ing ones in
he li e a u e. In he nex sec ion, we p esen ou me hodology in a model wi h Nma-
u i ies. Due o he p esence o mul iple lagged bonds, he mul icollinea i y p oblem is
u he accen ua ed.
3.2 Op imal ma u i y managemen wi h Nbonds
The economy is popula ed by a ep esen a i e household wi h p e e ences o e con-
sump ion cand leisu e l. The ep esen a i e household chooses sequences o consump-
ion {c }∞
=0and leisu e {l }∞
=0 o maximize i s ime-0 expec ed li e ime u ili y:
E0
∞

=0
β u(c )+ (l ),
subjec o he budge cons ain :
N

i=1
pi
bi
+1+c =(1−τ )(1−l )+
N

i=1
pi−1
bi
,
whe e bi
indica es an i-pe iods ma u i y bond and pi
is i s co esponding p ice. The only
sou ce o agg ega e isk in he economy is an exogenous s eam o go e nmen expendi-
u es {g }∞
=0. In each pe iod, he go e nmen can inance g by: (i) le ying a p opo ional
labo ax τ and (ii) by issuing nons a e con ingen bonds wi h ma u i y 1, ,N.The
go e nmen ’s budge cons ain eads
N

i=1
pi−1
bi
=τ h −g +
N

i=1
pi
bi
+1.
3.2.0.1 Sequen ial o mula ion o he Ramsey p oblem Combining he echnology con-
s ain , c +g =h , wi h he household’s labo op imali y condi ion, 1 −τ = l, /uc, ,
yields an exp ession o su plus
s ≡τ h −g =c −(1−τ )h =c − l,
uc, (c +g ).
Subs i u e bonds p ices pi, , pinned down by he household’s Eule equa ions, o ge
N

i=1
bi
E βi−1uc, +i−1
uc, =s +
N

i=1
bi
+1E βiuc, +i
uc, ,
wi h bo owing and lending limi s17
∀i:¯
M≥bi
+1,M≤bi
+1,¯
M o al ≥
N

i=1
bi
+1,M o al ≤
N

i=1
bi
+1.
17 ¯
MN≥bN
+1is he go e nmen sa ing cons ain , which is equi alen o a household’s bo owing con-
s ain .
Quan i a i e Economics 15 (2024) A machine lea ning p ojec ion me hod 161
The op imali y condi ions a e
c :uc, − l, +μ uc, − l, +ucc, c+ ll, (c +g )
+
N

i=1
(μ −i−μ −i+1)bi
−i+1ucc, =0,
∀i,bi
+1:μ =[E uc, +i]−1E μ +1uc, +i+ξi
U,
βi−ξi
L,
βi+ξTo al
U,
βi−ξTo al
L,
βi,
μ :
N

i=1
bi
E βi−1uc, +i−1
uc, =s +
N

i=1
bi
+1E βiuc, +i
uc, ,
whe e ξU, and ξL, a e he Lag ange mul iplie s on he uppe and he lowe bounds, e-
spec i ely, and ξTo al
U, and ξTo al
L, a e he Lag ange mul iplie s on he uppe and he lowe
bounds on he o al bond po olio. In he ollowing sec ion, we desc ibe ou compu-
a ional s a egy in de ail. De ails on he implemen a ion and esul s using Eps ein–Zin
p e e ences can be ound in Appendix A.
3.3 NN-based expec a ions algo i hm
In his sec ion, we desc ibe he main algo i hm, which is an ex ension o he basic idea
illus a ed in Sec ion 2.4, applied o an op imal iscal policy model wi h incomple e ma -
ke s and mul iple ma u i ies. He e, we p esen he key s eps, while implemen a ion de-
ails can be ound in Appendix B.1. The e a e Nbonds a ailable wi h ma u i ies om 1
o Npe iods. The s a e space a ime is I ={g ,{{bi
−k}N−1
k=0}N
i=1,{μ −k}N
k=1}.Theneu-
al ne wo k needs o app oxima e E [uc, +i],E [μ +iuc, +i],andE [uc, +i−1]in unc ion
o I . We model hese ela ionships using one single-laye neu al ne wo k AN N (I ).In
pa icula , i he long ma u i y is N>1, hen he e ms o app oxima e a e
AN N i
1(I )=E[uc, +i|I ] o i=[1, ,N],
AN N i
2(I )=E[μ +1uc, +i|I ] o i=[1, ,N],
AN N i
3(I )=E[uc, +i−1|I ] o i=[1, ,N].
Fo example, in he wo-bond case he e a e six e ms o app oxima e and, i he sho
bond has 1 pe iod ma u i y, hey educe o i e.18 Gi en s a ing alues o μ and {bi
}N
i=1
and ini ial weigh s o AN N , simula e a sequence o {c }T
=1,{μ }T
=1and {{bi
+1}N
i=1}T
=1as
ollows:19
18Use Sand N o deno e sho - and long-bond ma u i ies, espec i ely. The six e ms a e E (uc, +N),
E (uc, +N−1),E (uc, +N−1μ +1),E (uc, +S),E (uc, +S−1), and E (uc, +Sμ +1). The e m ha does no equi e
app oxima ion in he la e case is E (uc, +S−1), which becomes jus uc, when S=1.
19The ne wo k can be ini ially ained using an educa ed guess o {bi
+1}N
i=1,c ,μ . I is impo an ha
he ini ial aining sequence is no cons an . Mo e de ails can be ound in Appendix B.1.
162 Valai is and Villa Quan i a i e Economics 15 (2024)
1. As sugges ed by Malia and Malia (2003), we ini ially es ic he solu ion a i i-
cially wi hin igh bounds on all deb ins umen s, and e ine he solu ion g ad-
ually while we open he bounds slowly. These bounds a e pa icula ly impo an
and ini ially need o be igh and open slowly, since he neu al ne wo k a he be-
ginning can only make accu a e p edic ions a ound ze o deb , ha is, ou ini ial-
iza ion poin . Addi ionally, we use penal y unc ions ins ead o he ξ- e ms o a oid
ou o bound solu ions.20 Since μ is iden i ied by he i s -o de condi ion o bi
,i
is o e iden i ied i he numbe o a ailable ma u i ies is g ea e han one:
∀i:μ =AN N i
1(I )−1AN N i
2(I )+ξi
U,
βi−ξi
L,
βi+ξTo al
U,
βi−ξTo al
L,
βi.
We ackle his p oblem by using he o wa d-s a es app oach desc ibed in Fa aglia
e al. (2019). This in ol es app oxima ing he expec ed alue e ms a ime +i
wi h unc ions o he s a e a iables ha a e ele an a +1 ins ead o and in-
oking he law o i e a ed expec a ions, such ha we calcula e E AN N i(I +1)in-
s ead o AN N i(I ).Thisisdonein wos eps.Fi s ,we eplace heAN N i(I ) e ms
in he op imali y condi ions wi h E AN N i(I +1)and, ins ead o app oxima ing
E (uc, +i),E (uc, +i−1),andE (uc, +iμ +1), we use he in o ma ion se I +1 o ap-
p oxima e E +1(uc, +i),E +1(uc, +i−1),andE +1(uc, +iμ +1). Then we use Gaussian
quad a u e o calcula e he condi ional expec a ions o he neu al ne wo k e alu-
a ed a I +1.
2. To pe o m he s ochas ic simula ion, choose Tbig enough and ind {c }T
=1,{μ }T
=1
and {{bi
+1}N
i=1}T
=1 ha sol e he ollowing sys em o (N+2)Tequa ions:
⎧
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎨
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎩
μ =E AN N i
1(I +1)−1
×E AN N i
2(I +1)+ξi
U,
βi−ξi
L,
βi+ξTo al
U,
βi−ξTo al
L,
βi,∀i,
uc, − l, +μ uc, − l, +ucc, c+ ll, (c +g )
+
N

i=1
(μ −i−μ −i+1)bi
−i+1ucc, =0,
N

i=1
bi
βi−1E AN N i
3(I +1)=uc, s +
N

i=1
bi
+1βiE AN N i
1(I +1).
(8)
The sys em o equa ions (8) con ains mul iple Lag ange mul iplie s (a ising om
he inequali y cons ain s). This poses a signi ican compu a ional challenge. Ide-
ally, one would nume ically sol e he uncons ained model and hen e i y ha
he cons ain s do no bind and i , o example, MNbinds, se bN
+1=¯
MNand ind
he associa ed alues o consump ion and leisu e. In a mul iple-bond model, his
is challenging because a e se ing bN
+1=¯
MN, one needs o check i o he con-
s ain s do no bind in he ecompu ed solu ion, and i hey do, en o ce hem and
20We also ind ha including ξ e ms explici ly in he aining se imp o es p edic ion accu acy. Mo e
de ails can be ound in Appendix B.1.
Quan i a i e Economics 15 (2024) A machine lea ning p ojec ion me hod 163
ecalcula e he solu ion again, and so on. To o e come his challenge, we augmen
he objec i e unc ion wi h he ollowing di e en iable penal y unc ion:
∀i:bi
+1=
⎧
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎨
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎩
φ
2·bi
+1−¯
Mi2
+log1+φ·bi
+1−¯
Midbi
+1i bi
+1>¯
Mi,
0i Mi≤bi
+1≤¯
Mi,
φ
2·Mi−bi
+12
+log1+φ·¯
Mi−bi
+1dbi
+1i bi
+1<Mi,
whe e φcon ols he se e i y o he penal y. Mo e de ails can be ound in Ap-
pendix B. The sys em o equa ions (8) can be ede i ed a e including he a o e-
men ioned penal y unc ion. We sol e he sys em o equa ions (8) using he
Le enbe g–Ma qua d algo i hm. Since his is a local sol e , he e is no gua an-
ee ha he sys em is sol ed globally gi en a pa icula ini ial guess. In ou imple-
men a ion, we a emp o sol e he sys em o a mos max ep numbe o di e en
s a ing poin s. I he solu ion e o s a e below ou speci ied h eshold, he algo-
i hm p oceeds wi h he solu ion and mo es o he nex pe iod . I he solu ion
e o s a e no below ou speci ied h eshold, we pick he solu ion wi h he lowes
e o .
3. I he solu ion e o in he s ochas ic simula ion is la ge, o a eliable solu ion could
no be ound, he algo i hm au oma ically es o es he p e ious pe iod neu al ne -
wo k and pe o ms he s ochas ic simula ion wi h a educed bound. Mo e speci -
ically, i an un eliable solu ion has been de ec ed in i e a ion i, he algo i hm e-
s o es he i e a ion i−1’s en i onmen and pe o ms he s ochas ic simula ion wi h
Boundi−1=α·Boundi−1+(1−α)·Boundi−2.
4. I he solu ion calcula ed sh inking he bound a i e a ion i−1 is s ill no sa is ac-
o y, he algo i hm does no go back ano he i e a ion bu uses he same neu al
ne wo k and ies o lowe he Boundi−1again owa d Boundi−2. Once a eliable
solu ion is ound, he algo i hm p oceeds o calcula e he solu ion o i e a ion i
again, bu wi h
Boundi=Boundi−1+(Boundi−1−Boundi−2).
In his way, i an e o is de ec ed mul iple imes we gua an ee ha bo h Boundi
and Boundi−1keep sh inking owa d Boundi−2, and he e should exis a poin
close enough o Boundi−2such ha he sys em can be eliably sol ed wi h bo h
Boundi−1and Boundi.
5. I he solu ion ound a i e a ion iis sa is ac o y, he neu al ne wo k en e s he
lea ning phase supe ised by he implied model dynamics, he bounds a e in-
c eased, and a new i e a ion s a s.
164 Valai is and Villa Quan i a i e Economics 15 (2024)
We epea his p ocedu e un il he neu al ne wo k p edic ions con e ge and he sim-
ula ed sequences o {bi
}N
i=1and c do no change.21 Algo i hm 3desc ibes he algo i hm
in g ea e de ail and Appendix B.1 con ains mo e de ails.
4. Nume ical esul s
In his sec ion, we exploi he compu a ional gains ha de i e om he obus ness o
mul icollinea i y o he NN-based expec a ions algo i hm o s udy he op imal ma u-
i y managemen p oblem o Sec ion 3wi h ou ma u i ies o 1, 5, 10, and 15 pe iods.
Speci ically, we a e in e es ed in he e ec s on policy and alloca ions a ising om he
addi ional hedging oppo uni ies wi h espec o a po olio wi h only a sho and a long
ma u i y. We i s p esen he calib a ion and hen ou nume ical esul s.
4.1 Calib a ion
We calib a e he model ollowing he s a egy o Fa aglia e al. (2019). Speci ically, we use
addi i ely sepa able u ili y in consump ion and leisu e
u(c)=c1−γ
1−γ, (l)=χl1−ηl
1−ηl
wi h γ=1.5 and ηl=1.8, espec i ely. We calib a e χsuch ha households spend on
a e age 2/3 o hei ime endowmen on leisu e in he s eady s a e, which gi es a alue
o 2.87.
We se β o 0.96 and o he sake o compa ison, we ollow he calib a ion s a egy
o g om Fa aglia e al. (2019). We assume ha g ollows an AR(1) p ocess g =μg+
ρgg −1+ , ∼N(0, σ2
g)wi h ρgequal o 0.95. Then we look o he alue o μgsuch ha
go e nmen expendi u e is on a e age equal o 25% o GDP. This gi es a alue o 0.0042.
Las ly, we se he alue o σgsuch ha g is always a leas 15% and a mos 35% o GDP
in a simula ed sample o en housand pe iods, which gi es a alue o 0.0031. No e ha
such pa ame e iza ion is also b oadly aligned wi h he es ima es om he da a.22
The go e nmen has ou deb ins umen s a i s disposal. We se ma u i ies o 1, 5,
10, and 15 yea s and deno e b1,b5,b10,b15 as sho , medium, and long and e y long
bonds, espec i ely. In addi ion o deb limi s on indi idual bonds, we in oduce a o al
deb limi o ±100% o GDP bo h in ou benchma k model wi h only sho and long
bonds and in ou calib a ion wi h ou bonds. A ixed limi on o al deb allows us o
make a ai compa ison and isola e he e ec s o he hedging bene i s o he addi ional
bond on he household’s wel a e. Table 1summa izes he pa ame e alues.
Be o e p oceeding, i is wo h no ing ha we es ed ou me hodology wi h he wo-
bond case. Ou esul s in a wo-bond model con i ms he indings o Angele os (2002)
and Fa aglia e al. (2019), whe e he op imal deb po olio includes a nega i e sho
bond posi ion and a posi i e long bond posi ion, as shown in Table 2. Mo eo e , as also
21The e is no need o check μ , which can be backed ou analy ically om he i s -o de condi ion o c .
22We ob ain e y simila es ima es using he sum o go e nmen consump ion and g oss in es men
om he NIPA ables.

Quan i a i e Economics 15 (2024) A machine lea ning p ojec ion me hod 165
Algo i hm 3 NN-based expec a ions algo i hm applied o op imal ma u i y manage-
men .
P econdi ion: pa ame e s om Table 1; u ili y unc ions u(c)=c1−γ
1−γ,uc(c)=c−γ,i=0,
Bound(0)=0.
1: Simula e AR(1) p ocess
2: g +1←μg+ρg·g + +1
3: C ea e and ain he NN using ini ial condi ions
4: Ne ← eed o wa dne (Num. Neu ons)
5: Sol e he model
6: while Bound(i)<B
max OR Ou o BoundI e <NumOu o Bound do
7: Gene a e {c }T
=1,{μ }T
=1,and{{bi
+1}N
i=1}T
=1
8: o ←1 oTdo
9: o ←1 o max ep do
10: xg←{c( )guess,b( )1
guess,,b( )N
guess}
11: {c ( ),μ ( ),{bi
+1( )}N
i=1, esiduals
( )}←Sol e (8)|{AN N (I +1),Bound
(i),xg}
12: end o
13: ∗←min esiduals( )
14: {c ,μ ,{bi
+1}N
i=1}←{c ( ∗),μ ( ∗),{bi
+1( ∗)}N
i=1}
15: end o
16: i esiduals( ∗)> h eshold hen Res a om line 7 wi h a smalle bound
17: end i
18: T ain he NN using he new simula ed sequences
19: I ←{g ,{{bi
−k}N−1
k=0}N
i=1,{μ −k}N
k=1}
20: RHSi
1, ←uc, +i o i=[1...N]
21: RHSi
2, ←μ +iuc, +i o i=[1...N]
22: RHSi
3, ←uc, +i−1 o i=[1...N]
23: Ne ← ain(Ne , I +1,RHS
)
24: Checking con e gence and upda ing {bi
old, }N
i=1and cold,
25: e o b←max(|{bi
old, }N
i=1−{bi
}N
i=1|)
26: e o c←max(|cold, −c |)
27: i max(e o b,e o
c)< hen B eak
28: end i
29: {bi
old, }N
i=1←{bi
}N
i=1
30: cold, ←c
31: Bound(i)←Bound(i)+BoundS ep
32: i Bound(i)>¯
M hen
33: Bound(i)←¯
M
34: Ou o BoundI e ←Ou o BoundI e +1
35: end i
36: i←i+1
37: end while
166 Valai is and Villa Quan i a i e Economics 15 (2024)
Table 1. Calib a ed pa ame e s.
Pa ame e Value
P e e ences Discoun ac o β0.96
Risk a e sion γ1.5
Labo disu ili y χ2.87
Leisu e cu a u e ηl1.8
Go e nmen A e age g μg0.0042
Vola ili y o g σg0.0031
Au oco . o g ρg0.95
Deb limi s ¯
M,M,¯
M o al,M o al ±100% o GDP
shown in Table 2, he bond po olio posi ions a e la ge and ola ile as in Bue a and
Nicolini (2004).
4.2 Op imal deb managemen wi h h ee and ou bonds
Tables 2and 3summa ize he equilib ium ou s anding deb - o-GDP a io o each ma-
u i y and o each model wi h an inc easing numbe o bonds. Momen s a e calcu-
la ed gi en a sequence o go e nmen expendi u e shocks wi h pe sis ence and ola ili y
speci ied in Table 1.
As shown in Tables 2and 3, he op imal policy includes an ac i e use o all a ail-
able ma u i ies. Table 2shows ha he a e age posi ion o each ma u i y is signi ican ly
di e en om ze o and ha bond posi ions a e ola ile, sugges ing hei ac i e use e-
sponding o expendi u e shocks. Table 3shows he co ela ions o all he ma u i ies wi h
go e nmen expendi u e and among hemsel es. Fi s , i shows he posi ion o sho
ma u i y is posi i ely co ela ed wi h expendi u e shocks while he o he ma u i ies a e
nega i ely co ela ed. Second, sho ma u i y is nega i ely co ela ed wi h all o he ma-
u i ies. These wo oge he sugges ha , in addi ion o holding a le e aged po olio on
a e age, i is op imal o ebalance he po olio owa d sho e ma u i ies. As shown in
Table 2. Selec ed bond momen s: means and a iances.
Model E(b1/GDP)E(b5/GDP)E(b10/GDP)E(b15/GDP)
1 Bond 0.017 - - -
2Bonds −0.03 - 0.343 -
3Bonds −0.555 0.704 0.632 -
4Bonds −0.63 0.884 0.908 −0.173
σ(b1/GDP)σ(b5/GDP)σ(b10/GDP)σ(b15/GDP)
1 Bond 0.243 - - -
2 Bonds 0.1 - 0.122 -
3 Bonds 0.591 0.34 0.533 -
4 Bonds 0.218 0.266 0.27 0.374
No e: The able shows he a e age ou s anding deb o each ma u i y. Mo eo e , he able also epo s he s anda d de i-
a ions o each ou s anding posi ion.
Quan i a i e Economics 15 (2024) A machine lea ning p ojec ion me hod 167
Table 3. Selec ed bond momen s: co ela ions.
Model ρ(g ,b1
)ρ(g ,b5
)ρ(g ,b10
)ρ(g ,b15
)
1 Bond 0.549 - - -
2 Bonds 0.707 - −0.482 -
3Bonds 0.35 −0.181 −0.302 -
4 Bonds 0.762 −0.094 −0.212 −0.22
ρ(b1
,b5
)ρ(b1
,b10
)ρ(b10
,b5
)ρ(b15
,b1
)ρ(b15
,b5
)ρ(b15
,b10
)
1Bond----- -
2Bonds - −0.796 - - - -
3Bonds −0.944 −0.985 0.931 - - -
4Bonds −0.458 −0.565 0.918 0.047 −0.877 −0.82
No e: The able shows he co ela ions be ween each ma u i y o ou s anding deb and go e nmen expendi u e. Mo eo e ,
he able also epo s he c oss-co ela ions among he bonds.
Table 4, he addi ional hedging bene i s o he addi ional ma u i ies a e e lec ed in a
highe a e age leisu e and a lowe consump ion ola ili y, while he economy sus ains
a lowe a e age consump ion. Labo ax ola ili y and au oco ela ion also dec ease sig-
ni ican ly, while he a e age le el ises.
Nex , we inspec he economic mechanism o how hedging bene i s p o ided by he
addi ional ma u i ies a ec household alloca ions and axes. As known since Angele-
os (2002), di e ences in long and sho bond p ices p o ide a ool o hedge agains
shocks by bo owing in long bonds and accumula ing asse s in he sho e m. Since
long p ices a e mo e ola ile han sho p ices, when a nega i e shock hi s, he alue o
go e nmen liabili ies alls mo e han he alue o go e nmen asse s, hus p o iding in-
su ance agains nega i e shocks. In addi ion o dec easing he go e nmen ’s liabili ies,
he di e en ial esponse o long and sho p ices also a ec s he e ms o issuing new
deb . Since long p ices all mo e han sho e ones, i becomes cheape o he planne
o ob ain unds by issuing sho e deb . This is why we obse e po olio ebalancing
and a nega i e co ela ion be ween he long and sho bonds.
Table 5shows how op imal deb managemen a ec s go e nmen inances as we
inc ease he numbe o deb ins umen s.
To inspec how his ebalancing ma e s o he go e nmen ’s budge , we decom-
pose go e nmen income in o labo ax income and ne inancial income, which is he
in low om issuing new bonds minus he ou low due o ou s anding deb . Mos im-
Table 4. Alloca ions and policies.
Model E(c )σ(ln(c )) E(l )σ(ln(l )) E(τ )σ(ln(τ )) ρ(ln(τ ),ln(τ −1))
1 Bond 0.252 0.029 0.666 0.006 0.247 0.121 0.971
2 Bonds 0.250 0.029 0.668 0.004 0.255 0.106 0.929
3 Bonds 0.248 0.028 0.670 0.005 0.27 0.10 0.914
4 Bonds 0.247 0.027 0.671 0.006 0.274 0.091 0.841
No e: The able shows he e ec s o he op imal policy on consump ion and leisu e as he numbe o bonds inc eases.
168 Valai is and Villa Quan i a i e Economics 15 (2024)
Table 5. Go e nmen income and bo owing.
Desc ip ion Momen 1 Bond 2 Bonds 3 Bonds 4 Bonds
Co . Deb /GDP and g ρ(ibi
y ,g )0.547 0.136 −0.079 −0.131
Co . Ne Financial Income
and g
ρ(i(pi
bi
+1−pi−1
bi
),g )0.186 0.405 0.416 0.511
Co . Ne Financial Income
(cons an p ice) and g
ρ(i(E(pi
)bi
+1−E(pi−1
)bi
),g )0.078 0.11 −0.103 0.019
A . Ne Financial Income (%) E(ipi
bi
+1−pi−1
bi
y )−0.142 −0.845 −2.213 −2.569
A . Labo Tax Income (%) E(τ (1−l )
y )24.7 25.5 27.0 27.4
No e: The able shows selec ed momen s om he models wi h one, wo, h ee, and ou ma u i ies. The i s ow shows
he co ela ion be ween he ou s anding deb /GDP a io and expendi u e shocks. Rows wo and h ee show he co ela ion
be ween go e nmen inancial income and expendi u e shocks. The las wo ows show he a e age ne inancial income and
he a e age labo ax income. Ne Financial Income is de ined as he in low om issuing new deb a he ne o he cos o buy-
ing back he ou s anding deb . Ne Financial Income (cons an p ice) is he coun e ac ual and co esponds o Ne Financial
Income holding bond p ices ixed a hei a e age alues.
po an ly, as he numbe o ma u i ies inc eases, he co ela ion be ween o al deb and
go e nmen expendi u es changes sign, as shown in he i s ow o Table 5.
In he one- and wo-bond economy, he go e nmen bo ows om he p i a e sec-
o o inance expendi u e shocks. In he h ee- and ou -bond economy, he go e n-
men educes i s o al deb o subsidize he p i a e sec o and smoo h i s consump ion.
A he same ime, ne inancial income becomes e en mo e posi i ely co ela ed wi h g
and allows o smoo he labo axes, despi e a alling o al deb in bad imes. The educ-
ion o o al deb oge he wi h ising inancial income is achie ed p ecisely because he
planne holds le e aged posi ions and esponds o expendi u e shocks by subs i u ing
o sho bonds.
As u he e idence o his mechanism, we cons uc a coun e ac ual measu e o
ne inancial income assuming ha bond p ices we e ixed a hei mean alues. The
coun e ac ual co ela ion is epo ed in he hi d ow o Table 5. The low co ela ion
he e sugges s ha he como emen be ween ne inancial income and go e nmen ex-
pendi u es is achie ed by exploi ing he di e en ial esponse o sho , medium, and long
p ices. This indica es ha i p ices we e cons an , po olio ebalancing would ha e li le
e ec on he cyclicali y o inancial income and he go e nmen ’s budge .
Looking a he a e ages in ows ou and i e, we see ha as he numbe o ma u i ies
inc eases, he go e nmen becomes a ne paye o he p i a e sec o and collec s a la ge
sha e o i s income in labo axes. This happens because he inc ease in labo axes ou -
weigh s he dec ease in a e age labo supply. Al hough a e age household labo income
alls, he household is compensa ed o holding go e nmen deb .
5. Compa ison wi h al e na i e me hods
The e a e o he simula ion-based nume ical me hods designed o add ess he issue o
mul icollinea i y among s a e a iables. In his sec ion, we discuss and compa e ou
me hod o he wo mos p ominen ones: he Condensed PEA (C. PEA) used in Fa aglia