Multi Stage Stochastic Programming
Kourosh MarjaniRasmussen
∗
and Jens Clausen
†
August 24,2004
Abstract
We consider the dynamics of the Danish mortgage loan system and
proposeseveralmodelstoreectthechoicesofamortgagoraswellas
his attitude towardsrisk. The models are formulated as multi stage
stochasticintegerprograms,whicharediculttosolveformorethan
10 stages. Scenario reduction and LP relaxation are used to obtain
near optimal solutionsfor large problem instances. Our results show
that the standard Danish mortgagor should hold a more diversied
portfolioofmortgageloans,andthatheshouldrebalancetheportfolio
morefrequentlythancurrentpractice.
1 Introduction
1.1 The Danish mortgage market
The Danish mortgage loan system is among the most complex of its kind
intheworld. Purchaseof mostpropertiesinDenmarkis nancedbyissuing
xedrate callable mortgagebondsbasedon an annuity principle.It is also
possibletoraiseloans,whicharenancedthroughissuingnoncallable short
term bullet bonds. Such loans may be renanced at themarket rate on an
ongoingbasis. Theproportion of loansnanced byshortterm bulletbonds
hasbeen increasing since 1996. Furthermore it is allowed to mix loans in a
mortgageloan portfolio, but this choice hasnot yetbecomepopular.
Callable mortgage bonds have a xed coupon throughout the full term of
theloan. Thematurities are10, 15,20 or 30 years.Theborrower hasacall
∗
Informatics and Mathematical Modelleing, Technical University of Denmark, Bldg.
305,DK-2800Lyngby,Denmark.kmr@imm.dtu.dk
†
Informatics and Mathematical Modelleing, Technical University of Denmark, Bldg.
305,DK-2800Lyngby,Denmark.jc@imm.dtu.dk
thelifetimeof theloan. When theinterestrates are lowthecall option can
be usedto obtaina new loanwith lessinterest payment inexchange for an
increaseintheamountofoutstandingdebt.Theborrowerhasalsoadelivery
option.When the interest rates are highthis option can be used to reduce
theamount ofoutstanding debt,inexchangefor paying higherinterest rate
payments. There are both xed and variable transaction costs associated
withexercisinganyof theseoptions.
Noncallable shortterm bullet bonds are used to nance the adjustable
rate loans. The bonds' maturities range from one to eleven years and the
adjustablerate loans are oered as 10,15, 20 or 30year loans. Since 1996
themostpopularadjustablerateloanhasbeentheloannancedbytheone
yearbond.From 2001,however, therehasbeena newtrend, where demand
for loans nanced by bullet bonds with 3 and 5year maturities has risen
substantially.
1.2 The mortgagor's problem
It is known on the investor side of the nancial markets that investment
portfolios shouldconsistofavarietyofinstrumentsinorderto decreaserisk
whilemaintainingprotability. Theportfoliois alsorebalanced regularlyto
take best advantage ofthemoves inthemarket.
Theportfolio diversicationprinciple and rebalancingis, however, notcom-
moninthe borrowerside ofthe mortgage market. Mostmortgagors nance
their loans in one type of bond only.Besides they do not always rebalance
theirloan whengoodopportunitiesfor this have arisen.
There aretwomajor reasonsfor the mortgagors reluctance to better taking
advantage of their options (that they have fully paid for) through the life
timeofthe mortgage loan.
1. The complexity of the mortgage market makes it impossible for the
average mortgagorto analyzeallthealternativesandchoosethebest.
2. Themortgagecompaniesdonotprovideenoughquantitativeadviceto
theindividualmortgagor. Theyonlyprovide generalguidelines,which
are normally not enough to illuminate all dierent options and their
consequences.
Thecomplexityof the mortgageloan systemmakesit a nontrivial taskto
decide on an initial choice of mortgageloan portfolioand on nding a con-
tinuingplanto readjust theportfoliooptimally.There existsasof today no
functionaloptimization modeltoprovidedecisionsupportfortheindividual
mortgagoron hischoice ofloan.
a mortgage loan market such as the Danish one, aswell as the basic ideas
behind themathematical modeling concept ofstochasticprogramming.
TheDanishmortgagor'sproblemhasbeenintroducedbyNielsenandPoulsen
(N&P,[12]).Theyhavedevelopedatwofactortermstructuremodelforgen-
eratingscenariosandontopofithavebuiltamultistagestochasticprogram
to nd optimal loan strategies. The article, however, does not describe the
details necessary to have a functional optimization model, and it does not
dierentiate between dierent types of risks in the mortgage market. The
main contribution of this article is to make Nielsen & Poulsen's model op-
erational byreformulating parts of their model and adding new featuresto
it.
We reformulate the Nielsen & Poulsen model in section 2. In section 3 we
modeldierent options available to the Danish mortgagor, and insection 4
wemodelmortgagor'sriskattitudes.Hereweconsiderbothmarket riskand
wealth risk.
Inthe basic modelweincorporate xedtransaction costsusing binaryvari-
ables. We usea noncombining binomial tree to generate scenarios ina 11
stageproblem. Thisresultsin51175binaryvariables,makingsome versions
of the problem extremely challenging to solve. Dupa
c ˇ
ová, GröweKuska, Heitsch and Römisch (Scenred, [7 , 8]) have modeled the scenario reduc-tionproblem asa setcovering problem andsolvedit using several heuristic
algorithms. We review these algorithms in section 5 and use them in our
implementation to reducethesizeof the problemandherebyreducetheso-
lutiontimes. Anotherapproachtogettingshortersolutiontimesisproposed
insection6,where we solveanLPapproximated versionoftheproblem.In
section7wediscuss andcommenton ournumericalresults andweconclude
thearticle withsuggestions forfurther research insection8.We useGAMS
(General Algebraic Modeling Language) tomodeltheproblemand CPLEX
9.0astheunderlying MPandMIPsolver.Forscenario reductionwe usethe
GAMS/SCENRED module(scenredmanual,[9 ]).
TheobtainedresultsshowthattheaverageDanishmortgagor wouldbenet
fromhisoptionofmixingloansinhisloanportfolio.Likewiseheshouldread-
justtheportfoliomoreoftenthanisthecasetoday.Thedevelopedmodeland
softwarecanalsobeusedtodevelopnewloanportfolioproducts.Suchprod-
uctswillconsidertheindividualcustomerinputssuchasbudgetconstraints,
riskprole,expectedlifetimeof theloan, etc.
Even thoughwe considertheDanish mortgageloanmarked, theproblemis
universalandthepractitionersinanymortgageloansystemshouldbeableto
usethemodels developed inthisarticle,possiblywithminor modications.
In this section we develop a riskneutral optimization model which nds a
mortgageloanportfoliowiththeminimumexpectedtotalpayment.Consider
thescenariotree ingure(1). We assumethat we have sucha treeat hand
withinformation on price andcoupon ratefor all mortgage bondsavailable
at each node together with the realization probability of a given node at a
given time.
n=2
n=4
n=5 t = 1
t = 0 t = 2
n=3 n=1
n=6
n=7
t = 3 n=8
n=9
n=10
n=11
n=12
n=13
n=14
n=15 4:C32−04/98.3
1:C29−05/105.4
1:C28−05/93.7 2:C31−06/98.4 1:C28−05/93.7 3:C31−06/98.4
1:C28−05/96.9 3:C31−06/100.7
1:C28−05/93.7 3:C31−06/98.4
1:C28−05/96.9 3:C31−06/100.7
1:C28−05/96.9
1:C28−05/108.4 2:C31−06/92.5 1:C28−05/84.4
4:C31−04/101.4 4:C31−04/94.2 1:C31−05/96.8
1:C30−05/92.35
1:C30−05/101.8
2:C32−06/95.3 1:C29−05/88.8
3:C32−06/98.7 1:C29−05/95.4
3:C32−06/98.7 1:C29−05/95.4
Figure 1: Abinomial scenario tree,representing ourexpectation offuturebond prices
andcouponrates.Allbondsarecallablexedratebonds.
In the basic model we only consider xedrate loans, i.e. loans where the
interest rate does not change during the lifetime of the loan. For the sake
ofdemonstration we consider anexample with4 stages,
t ∈ { 0, 1, 2, 3 }
,and15 decisionnodes,
n ∈ { 1, · · · , 15 }
,with theprobabilityp n for being at the
node
n
.Inorderto make our modelindependent of theunderlying scenario structure we capture the dependency between any time step and its nodesinthe set
tn(t, n)
,wheren ∈ { 2 t , · · · , 2 t+1 − 1 }
forallt
.Similarlywe deneaset
tree(n 0 , n)
to dene aparent-child relationship.1
We want the basic model to be able to nd an optimal portfolio of bonds
1
Most modelinglanguages facilitate aneasy way to declare suchsets. In GAMSfor
exampleonecandenetwosets
t
andn
andthendeclaretn(t, n)
andtree(n, n)
as:settn(t,n)timenodemapping/t0.(n1),t1.(n2*n3),t2.(n4*n7)/,
tree(n,n)parentchildmapping/n1.(n2*n3),n2.(n4*n5),n3.(n6*n7)/;
the4 bondsshown ingure (1). Each bond isrepresented as (Index:Type
Coupon/Price), so(3:C3206/98.7) isa xedratecallablebond withmatu-
rityafter 32 periods,a coupon rate of6% and a price of 98.7. Theletter
C
indicates that thebond is callable,so theprepayment price is never higher
than par.
To generate bondsinformation we can useterm structure and bond pricing
theories (see [10, 11, 4] for an introduction to these topics and further ref-
erences to articles.). It is also possible to use expert knowledge to predict
possible bondpricesinthefuture. A combination oftheoreticalpricing and
expertinformation can also be usedtogenerate suchscenariotrees. Nielsen
and Poulsen (N&P,[12])have proposedone way togenerate ascenario tree
for the Danishmortgagorproblem.
Given that we have a scenario tree with
N
stages at hand we can nowformulate theoptimization problem.We rstconsidertheparameters ofthe
optimization model:
p n:Theprobabilityof being atnode n, ∀ n ∈ { 1, · · · , 2 N − 1 }
.
τ n: Discount factorat noden
.
n
.IA
:Theinitial amount of loanneededbythemortgagor.r in:Coupon rate forbondi
atnode n
.
k in:Price ofbond i
at node n
.
i
at noden
.Callk in:Priceofacallablebondi
atnoden
.WehaveCallk in = min { 1, k in }
for callablebondsand
Callk in = k in fornoncallable bonds.
γ
:Tax reductionratefrom interestrate payment.β
:Tax reductionratefrom administrationfees.b
: Administration fee rates given as a percentage of outstanding debt for bondi
at noden
.η
:Transaction fee ratesfor sale and purchaseof bonds.m
:Fixed costsassociated withrenancing.Next we dene the variables usedinour model:
B tn:Total netpayment at node n
,time t
.
X itn:Outstanding debtofbond i
at node n
,timet
.
S itn:Unitssold ofbondi
at scenario n
,time t
.
P itn:Unitspurchasedof bond i
at node n
,timet
.
A itn: Principalpayment ofbondi
atnode n
,timet
.
L itn :
i
at scenarion
,timet
.P itn:Unitspurchasedof bond i
at node n
,timet
.
A itn: Principalpayment ofbondi
atnode n
,timet
.
L itn :
i
atnoden
,timet
.L itn :
1
ifthereare anyxed costsassociated withbondi,
noden
,timet.
0
otherwise.min X
tn(t,n)
p n · τ n · B tn
(1)X
i
k i1 · S i01 ≥ IA
(2)X i01 = S i01 ∀ i
(3)X
tree(n 0 ,n)
X i,t−1,n 0 − A i,t−1,n 0 − P itn + S itn − X itn
= 0 ∀ i, tn(t \ 0, n \ 1)
(4)X
i
(k in · S itn ) = X
i
(Callk in · P itn ) ∀ tn(t \ 0, n \ 1)
(5)A itn = X itn h r in
1 − (1 + r in ) −N +t − r in i
∀ i, tn(t, n)
(6)B tn = X
i
A itn + r in · (1 − γ)X itn +
b · (1 − β)X itn + η · (S itn + P itn ) + m · L itn
∀ tn(t, n)
(7)BigM · L itn − S itn ≥ 0 ∀ i, tn(t, n)
(8)X itn , S itn , P itn ≥ 0 , L itn ∈ { 0, 1 } ∀ i, tn(t, n)
(9)Theobjective isto minimize the weighted averagepayment throughout the
mortgageperiod.Thepayment ateachnodeisdenedinequation(7)asthe
sum of principal payments, tax reduced interest payments, taxed reduced
administration fees, transaction fees for sale and purchase of bonds and -
nallyxedcostsforestablishingnewmortgageloans.Theprincipalpayment
isdened inequation(6) asanannuitypayment.
The dynamics of the model are formulated in constraints (2) to (5). Con-
straint (2)makessurethatwe sellenough bondsto raiseaninitial amount,
IA
, neededbythe mortgagor. In equation (3)we initialize theoutstanding debt. Equation (4) is the balance equation, where the outstanding debt atanychildnodeforanybondequalstheoutstandingdebtattheparent node
minus principal payment and possible prepayment (purchased bonds), plus
possiblesoldbondstoestablishanewloan.Noticethatthemodelisindepen-
dent oftheunderlyingscenariotree.Useoftheset
tree(n 0 , n)
inthebalanceequation(4)guaranteesthatanytreestructure,denedintheset
tree(n 0 , n)
canbeusedtoformthebalanceequations. Thisformulationofthemodelis
very usefulwhen we want to reduce the number of scenarios intheoriginal
scenariotree.Equation(5)isacashowequationwhichguaranteesthatthe
money usedto prepaycomes fromthesale of newbonds.
Finallyconstraint(8)addsthexedcoststothenodepayment,ifweperform
anyreadjustingofthe mortgageportfolio.The
BigM
constant might be settoavalueslightly greaterthan theinitial amountraised.Ifatoolargevalue
isused, numerical problems mayarise.
Themodelof section2hasthree implicitassumptionswhich limit itsappli-
cability:
1. Weassumethataloanportfolioisheldbythemortgagoruntiltheend
ofhorizon.
2. We assumethatall bondsarexedrateand callable,i.e. theycan be
prepaidat anytime at a priceno higher than 100.
3. Themortgagor isassumedto be riskneutral.
We will relaxthe rst two assumptions in this section and the third inthe
following section.
Therstassumptioncanbeeasilyrelaxedbyintroducingaconstant
T
asthenumber of decision stages until the prepayment of the loan portfolio, such
that
T ≤ N
,whereN
is the horizon.The decision nodesrepresent only therst
T
stages, while the horizon remains asN
.It means that the principaland interest payments are calculated with the horizon
N
, whereas we onlyconsiderthe rst
T
stagesintheproblem.Thesechangesmean thatthe outstandingdebtat stage
T
is now apositiveamount. We dene thisprepayment amount (
P P T n) as:
P P T n = X
i
(X iT n − A iT n ) ∀ n ∈ { 2 T −1 , · · · , 2 T − 1 }
(10)We add this equation to the model and we update the object function as
follows:
min X
tn(t,n)
p n · τ n · B tn +
tn(t=T,n=2 X T −1) tn(t=T,n=2 (T−1) )
p n · τ n · P P tn .
(11)Withthis objectfunction we are now minimizing theweightedpayment at
allnodesplus the weightedaverage amount of prepayment attime
T
.The problem with the second assumption is more subtle. Consider thesce-
nariotreeat gure(2),where twoadjustablerateloans have been addedto
oursetofloansattime0.Loan5(F1)isanadjustablerateloanwithannual
renancingandloan6(F2)isanadjustablerateloanwithrenancingevery
secondyear
For adjustablerate loans (Fmloans) the underlying
m
year bond is com-pletelyrenancedevery
m
yearsbysellinganotherm
yearbond.Butunlikenormalrenancingthis kindofrenancing doesnot incuranyextraxedor
n=2
n=4
n=5 t = 1
t = 0 t = 2
n=3 n=1
n=6
n=7
t = 3 n=8
n=9
n=10
n=11
n=12
n=13 n=14
n=15 1:C30−05/92.35
5:F1−06/101.2 6:F1−04/95.8
1:C31−05/96.8 5:F1−04/99.1 6:F2−04/98.2
1:C30−05/101.8 5:F1−02/99.1 6:F1−04/104.7
1:C29−05/88.8 2:C32−06/95.3 5:F1−08/102
6:F2−08/100.6
1:C29−05/95.4 5:F1−04/99.2
1:C29−05/95.4 3:C32−06/98.7
3:C32−06/98.7 5:F1−04/99.2
6:F2−05/100.1
6:F2−05/100.1
5:F1−01/99.2 6:F2−03/101.2 4:C32−04/98.3 1:C29−05/105.4
1:C28−05/93.7 2:C31−06/98.4
5:F1−07/99.6 6:F1−08/103.2 1:C28−05/93.7
3:C31−06/98.4 5:F1−07/99.6
1:C28−05/96.9 3:C31−06/100.7
5:F1−03/99.9 6:F1−05/105.4 1:C28−05/93.7
3:C31−06/98.4
5:F1−07/99.6
1:C28−05/96.9 3:C31−06/100.7
5:F1−03/99.9 6:F1−05/105.4 1:C28−05/96.9 5:F1−03/99.9
6:F1−03/98.6
1:C28−05/108.4 5:F1−01/102.4 6:F1−03/108.4 5:F1−10/101.5 6:F1−08/97.8 2:C31−06/92.5 1:C28−05/84.4
4:C31−04/101.4 6:F1−05/102.9
6:F1−05/102.9
4:C31−04/94.2
Figure2:Abinomialscenario treewherebothxedrateandadjustablerate loansare
considered.
variable transaction costs. We modelthatbyusing thesame loan index for
anadjustablerateloanthroughout themortgageperiod.Forexampleindex
5isusedfor theloanwithannualrenancing,eventhough theactualbonds
behind the loanchange every year. Since we usethesame index, themodel
doesnot register anyactual sale or purchase ofbondswhen renancing oc-
curs.Weshould,however,readjusttheoutstandingdebtgiventhatthebond
price isnormally dierent from par.To take this into account we introduce
theset
i 0 of noncallable adjustablerate loans. For these loans we use the following balance equationinstead ofequation (4).
X
tree(n 0 ,n)
X i 0 ,t−1,n 0 − A i 0 ,t−1,n 0 − P i 0 tn + S i 0 tn − k i 0 n · X i 0 tn
= 0 ∀ i 0 , tn(t \ 0, n \ 1).
(12)
Notethat variables
P i 0 tn and S i 0 tn remain0 aslongwekeep an adjustable
rateloan
i 0 inourmortgageportfolio.Theoutstandingdebtinthechildnode ishoweverrebalanced bymultiplying the bondprice.
Whenweconsiderthe adjustablerateloanswe shouldrememberthatthese
loansarenoncallable,soforprepayment purposeswehave:
Callk i 0 n = k i 0 n.
Anotherissuetobedealtwithisthatifabondisnotavailableforestablishing
a loan at a given node, we have to set the corresponding value of
k in to 0
to make sure thatthe bond isnot sold at thatnodeinan optimal solution.
prepayment.
4 Modeling risk
Sofar wehaveonly consideredariskneutral mortgagorwhoisinterestedin
theminimumweightedaverageoftotalcosts.Mostmortgagorshoweverhave
anaversiontowardsrisk.There aretwokindsofriskwhichmostmortgagors
areawareof:
1. Marketrisk:Inthemortgage marketthis istheriskofextrainterest
ratepaymentfor amortgagorwhoholdsanadjustablerateloanwhen
interestrateincreases,ortheriskofextraprepayment foramortgagor
withanykindofmortgageloanwhentheinterestratedecreasessothe
bond price increases.
2. Wealth risk: In the mortgage market this is a potential risk which
can be realized if themortgagor needs to prepay themortgagebefore
a planned date or ifhe needs to use thefree value of thepropertyto
take another loan. It can be measured asa deviation froman average
outstandingdebt atanygiven time duringthelife timeoftheloan.
We will in the following model both kinds of risk. To that end we use the
ideas behind minmax optimization and utility theory with use of budget
constraints.
4.1 The minmax criterion
Anextremely riskaversemortgagorwantsto payleastintheworstpossible
scenario.Inotherwordsifwedene the maximumpayment as
MP
thenwehavethefollowing minmax criterion:
min MP,
(13)MP ≥ X
tn(t,n∈NP f )
B tn ∀ f ∈ { 1, · · · , 2 T −1 } ,
(14)where
NP f is a set of scenarios with f ∈ { 1, · · · , 2 T −1 }
. Each scenario is
describedastheunique pathofnodesfromthe rootofthetreeto oneofthe
NP 1 = { 1, 2, 4, 8 } NP 2 = { 1, 2, 4, 9 }
· · ·
NP 8 = { 1, 3, 7, 15 }
4.2 Utilityfunction
Insteadofminimizingcostswecandeneautilityfunction,whichrepresents
asaving andmaximizeit.NielsenandPoulsen (N&P[12 ])suggestaconcave
utilityfunction withthesame formasinsketch (3).
Utility
Saving
Figure 3: A concave utility function. An increase of an already big saving is not as
interestingasanincreaseofasmallersaving.
The decreasing interest for bigger savings is based on the idea that bigger
savingsaretypically riskierthansmall savings.Nielsenand Poulsen suggest
alogarithmic objectfunction, whichcan beformulatedasfollows:
max X
tn(t,n)
p n · log(τ n · (B tn max − B tn )),
(15)where
B tn max is themaximumamount a mortgagor iswillingto pay.Nielsen
and Poulsen x
B tn max to a big value sothat the actual payment will never
riseabove thislevel.
Adding this nonlinear object function to our stochastic binary problem
makes the problem extremely challenging to solve. There are no eective
general purposesolvers for solving large mixedinteger nonlinear programs
(seeBussieckandPruessner, [6]).Therearethreewaysofcircumventingthe
problem: Either we use a linearutilityfunction inconjunction with budget
lem (nlp) or both (lp). We demonstrate the rst approach in the following
andcomment onthe second andthird approach insection6.
Instead of maximizing the logarithm of the saving at each node we can
simplymaximize thesaving:
B tn max − B tn.IfB tn max issolargethatthesaving
is always positive, then we are in eect minimizing the weighted average
costs similar to the risk neutral case presented in section 2. However ifwe
allowthesaving to benegative at timesand add a penaltyto theobjective
function whenever we get a negative saving,we can introduce riskaversion
into the model. For this reason we need to have a goodestimate for
B tn max.
The risk neutral model can be solved to give us these estimates. Then we
can usethefollowing objective functionand budgetconstraints.
max X
tn
p n · τ n (B tn max − B tn ) − P R tn · BO tn
(16)
B tn max + BO tn − B tn ≥ 0 ∀ tn(t, n)
(17)BO tn ≤ BO max tn ∀ tn(t, n).
(18)We allow crossing the budget limit in constraint (17) by introducing the
slack variable
BO tn. This value will then be penalized by a given penalty
rate(
P R tn)intheobjectivefunction(16).Thepenaltyratecanfor example
be ahighone timeinterestratefortakingabankloan.Thebudgetoverow
(
BO tn)isthencontrolledinconstraint(18)wheretheoverowisnotallowed
to be greaterthan a maximum amount
BO max tn .
4.3 Wealth risk aversion
So far we have only considered the marketrisk or theinterest rate risk. In
thefollowing we willmodel theotherimportant riskfactor inthemortgage
market, namelythewealth risk.
Wealthriskistheriskthattheactualoutstandingdebtbecomesbiggerthan
theexpectedoutstandingdebtatagiventimeduringthelifetimeoftheloan.
Forexamplesellinga30yearbondatapriceof80,wehaveabigwealthrisk
given thata smallfall inthe interestrate can causea considerable increase
inthebondprice,which meansaconsiderableincreaseintheamountofthe
outstandingdebt.
We consider the deviation from the average outstanding debt, which we
dene as
DX tn:
DX tn = X t − X
i
X itn , ∀ tn(t, n),
where
X tis the averageoutstanding debtfor agiven timet
:
X t = X
i,tn(t,n)
p n · X itn , ∀ t.
Apositivevalueof
DX tn means thatwe have asavinganda negative value
meansalossascomparedtotheaverageoutstandingdebt
X t.Weintroducea
surplusvariable
XS tn torepresent theamountofsavingandaslackvariable
XL tn to represent theamount of loss:
X t − X
i
X itn
− XS tn + XL tn = 0 ∀ tn(t, n),
(19)To make themodel both market riskand wealth risk averse we update the
objective functionwith weightedvalues of
XS tn andXL tn asfollows:
max X
tn(t,n)
p n · τ n
(B tn max − B tn ) − P R tn · BO tn + P W n · XS tn − NW n · XL tn
,
(20)
where
P W nisshortforpositiveweightandcanbeusedtoencouragesavings
and
NW n,shortfor negative weight,isthere topenalizealossascompared
to the average outstandingdebt. If we set
P W n = NW n,itmeans that the
model isindierent towards wealth risk. Onthe other hand
P W n < NW n,
meansthatthe modeliswealthriskaverse,sinceitpenalizesapotentialloss
harderthan itencourages apotential saving.
5 Scenario reduction
Sincethenumberofscenariosgrowsexponentiallyasafunctionoftimesteps
the stochasticbinarymodelisno longer tractable whenwe have more than
10timesteps.Foran11stage modelwehavethescenariotreeingure(4).
Asof todaythere are nogeneral purpose solvers which can solve stochastic
integerproblemsofthissize inareasonableamount oftime.Noticehowever
that a great number of nodes in the last 3-4 time steps have such a close
distance that a reduction of nodes for these time steps might not eect
the rststage results. We arein otherwordsinterested innding a wayto
optimallyreducethenumberofscenarios.Ifwegetthesamerststageresult
for a reduced and a nonreduced problem, it suces to solve the reduced
problem, and then at each step resolve the problem until horizon. In that
casethe nalresultofsolvinganyofthetwoproblemswillbethesame.The
reasonforthisisthatweinitiallyonlyimplementtherststagesolution.As
the time passesby and we get more information we have to solve the new
problemandimplement the newrst stagesolution eachtime.
0 1 2 3 4 5 6 7 8 9 10 100
200 300 400 500 600 700 800 900 1000
Time
Scenarios
Figure4:Abinomialscenariotreewith11stages.
NicoleGröweKuska, Holger Heitsch,Jitka Dupa
ˇ c
ová and Werner Römisch(see [7 , 8 ]) have dened the scenario reduction problem (SRP) asa special
setcovering problemand have solvedit usingheuristic algorithms.
TheauthorsbehindtheSCENREDarticleshaveincooperationwithGAMS
SoftwareGmbHand GAMSDevelopmentCorporation,developedanum-
ber ofC++ routines, SCENRED, for optimal scenario reduction ina given
scenariotree.Likewisetheyhavedevelopedalink,GAMS/SCENRED,which
connects the GAMS program to the SCENRED module (see [9]). The sce-
nario tree in gure 5 is obtained after using the fast backward algorithm
of the GAMS SCENRED module for a 50% relative reduction, where the
relative reductionis measured asan average of nodereductions for all time
step. If we for example remove half of the nodes at the last time step, we
geta50%reductionfor thattimesteponly.Thenwemeasurethereduction
percentages for all other time steps in the same way. The average of these
percentagescorrespondstothe relativereduction(see[7 ,8]).Inour example
thenumberof scenarios isreducedfrom 1024 to 12.
We useGAMS/SCENRED and SCENRED modules for scenarioreduction,
and compare the results with those found by solving the LPrelaxed non
reducedproblem.
6 LP relaxation
Wheneverwe renancethe mortageportfolioweneed to paya variableand
a xed transaction cost. The variable cost is
100 · η
percent of the sum of0 1 2 3 4 5 6 7 8 9 10 100
200 300 400 500 600 700 800 900 1000
Time
Scenarios
Figure5: Abinomialscenario treewith11stages aftera50% scenarioreductionusing
thefastbackwardalgorithmoftheSCENREDmoduleinGAMS.
thesold and purchased amount of bondsand thexed cost issimply DKK
m
(see constraint 7 and 8). The binary variables in the problem (1 to 9)aredue to incorporation of xed costs
m
.The numeric value of these xedcostsisaboutDKK2500whereas
η = 0.15%
.Whilethevalueofthevariabletransaction costs decreases as the time passes by, the xed costs remain
the same. Therefore, if we simply drop the xed costs or just add a small
percentageto thevariabletransaction costs,wenormallygetadierent rst
stage solution than what we get if we solve the problem with the actual
xed transaction costs. We therefore suggest an iterative updating scheme
forthevariabletransactioncosts,sothatwecanapproximate thexedcosts
without using binary variables. We do that by iteratively solving the LP
problem
k
times asfollows.We dene a ratio
ψ k itn and initialize it to ψ itn 0 = 0
. Theratio ψ itn k can then
be used inthe denition of a node payment (7) in the
k + 1
st iteration asfollows:
B tn = X
i
A itn + r in · (1 − γ )X itn +
b · (1 − β)X itn + η · (S itn + P itn ) + ψ itn k+1 · S itn
∀ tn(t, n)
(21)SolvingtheLPproblemat eachiteration
k
wegetS itn ∗k astheoptimal value
ofthe soldbondsatthe
k
th iteration.Before each iterationk > 0
,theratioψ itn k isthen updatedaccordingto thefollowing rule:
ψ itn k = ( m
S ∗k itn ∀ i, tn(t, n) ifS itn ∗k > 0,
ψ k−1 itn otherwise. (22)
This brings us to our approximation scheme for an LP relaxation of the
problem:
1. Dropthe xed costsand solve the LP relaxedproblem.
2. Find theratios
ψ itn according to(22).
3. Incorporate the ratios in the model so that DKK
m
is added to theobjectivefunctionforeachpurchasedbond,giventhesamesolutionas
theone inthe last iterationis obtained.Solve theproblemagain.
4. Stop if the solution in iteration
k + 1
has not changed more thanα
percent as compared to the solution in iteration
k
. Otherwise go tostep5.
5. Update
ψ itn accordingto (22).
6. Repeatfromstep 3.
Ourexperimentalresultsshowthatfor
α ' 2%
wendnearoptimalsolutionswhichhavesimilarcharacteristicstothe solutionsfromtheoriginalproblem
withthexedcosts.
7 Numerical results
We consider an 11 stage problem, starting with 3 callable bonds and 1 1
year bullet bond at the rst stage. We then introduce 7 new bonds every
3 years. An initial portfolio of loans has to be chosen at year 0 and it may
be rebalanced oncea year the next 10 years. We assume thatthe loan is a
30year loanandthat itisprepaid fullyat year11.
The 24 callable bonds used in our test problem are seen in table 1. The
tableonlypresentsthe average couponrateand priceforthese bondsatthe
date of issue. Besides these 24 callable bonds we use a 1year noncallable
bullet bond, bond 25. The eective interest rate on this bond is about 2%
to start with.Using a BDTtree (see [5, 3 ]) withthe inputgiven in table 2
theeectiveratecanincreaseto21%ordecreasetoslightlyunder1%atthe
10th year. The BDT tree has also been used for estimating the prices and
rates ofthe 24 callable bondsduring thelife timeofthemortgage loan.
A practical problem arises when writing the GAMS tables containing the
stochastic data. The optimization problem is a path dependent problem,
1 6% 103.06 3/10-02 3/10-35
2 5% 98.5 3/10-02 3/10-35
3 4% 89.4 3/10-02 3/10-35
4 9% 107.33 3/10-05 3/10-38
5 8% 103.16 3/10-05 3/10-38
6 7% 103.09 3/10-05 3/10-38
7 6% 100.51 3/10-05 3/10-38
8 5% 94.01 3/10-05 3/10-38
9 4% 84.55 3/10-05 3/10-38
10 3% 74.46 3/10-05 3/10-38
11 9% 105.4 3/10-08 3/10-41
12 8% 101.98 3/10-08 3/10-41
13 7% 100.3 3/10-08 3/10-41
14 6% 96.19 3/10-08 3/10-41
15 5% 89.5 3/10-08 3/10-41
16 4% 80.74 3/10-08 3/10-41
17 3% 71.32 3/10-08 3/10-41
18 9% 104.41 3/10-11 3/10-44
19 8% 100.9 3/10-11 3/10-44
20 7% 98.51 3/10-11 3/10-44
21 6% 94.07 3/10-11 3/10-44
22 5% 87.49 3/10-11 3/10-44
23 4% 79.25 3/10-11 3/10-44
24 3% 70.26 3/10-11 3/10-44
Table1:Thecallablebondsusedasinputtotheproblem.
whereastheBDTtreeispathindependent.GAMSisnotwellsuitedforsuch
programmingtasksasmapping thedata from acombining binomial tree(a
lattice) to a noncombining binomial tree.A general purpose programming
language is better suited for this task. We have used VBA to generate the
input data to the GAMS model, and we have run the GAMS models on a
sunsolaris machine.
Thepurposeof our testscan be summarizedasthefollowing:
1. Validatingthe4versionsofour model,i.e.weinvestigate ifthemodels
represent the actual dynamics oftheDanishmortgagemarket.
2. Observing theeectsof usingthe GAMS/SCENRED module.
3. Tryingour LP approximationon theproblem.
For each of these objectives we consider all four versions of themodel and
compare theresults.
(Year) (%) (%) (Year) (%) (%)
1 2.23% 16 4.87% 17.25%
2 2.35% 32.20% 17 4.93% 17.00%
3 2.73% 32.10% 18 4.99% 16.85%
4 3.08% 29.50% 19 5.05% 16.75%
5 3.41% 27.00% 20 5.11% 16.70%
6 3.68% 25.00% 21 5.16% 16.65%
7 3.92% 23.00% 22 5.21% 16.60%
8 4.12% 22.00% 23 5.25% 16.56%
9 4.30% 20.90% 24 5.29% 16.52%
10 4.44% 20.10% 25 5.34% 16.48%
11 4.56% 19.40% 26 5.37% 16.45%
12 4.62% 18.80% 27 5.40% 16.42%
13 4.68% 18.30% 28 5.43% 16.39%
14 4.74% 17.90% 29 5.46% 16.36%
15 4.80% 17.55% 30 5.49% 16.34%
Table2: TheinputtermstructuretotheBDTmodel.
7.1 The original stochastic MIP problem
Figure (6) shows the solutions found for the rst three stages of the prob-
lem for all four instances of our model, namely the risk neutral model, the
minimaxmodel, themodelwithinterestrate riskaversionwithbudgetcon-
straints and nally the model with interest rate and wealth risk aversion
withbudgetconstraints.Notice, however, thatno feasiblesolution couldbe
foundfor themodelwithinterestrate andwealth riskaversionwithbudget
constraints withina timelimit of10 hours.
A full prescription of the solution with all 11 stages will not contribute to
a better understanding of the dynamics of the solution, which is why we
presentthesolutiontotherstthreestagesoftheproblemonly.Itisthough
enoughto giveus anindicationofthebehaviourofeachsolution. Intherisk
neutral casewestart bytakinga1yearadjustablerateloan.Iftheinterest
rate increases after a year, the adjustablerate loan is prepaid by taking a
xedrateloan.Evenifitmeansanincreaseintheamountoftheoutstanding
debt, it proves to be a protable strategy since if the rates increase again
in the next stage we can reduce the amount of outstanding debt greatly
by renancing theloan to another xedrate loan with a higher price. The
minmax strategychoosesa xedrateloanwitha priceclose to par tostart
with. Thisloanisnot renanced until the 9th stage of theproblem.
The risk neutral and the minimax model represent the two extreme mort-
gagors as far as the risk attitude is concerned. The third model reects a
0 1 2 r=2.23%
r=3.23%
r=1.70%
r=5.99%
r=3.15%
r=3.15%
r=1.66%
s25=1000 s3=1128 p25=975
s1=916 p3=1107
Time (Year)
Scenarios
Risk neutral model
0 1 2
r=2.23%
r=3.23%
r=1.70%
r=5.99%
r=3.15%
r=3.15%
r=1.66%
s2=1018
Time (Year)
Scenarios
Mimimax model
0 1 2
r=2.23%
r=3.23%
r=1.70%
r=5.99%
r=3.15%
r=3.15%
r=1.66%
s2=1018
s3=1040 p2=1003
p2=987 s1=880
s25=952 p3=968
Time (Year)
Scenarios
Interest risk averse model
0 1 2
r=2.23%
r=3.23%
r=1.70%
r=5.99%
r=3.15%
r=3.15%
r=1.66%
NO SOLUTION WITHIN 10 HOURS
Time (Year)
Scenarios
Interest and wealth risk averse model
Figure6: Presentationofthesolutions forthe rst3stages oftheproblem.Variable
s
isforsale and
p
forpurchaseandtheunitsare givenin1000DKK,sos3 = 1128
meansthatthemortgagorshouldsellapproximately1.128.000DKKatthegivennode.Theshort
ratesfromtheBDTtreeareindicatedusingtheletter
r
.mortgagor witha riskattitude between therst two mortgagors. The solu-
tion to this model guarantees that the mortgagor will not pay more than
whathisbudgetallows atanygivennode.Table (3)indicatesthedierence
inthe characteristics ofthe solutions forthe threedierent models.
The risk neutral model gives the lowest average total cost. The standard
deviationfromthisaveragecostis,however,ratherhigh.Theminimaxmodel
hasamuch smallerstandard deviation.Thishigher levelofsecurityagainst
variationhasthoughanaveragecostofabout72000 DKK.Thethird model
hasreducedtheriskconsiderablywithouthavingincreasedthetotalaverage
costwithmore than about 7000 DKK.
For the sake of budget constraints in model 3 and 4 we use the following
constants:
SCALAR BMAX /570842/; // An average level of payment for a scenario
1-Riskneutral 1.281.857 92.289 1.502.042 1.004.583 276s
2-Minimax 1.353.713 19.729 1.374.183 1.117.084 10h
3-Int.rateriskaverse 1.288.405 66.019 1.431.857 1.005.412 10h
4-Int./Wealthriskaverse Nosolutionfoundwithin 10h.
Table 3:Comparisonofthefourstrategiesfortheoriginalproblem.
SCALAR IBMAX /711015/; // An average level of prepayment at year 11
SCALAR BOMAX /50000/; // Maximum extra payment for a scenario
SCALAR IBOMAX /100000/; // Maximum extra prepayment at year 11
Theseconstants arechosenafter considering the average paymentsand the
standard deviationsfrom theseinthe risk neutral model.
Themajor problemwiththesesolutions isthecomputingtimetakento nd
nearoptimalsolutionsbyCPLEX.Exceptfortherstmodel,wecannotnd
solutions within 1% of a lower bound after 10 hours of CPU time. For the
fourthmodelnofeasible solutionisfound atall.Inthefollowing wewill see
theresults foundfor the reduced problem.
7.2 The reduced stochastic MIP problem
Afterreducing thenumberofscenarios from1024 to12wegetthesolutions
ingure(7).
Exceptforthe riskneutral modelwedonotobtainthesamerststagesolu-
tions aswesawfor theoriginalproblem. It seemsthatthereducedproblem
hasamore optimistic viewofthefutureascompared to theoriginalmodel.
Thiscanalso beseenintable (4)where the totalcostsareconsiderablyless
than the onesfor theoriginal problem.
Modeltype Totalcosts Std.dev. max min time
1-Riskneutral 1.169.173 49.765 1.274.079 1.064.525 12s
2-Minimax 1.187.938 0.00 1.187.938 1.187.938 52.2s
3-Int.rateriskaverse 1.171.926 24.270 1.229.897 1.136.655 300s
4-Int./Wealthriskaverse 1.172.479 25.610 1.229.742 1.128.412 300s
Table4:Comparisonofthefourstrategiesforthereducedproblem.
By testing the scenario reduction algorithms for dierent levels of reduc-
tion onour problem we notice that thereduced problemhasalmost always
an overweight ofscenarios with lowerinterest rates.Thisexplains the more
optimistic view of the future given by scenario reduction. Even much less
aggressive scenarioreductions donotguarantee usthesame initialsolutions
as found for the original problem. What we need is therefore a method to
optimally reduce the number of scenarios while the tree remains balanced.
0 1 2 r=2.23%
r=3.23%
r=1.70%
r=5.99%
r=3.15%
r=3.15%
r=1.66%
s25=1000
s3=1011 p25=975
s1=1009 p25=953
s3=1049 p25=953 s25=900 p3=992
Time (Year)
Scenarios
Risk neutral model
0 1 2
r=2.23%
r=3.23%
r=1.70%
r=5.99%
r=3.15%
r=3.15%
r=1.66%
s3=144 s25=868
s2=264 p25=245
s3=877 p25=846
s6=340 p2=259,p3=138
s3=924 p25=259 s25=907 p3=999
s25=395 p3=402
Time (Year)
Scenarios
Mimimax model
0 1 2
r=2.23%
r=3.23%
r=1.70%
r=5.99%
r=3.15%
r=3.15%
r=1.66%
s25=1000
s3=1011 p25=975
s1=380 p25=358
s3=1049 p25=953 s25=900 p3=992
Time (Year)
Scenarios
Interest risk averse model
0 1 2
r=2.23%
r=3.23%
r=1.70%
r=5.99%
r=3.15%
r=3.15%
r=1.66%
s25=1000
s3=1011 p25=975
s1=378 p25=356
s3=1049 p25=953 s25=900 p3=992
Time (Year)
Scenarios
Interest and wealth risk averse model
Figure 7: Presentation of the solutions for the rst 3 stages of the reduced problem.
Unitsaregivenin1000DKK.
For the purposes of this article however, we continue withthe reducedtree
found by GAMS/SCENRED. The reason for this is our focus on the op-
timization part of the problem in this article. We suggest that the market
practitioners experiment with dierent reduced scenario trees ranging from
verypessimisticto optimisticonesto ndrobust solutionsfor eachriskcat-
egory ofmortgagors.
We can seein table(4) thatthe behaviourof thesolutions for thedierent
models is similar to that of theoriginal problem. Notice also thatwe get a
feasiblesolutionhereforthefourthmodelwithinterestrateandwealth risk
aversion.
For the sake of budget constraints in model 3 and 4 we use the following
constants:
SCALAR BMAX /565915/; // An average level of payment for a scenario
SCALAR IBMAX /601983/; // An average level of prepayment at year 11
SCALAR BOMAX /50000/; // Maximum extra payment for a scenario
7.3 The reduced and LPapproximated problem
When we use our LPapproximation algorithm on this problem we getthe
solution aspresentedintable (5)and gure(8).
0 1 2
r=2.23%
r=3.23%
r=1.70%
r=5.99%
r=3.15%
r=3.15%
r=1.66%
s25=1000
s3=1011 p25=975
s1=1009 p25=953
s3=1049 p25=953 s25=900 p3=992
Time (Year)
Scenarios
Risk neutral model
0 1 2
r=2.23%
r=3.23%
r=1.70%
r=5.99%
r=3.15%
r=3.15%
r=1.66%
s2=174 s25=829
s3=203 p25=175
s3=102 p25=808 p2=171
s25=159 p2=169,p3=22
s3=681 p25=618 s25=905 p3=997
Time (Year)
Scenarios
Mimimax model
0 1 2
r=2.23%
r=3.23%
r=1.70%
r=5.99%
r=3.15%
r=3.15%
r=1.66%
s25=1000
s3=1011 p25=975
s2=441 p25=372
s3=1049 p25=953 s25=900 p3=992
Time (Year)
Scenarios
Interest risk averse model
0 1 2
r=2.23%
r=3.23%
r=1.70%
r=5.99%
r=3.15%
r=3.15%
r=1.66%
s25=1000
s3=1011 p25=975
s2=552 p25=465
s3=1049 p25=953 s25=900 p3=992
Time (Year)
Scenarios
Interest and wealth risk averse model
Figure 8: Presentation of the solutions for the rst3 stages of the LP approximated
reducedproblem.Unitsaregivenin1000DKK.
The algorithm uses 1018 runs for the dierent problems to nd solutions
whichareoverall lessthan 2%dierentfrom thesolutions foundinthelast
iteration.
It is important to point out that simply dropping the xed costsresults in
solutionswhichdeviateconsiderablyfromtheproblemswiththexedcosts,
whereasapproximatingthexedcostsusingouralgorithmgivesverysimilar
results asfoundbytheMIPmodel.
1-Riskneutral 1.169.147 49.775 1.274.078 1.064.524 25s
2-Minimax 1.179.654 11.150 1.185.795 1.154.602 22s
3-Int.rateriskaverse 1.172.364 26.436 1.239.168 1.130.196 28s
4-Int./Wealthriskaverse 1.174.038 29.128 1.249.520 1.131.185 44s
Table5:ComparisonofthefourstrategiesforthereducedproblemwithLPapproxima-
tion.
7.4 Comments on results
The results presented in this section are in agreement with the nancial
arguments used in the Danish mortgage market. Even though the original
problemis hardto solvewe have shown thatuseful results canbe found by
solvingthereducedproblems.Thereducedscenariotreesrepresentedamore
optimisticpredictionofthefuture,buttheresultsfoundarestillquiteuseful.
Inpracticethemortgage portfoliomanager shouldtry severalscenariotrees
with dierent risk representations as an input to the model. This way the
optimizationmodelcanbeusedasan analyticaltoolfor performing what
if analyseson a highabstraction level.
8 Conclusions
Wehave developed afunctionaloptimization modelthatcanbeusedasthe
basis for a quantitative analysis of the mortgagors decision options. This
modelin conjunction with dierent term structures or marketexpertopin-
ions on the development of bond prices can assist market analysts in the
following ways:
Decisionsupport:Insteadofcalculatingtheconsequencesofthesingleloan
portfoliosforsingleinterestratescenarios,theoptimizationmodelallowsfor
performingwhatifanalysisonahigherlevelofabstraction.Theanalystcan
provide the systemwith dierent sets of information such asthe presumed
lifetimeof theloan, budgetconstraints and riskattitudes.The systemthen
nds the optimalloan portfoliofor each setof inputinformation.
Product development: Traditionally, loan products are based on single
bondsor bondswithembedded options. In some mortgagemarkets such as
theDanishone itisallowed to mixbondsinamortgageportfolioandthere
are even some standard products which are based on mixing bonds. The
product
P 33isforexamplealoanportfoliowhere 33%oftheloanisnanced
in3yearnoncallablebondsandtherestinxedratecallablebonds.These
mixedproductsarecurrently notpopularsince therationale behindexactly
this kind of mixis not well argued. The optimization model givesthe pos-
sibility to tailor mixed products that, given a set of requirements, can be
The greatest challenge insolving the presented models ison decreasing the
computing times. We have experimented with scenario reduction (scenred,
[7,8,9])andwe have suggestedanLP approximation method toreducethe
solution times while maintaining solution quality. It is, however, an open
problem to develop tailored exact algorithms such as decomposition algo-
rithms (see [1, 2]) to solve the mortgagors problem. Another approach for
gettingreal time solutions is to investigate dierent heuristic algorithmsor
makeuse ofparallel programming(see [13 , 14])to solve theproblem.
Integrationofthetwodisciplinesofmathematicalnanceandstochasticpro-
grammingcombinedwithuseofthestateof theartsoftwarehasagreatpo-
tential,whichhasnotyetbeenrealizedinallnancialmarketsingeneraland
inmortgage companies inparticular. There isa need for more detailed and
operationalmodels andhighperformingeasy to useaccompanying software
to promoteuseofthe mathematical modelswithspecialfocusonstochastic
programming.
References
[1] BirgeJ.R.1985.Decompositionandpartitioningmethodsformultistage
stochasticlinear programs. OperationsResearch,33(5): 989-1007.
[2] Birge J.R.and Louveaux F. 1997.Introduction to Stochastic Program-
ming. ISBN0-387-98217-5, Springer-Verlag NewYork,Inc.
[3] Bjerksund P. and Stensland G. 1996. Implementation of the Black
DermanToyInterestRateModel.TheJournalofFixedIncome,Volume
6 Number2,September1996.
[4] BjörkT.1998.ArbitrageTheoryinContinuousTime.ISBN0-19-877518-
0,OxfordUniversity Press.
[5] BlackF.,DermanE. andToyW. 1990.A OneFactor Modelof Interest
RatesanditsApplicationtoTreasuryBondOptions.FinancialAnanlysts
Journal/JanuaryFebruary 1990.
[6] BussieckM.,pruessnerA.2003.MixedIntegerNonlinearProgramming.
Overviewfor GAMSDevelopment Corporation,February19,2003.
[7] Dupa
ˇ c
ová J., GröweKuska N. and Römisch W. 2003. Scenario reduc-tion instochasticprogramming: An approach usingprobability metrics.
Mathematical Programming, Ser.A 95 (2003), 493-511.
stochasticprogramming. Computational Optimization and Applications
24 (2003),187-206.
[9] GAMS/SCENRED Documentation. Available from
<www.gams.com/docs/document.htm>.
[10] Hull J.C. 2003.Options, Futures and Other Derivatives.Fifth edition,
Prentice hall international.
[11] Luenberger D. G.1998. Investment Science.OxfordUni. Press.
[12] NielsenS.S.andPoulsenR.2004.A TwoFactor, StochasticProgram-
mingModelofDanishMortgageBackedSecurities.JournalofEconomic
Dynamicsand Control, Volume 28, Issue7,1267-1289.
[13] NielsenS.S.andZeniosS.A.1996.SolvingMultistage StochasticNet-
work Programs on Massively Parallel Computers. Mathematical Pro-
gramming 73,227-250.
[14] Ruszczynski A. 1988. Parallel decomposition of multistage stochas-
tic programming problems.Working paperWP-88-094,IIASA, October.
1988.