• No results found

Debt Portfolio Optimization at the Swedish National Debt Office:: A Monte Carlo Simulation Model

N/A
N/A
Protected

Academic year: 2022

Share "Debt Portfolio Optimization at the Swedish National Debt Office:: A Monte Carlo Simulation Model"

Copied!
82
0
0

Loading.... (view fulltext now)

Full text

(1)

INOM

EXAMENSARBETE TEKNIK, GRUNDNIVÅ, 15 HP

STOCKHOLM SVERIGE 2020,

Debt Portfolio Optimization at the Swedish National Debt Office:

A Monte Carlo Simulation Model FELIX GREBERG

KTH

(2)
(3)

Debt Portfolio Optimization at the Swedish National Debt Office:

A Monte Carlo Simulation Model

Felix Greberg

ROYAL

Degree Projects in Applied Mathematics and Industrial Economics (15 hp) Degree Programme in Industrial Engineering and Management (300 hp) KTH Royal Institute of Technology year 2020

Supervisor at KTH: Ximei Wang

Examiner at KTH: Sigrid Källblad Nordin

(4)

TRITA-SCI-GRU 2020:113 MAT-K 2020:014

Royal Institute of Technology School of Engineering Sciences KTH SCI

SE-100 44 Stockholm, Sweden URL: www.kth.se/sci

(5)

Abstract

It can be difficult for a sovereign debt manager to see the implications on expected costs and risk of a specific debt management strategy, a simulation model can therefore be a valuable tool. This study investigates how future economic data such as yield curves, foreign exchange rates and CPI can be simulated and how a portfolio optimization model can be used for a sovereign debt office that mainly uses financial derivatives to alter its strategy. The programming language R is used to develop a bespoke software for the Swedish National Debt Office, however, the method that is used can be useful for any debt manager. The model performs well when calculating risk implications of different strategies but debt managers that use this software to find optimal strategies must understand the model’s limitations in calculating expected costs. The part of the code that simulates economic data is developed as a separate module and can thus be used for other studies, key parts of the code are available in the appendix of this paper. Foreign currency exposure is the factor that had the largest effect on both expected cost and risk, moreover, the model does not find any cost advantage of issuing inflation- protected debt. The opinions expressed in this thesis are the sole responsibility of the author and should not be interpreted as reflecting the views of the Swedish National Debt Office.

Keywords

Public Debt Management, Financial Mathematics, Portfolio Optimization, Ornstein–Uhlenbeck, Vector Autoregression, Term Structure Evolution, Nelson- Siegel, R, Monte Carlo simulation

(6)
(7)

Sammanfattning

Det kan vara svårt för en statsskuldsförvaltare att se påverkan på förväntade kostnader och risk när en skuldförvaltningsstrategi väljs, en simuleringsmodell kan därför vara ett värdefullt verktyg. Den här studien undersöker hur framtida ekonomiska data som räntekurvor, växelkurser ock KPI kan simuleras och hur en portföljoptimeringsmodell kan användas av ett skuldkontor som främst använder finansiella derivat för att ändra sin strategi. Programmeringsspråket R används för att utveckla en specifik mjukvara åt Riksgälden, men metoden som används kan vara användbar för andra skuldförvaltare. Modellen fungerar väl när den beräknar risk i olika portföljer men skuldförvaltare som använder modellen för att hitta optimala strategier måste förstå modellens begränsningar i att beräkna förväntade kostnader. Delen av koden som simulerar ekonomiska data utvecklas som en separat modul och kan därför användas för andra studier, de viktigaste delarna av koden finns som en bilaga till den här rapporten. Valutaexponering är den faktor som hade störst påverkan på både förväntade kostnader och risk och modellen hittar ingen kostnadsfördel med att ge ut inflationsskyddade lån.

Åsikterna som uttrycks i den här uppsatsen är författarens egna ansvar och ska inte tolkas som att de reflekterar Riksgäldens syn.

Nyckelord

Skuldförvaltning, Portföljoptimering, Finansiell matematik, Ornstein–

Uhlenbeck, Vector autoregression, Ränteutvecklingsmodeller, Nelson-Siegel, R, Monte Carlo-simulering

(8)
(9)

Acknowledgements

I would like to express my sincere gratitude to those people who made this thesis possible.

This thesis is written as a project for the Swedish National Debt Office (SNDO or Riksgälden). Thus, I wish to thank all of my colleagues at the SNDO, including but not limited to:

Jörg Hofmeister, CFA, Senior Analyst at the SNDO and a KTH alumnus, for providing a lot of useful advice and expertise during our weekly project meetings.

His long experience in quantitative finance and debt management has been invaluable.

Love Eklund, Analyst at the SNDO and a student at KTH, who helped develop the software. This thesis would not have been possible without his help.

Furthermore, I wish to express my gratitude to my supervisors: Ximei Wang, PhD, and Julia Liljegren for their generous help and valuable advice.

Moreover, I am grateful for the support from my family and my girlfriend while I was writing this thesis.

(10)

Author

Felix Greberg, fgreberg@kth.se

Industrial Engineering and Management, Applied Mathematics KTH Royal Institute of Technology

Examiner

Associate professor Sigrid Källblad Nordin Mathematical Statistics

KTH Royal Institute of Technology

Supervisors

Ximei Wang, PhD Mathematical Statistics

KTH Royal Institute of Technology Jörg Hofmeister, CFA

Debt Management

Swedish National Debt Office Julia Liljegren

Economics

KTH Royal Institute of Technology

(11)

Contents

Acronyms 2

1 Introduction 3

1.1 Background . . . 3

1.1.1 Public debt management . . . 3

1.1.2 Swedish government debt securities . . . 4

1.2 Purpose and significance . . . 5

1.3 Research questions . . . 5

2 Previous Research 6 3 Theory 8 3.1 Pricing of financial securities . . . 8

3.1.1 Fixed for floating swaps . . . 8

3.1.2 Bonds and Bills . . . 9

3.1.3 Foreign exchange futures . . . 9

3.2 Term structure modeling . . . 10

3.3 Risk premia . . . 11

3.4 Simulation methods . . . 13

3.4.1 Ornstein–Uhlenbeck process . . . 13

3.4.2 Vector Autoregression . . . 13

3.4.3 Brownian bridge . . . 15

4 Methodology 17 4.1 Pricing of securities . . . 17

4.1.1 Market value . . . 17

4.1.2 Book value . . . 21

4.1.3 Cost and risk calculation . . . 23

4.2 Modeling of macroeconomic data . . . 25

4.2.1 Term structures . . . 25

4.2.2 Foreign exchange rates and implied foreign interest rate . . 27

4.2.3 Consumer price index . . . 28

4.2.4 Simulation . . . 29

(12)

4.3 Portfolio generation . . . 32

5 Results 34

5.1 Simulation of macroeconomic data . . . 34 5.2 Simulation of costs . . . 38

6 Discussion and Analysis 44

7 Conclusion 52

References 53

Appendix A Simulation of economic data 58

Appendix B R-code 62

B.1 simulate_future_parameters.R . . . 62 B.2 simulate_one_observation.R . . . 65

(13)

Acronyms

BPS Basis Points. 12, 38, 41, 42, 44–47

CIP Covered Interest rate Parity. 10

CPI Consumer Price Index. 4, 9, 18, 28–30, 36, 45, 47, 52

FRN Floating Rate Note. 8, 19, 22

FX Foreign Exchange. 9, 10, 12, 17, 20, 27, 29, 30, 32, 35, 41, 45–47, 52

IL Inflation-Linked. 4, 17, 18, 25, 28, 32, 33, 44, 45

LIBOR London Interbank Offered Rate. 8–10, 20

NS Nelson-Siegel. 10, 25, 26

NSS Nelson-Siegel-Svensson. 6, 11, 25

OIS Overnight Index Swap. 8, 19

SNDO Swedish National Debt Office. 3–5, 17, 19–21, 31, 33, 39

STIBOR Stockholm Interbank Offered Rate. 8–10, 17, 19, 20, 22, 25, 26, 35, 38, 42, 44, 46, 47, 49

UIP Uncovered Interest rate Parity. 12, 27, 46

VAR Vector autoregression. 14, 15, 29–31

YTM Yield To Maturity. 9, 21, 22

(14)
(15)

1 Introduction

1.1 Background

1.1.1 Public debt management

The Swedish national debt accounts for about 26% of GDP [1] and is managed by the Swedish National Debt Office (SNDO). The objective of debt managers at the SNDO is ”to minimize the cost of central government debt in the long term while taking risk into account” [2] and, hence, the debt manager faces a trade-off between financing costs and risk. Clearly, the issuer of a debt instrument does not face any counterparty default risk, however, the issuer does face a risk of increased financing costs in the future. Furthermore, several different methods can be used to measure both debt costs and risk. It might seem logical to use market values when measuring performance but that has clear disadvantages, for instance, all future cash flows of fixed coupon bonds are known but the future market values can still be volatile. A debt manager has indeed a less clear definition of both cost/return as well as risks than an asset manager. As a consequence, to optimize the portfolio strategy, a reasonable risk measure needs to be defined as well as a cost measure. This simulation model aims to help the SNDO to make informed decisions on portfolio strategy by measuring expected costs and risks of different strategic choices.

In the case of the Swedish national debt, there are three main parameters that the debt manager can alter:

1. Portfolio duration.

2. Inflation exposure.

3. Foreign currency exposure, including the distribution between different currencies.

Portfolio duration is the weighted average duration of all instruments. For a debt issuer, the duration of a bond can be interpreted as a measurement of how long time the interest rate is fixed. Increased duration reduces the risk of unexpected increases in costs but investors often demand a term premium for holding securities with a long duration, see Section 3.3. The current target

(16)

duration for the Swedish national debt is 3.5-6 years [2].

Debt managers can also change inflation exposure. Issuing Inflation-Linked bonds can affect the expected costs and risk since the inflation risk is transferred from the investor to the issuer, see Section 3.3. The SNDO’s current long term inflation exposure is 20% [2].

Furthermore, the debt office can choose how much to borrow in foreign currency instead of the domestic currency. In addition, the debt managers can alter which foreign currencies to issue debt in. Using foreign currency-denominated debt could affect both costs and increase risk.

The debt office also needs to cover the governments fiscal surplus or deficit.

Hence, the debt level will vary greatly over the year.

1.1.2 Swedish government debt securities

The SNDO issues several different types of securities. Government bonds (Swedish: Statsobligationer) accounts for about half of the government debt, these are coupon paying bonds with a fixed krona nominal amount. Treasury Bills (T-bills, Swedish: Statsskuldsväxlar) are zero-coupon bonds issued by the SNDO with a time to maturity of less than one year. Inflation-Linked bonds (TIPS or IL-bonds, Swedish: Realobligationer) are fixed coupon paying bonds that are inflation-protected. The principal amount of inflation-linked bonds is linked to the Swedish Consumer Price Index (CPI) (Swedish: KPI), as a result, these bonds accrue both interest and inflation. Foreign currency bonds are bonds with a nominal amount denoted in any currency other than Swedish krona.

Moreover, the SNDO may also issue Commercial Papers in foreign currency, these are included in the foreign currency debt. The SNDO can also borrow or deposit funds in the overnight market. In conclusion, there are six different types of Swedish government securities:

• Government bonds

• T-bills

• IL-bonds

• Overnight deposits/loans

• Foreign currency bonds

• Commercial papers

(17)

1.2 Purpose and significance

Even though the Swedish government debt is relatively small and interest rates are currently low, it is still important to minimize costs while taking risk into account.

There are many different choices that a debt manager needs to make, but it can be difficult to understand the consequences of those decisions in terms of risk and expected cost. Several other sovereign debt offices already use simulation models to test different issuance strategies and to evaluate their current strategy, see Section 2. Furthermore, the SNDO cannot use models developed by other debt offices since every market is different. For instance, the SNDO mainly use derivatives to manage risk and costs whereas many other debt offices change which securities they issue. Moreover, many debt offices need to use a strategy that minimizes risk premia due to default risk, however, the Swedish government debt is widely regarded as being risk-free because of its perfect credit rating [3].

This model also uses more parameters than many other debt optimization models, for instance, the models mentioned in Section 2 does not take foreign currency exposure into account when optimizing since some of them do not issue foreign currency debt at all.

1.3 Research questions

1. How should cost- and risk measures be defined for a national debt office?

2. How can a sovereign debt office use financial derivatives to manage costs and risks while keeping debt issuance regular and predictable?

3. How is expected debt cost affected when risk is increased?

4. Can Monte Carlo simulation be used to estimate the probability distribution of debt costs?

5. Can a Monte Carlo based optimization model find an efficient subset of debt issuance strategies?

(18)

2 Previous Research

Balibek & Hamdi [4] have created a working paper for the World Bank on the debt simulation model used by the Turkish treasury department. The paper includes a discussion on different cost metrics, including their ”Conditional cost- at-risk” measure used by the Turkish Treasury. In addition, the paper includes an explanation of how the Turkish Treasury simulates future term structures using Nelson-Siegel-Svensson parameters. However, the paper assumes that only the level of the term structure is stochastic and that the shape is deterministic and constant. Whereas they argue that the shape of the Turkish yield curve is stable, the same cannot be said about the Swedish yield curve.

Bolder & Deeley [5] have created a discussion paper on the simulation model used by the Bank of Canada. It includes a discussion on the advantages and disadvantages of different cost and risk measures. Furthermore, it explains how unemployment data can be used to simulate the fiscal surplus or deficit. They also incorporate inflation-protected securities in the simulation, however, no derivatives are used.

Belton et al. [6] have created a simulation model for the US Treasury Department, it includes a section on how the term premium can be modeled as a separate stochastic variable. Although the model only optimizes duration, it uses a convenient way of creating many new issuance plans with different duration that will be useful for this paper. The portfolio generation method presented in Section 4.3 is inspired by this paper.

Adamo et al. [7] have created an optimization model for the Italian Treasury which includes a simple method to model yield curves and also uses simulated values of Italian GDP to predict the size of the fiscal deficit. In addition, they use the simplex algorithm to find the optimal issuance strategy subject to several real- world constraints.

Diebold & Li [8] have created a paper on how to use the term structure model developed by Nelson & Siegel [9] for simulation purposes. While it is easy to calculate future expected term structures under the risk-neutral Q-measure, the existence of term premiums makes it more difficult to simulate realistic scenarios

(19)

under the P-measure. Diebold & Li simulate values of three parameters while the fourth is held constant, the same method was used in this thesis.

(20)

3 Theory

3.1 Pricing of financial securities

3.1.1 Fixed for floating swaps

A fixed for floating swap is an instrument that lets the holder swap fixed coupon payments for floating payments. The instrument can be replicated by a long (short) position in a coupon paying bond and a short (long) position in a Floating Rate Note (FRN) with the same principal amount and time to maturity. Floating rate notes have a shorter duration than fixed coupon bonds and, consequently, these instruments can be used to alter the portfolio duration without changing which debt instruments to issue. This is indeed important since using a ”Regular and Predictable” issuance strategy can reduce long term financing costs [10]. A general pricing formula for a plain-vanilla fixed for floating swap is as follows, [11]

CN

N1

n=1

nDt0,Tn =

N2

n=1

δnE [L(Tn−1, Tn)]tDt0,Tn, (1) where CN is the fixed coupon rate, ∆n and δn are the fixed and floating compounding times for coupon n, Dt0,Tn is the discount factor from Tn to the settlement date t0. L(Tn−1, Tn)is the actual interest rate from Tn−1 to Tn. N1and N2are the number of fixed and floating payments respectively.

Collateralized Swaps with daily posting of margins have negligible counterparty risk [12] and, consequently, it would be appropriate to discount cash flows with a risk-free rate [11]. The Overnight Index Swap (OIS)-curve is a curve representing the expected risk-free interest rate and is indeed useful. Fujii et al. [11] have shown that for an Overnight Index Swap, the following equation holds,

CN

N n=1

nDt0,Tn = Dt0,T0 − Dt0,TN. (2)

This is because both the expected floating payments and the discount factors are derived from the OIS-curve. For a 3-month LIBOR/STIBOR fixed for floating swap, a curve of expected LIBOR/STIBOR should be used to calculate the expected floating payments and an OIS-curve should be used to discount all cash flows

(21)

[11].

A consequence of using LIBOR/STIBOR swaps instead of Treasury swaps to lower the portfolio duration for a sovereign debt office is that the debt office enters a short position in LIBOR-Treasury spread, i.e. a cost is incurred if the spread increases, as it usually does in unstable economic environments.

3.1.2 Bonds and Bills

Swedish government debt securities are usually quoted with its Yield To Maturity (YTM), that is, the constant discount rate that makes the present value of the instrument’s cash flows equal to its price. The relationship between YTM and dirty price, i.e., price including accrued interest, is as follows [13],

P = I × [ n

i=1

CFi

(1 + rkk)ti/k ]

, (3)

where P is the dirty price, CFiis the i-th cash flow, rkis the YTM, tiis the time to the i-th cash flow with 30/360 date convention [13], k is the compounding frequency such that:

k =





1 if tn ≥ 1, ti if tn < 1

(4)

Iis the inflation factor such that,

I =





max{CP ICP Isettlementbase , 1} if inflation linked,

1 if not inf lation linked.

(5)

CP Isettlementis an interpolated value of the CPI three months before the settlement date as described by the Swedish Securities Dealers Association [13].

3.1.3 Foreign exchange futures

Foreign Exchange (FX) futures contracts are derivatives often used to hedge foreign currency exposure. For instance, an EUR/SEK future is a contract to deliver one Euro on a future date for a predetermined price in Swedish krona. A three-month EUR/SEK future can be replicated by a linear combination of a short

(22)

position in a three-month euro-denominated zero-coupon bond with a principal amount of one euro and a long position in a three-month krona denominated zero-coupon bond. The initial value of the contract is zero and the quoted futures price of the contract is the predetermined exchange rate. FX futures are priced according to the Covered Interest rate Parity (CIP) described below:

Ft0,T = St01 + rSEK(t0, T )· (T − t0)

1 + rF(t0, T )· (T − t0) , (6) where t0 is the time to the settlement date of the transaction and T is the time to maturity, St0 is the spot exchange rate at the settlement date, rSEK(t0, T ) is the domestic forward interest rate and rF(t0, T ) is the foreign forward interest rate. LIBOR/STIBOR can be used as the domestic interest rate but using LIBOR as the foreign interest rate will often result in a small difference between the calculated forward prices and the quoted forward prices in the market. Du, Tepper

& Verdelhan [14] have shown that this is due to the existence of forward rate arbitrage. However, using actual market prices, an implied foreign yield can be computed by rearranging equation (6) as follows:

rF(t0, T ) = S01 + rSEK(t0, T )· (T − t0) Ftquote

0,T · (T − t0) 1 T − t0

(7)

It might seem unintuitive to make an exception to the no-arbitrage assumption when building the model, nevertheless, Du et al. [14] have explained that there are regulatory reasons to why the forward rate arbitrage can exist in the fixed-income market.

3.2 Term structure modeling

A yield curve is a function that describes the spot interest rate, that is, the zero- coupon yield, for any given maturity. For simulation purposes, it is beneficial to use a model with only a few different parameters. The NS model created by Nelson and Siegel [9] is a four-parameter model widely used in modeling. The model is as follows,

y(τ ) = β1+ β2

[1− exp(−τ/λ) τ /λ

] + β3

[1− exp(−τ/λ)

τ /λ − exp(−τ/λ) ]

, (8)

(23)

where y is the spot yield in percent with a time to maturity of τ years. β1 adjusts the level of the curve and is the long term interest rate. β2 adjusts the difference between the short- and the long term yield. β3 and λ affects the amplitude and position of the curvature of the function [9]. Furthermore, it can be shown that,

lim

τ→0+[y(τ )] = β1+ β2 ≈ y ( 1

365 )

(overnight rate), (9)

τlim→∞[y(τ )] = β1. (10)

Svenson [15] has proposed an extension to the NS-model, often referred to as the Nelson-Siegel-Svensson (NSS)-model, which introduces a second ”hump”

and two more parameters. The NSS-model can achieve a superior fit to the NS model but for simulation purposes that will not make a substantial difference.

Furthermore, the estimates of the parameters in the NSS model tend to be rather unstable, especially when there are few observations, as shown by Gilli, Grosse &

Schumann [16, ch. 3].

3.3 Risk premia

Investors of non-inflation-linked securities, for instance nominal bonds, may demand an inflation risk premium exposing their portfolio to inflation-risk [17, sec. 1]. Indeed, a central bank could for instance theoretically increase inflation which would make existing nominal bonds less valuable. However, the inflation risk is transferred from the investor to the issuer if inflation-linked bonds are used instead of nominal bonds, this implies that the issuer collects the inflation risk premium instead of the investor. See Werner & García [17] for further readings on inflation risk premia.

Investor may demand a liquidity premium for holding securities that either have poor liquidity today or have a high risk of decreased liquidity in the future. Lower liquidity increases trading costs (wider bid/ask spread) and increases investors’

risk since it may be more difficult to liquidate the security for a fair price during financial crises. Swedish inflation-linked bonds may have lower liquidity than nominal bonds, in fact, Alexandersson [18] has shown that the Swedish relative

(24)

IL-bond liquidity premium is about 10-30 Basis Points (BPS) under normal market conditions and that it reached a maximum of 80 BPS during the Great Recession.

Fixed income investors may demand a risk premium for investing in bonds with a long duration, that is, a long time with a fixed interest rate. This is because the market price of a fixed coupon bond is sensitive to changes in interest rates and this sensitivity increases with duration, this implies that the investor may lose money on a long duration bond if the position is liquidated before maturity. See Orphanides & Kim [19] for further readings on term premia.

Interest rates adjusted for expected drifts in Foreign Exchange (FX) spot-rates have traditionally been thought to be equal across economies [20]. This is referred to as the Uncovered Interest rate Parity (UIP) which can be summarized in its simplest form as follows [20, eq. 2],

1 + r(d)t = st (

1 + r(f )t )EP

[ 1 st+1|Ft

]

, (11)

where rt(d)and rt(f )are the domestic and foreign risk-free interest rates and stis the spot exchange rate at time t. An implication of the UIP is indeed that there cannot exist any long term cost benefit of borrowing funds in foreign currency.

Nevertheless, there is strong empirical evidence that the UIP does not hold and that spot exchange rates have significantly lower drift than what the UIP predicts, see for instance Mishkin [21]. Many researchers, including Lustig & Verdelhan [22], argue that this deviation from the UIP exists because of foreign currency risk premia which compensates investors who hold currencies with high nominal interest rates. An implication of this is that issuing debt in currencies with lower interest rates than the domestic interest rate could provide a cost-benefit.

In summary, there are four main risk premia that affects the expected costs of risk-free sovereign debt:

1. Inflation risk premia 2. Liquidity premia

3. Term premia

4. Foreign currency risk premia

(25)

3.4 Simulation methods

3.4.1 Ornstein–Uhlenbeck process

A univariate Ornstein–Uhlenbeck process is a continuous stochastic process with mean reversion towards a long term average, the stochastic part is given by a Wiener process. The univariate case can be described as follows [23]:

dXt= θ(µ− Xt)dt + σdWt, (12)

(Xt|X0 = x0) = µ− e−θt(µ− x0) +

t 0

e−θ(t−s)σdWs, (13)

where µ, θ and σ should be estimated from historical data using either maximum likelihood or least squares. There is also a k-dimensional version of the Ornstein–

Uhlenbeck process that can be described similarly as equation (12) & (13) but where X and µ are k-dimensional vectors and θ and σ are k × k matrices, see Advanced Risk and Portfolio Management [24] for further readings. A multivariate Ornstein–Uhlenbeck process can be described as follows,

dXt = θ(µ− Xt)dt + σdWt. (14)

Cholesky decomposition of sigma can be used to generate a multivariate Wiener process, see Haugh’s lecture notes [25, sec. 5.1] for further instructions on how to generate correlated normally distributed vectors.

3.4.2 Vector Autoregression

Autoregression (AR) is a regression method where the next value of a time series is regressed on the p previous values of that series. A simple univariate AR(p) model

(26)

can be described as follows,

Xt= β0+

p i=1

Xt−iβi+ ϵt, (15)

ϵt∈ N(0, σ2) (i.i.d), (16)

which is, Xt= Xt,pT β + ϵt, (17)

Xt,p= [

1 Xt−1 Xt−2 . . . Xt−p ]T

, (18)

β = [

β0 β1 . . . βp ]T

. (19)

Values of the parameter vector beta can be estimated using ordinary least squares (OLS) or maximum likelihood (ML). Vector autoregression (VAR) uses the same principle as the univariate version but several different time series are used to predict new values of those time series. This is useful when there is a strong correlation between the time series. A k-variate V AR(p) model can be described as follows:

Xt+1 = Xt,pβ +

k i=1

βi(0)+ ϵt, (20)

ϵt ∈ Nk

(

0,∑)

(i.i.d) (∑

:= covariance matrix), (21) Xt,p =

[

X1(p) X2(p) . . . Xk(p) ]

(Block vector), (22) Xi(p) =

[

Xi(t−1) Xi(t−2) . . . Xi(t−p) ]

, (23)

β =







β1,1 β1,2 . . . β1,k β2,1 β2,2 . . . β2,k

... ... . .. ... βk,1 βk,2 . . . βk,k







(Block matrix), (24)

βi,j = [

βi,j(t−1) βi,j(t−2) . . . βi,j(t−p) ]T

, (25)

β(0) = [

β1(0) β2(0) . . . βk(0) ]T

. (26)

(27)

Clearly, the number of parameters increase rapidly as n and p increases, in fact, it can be shown that the number of parameters in the model is k + pk2.

(27)

As shown by APRM [24], a discrete univariate Ornstein–Uhlenbeck process is equivalent to an AR(1) process. Furthermore, as shown in [24], this equivalence also holds for the multivariate case. A VAR(1) process can be expressed as a multivariate Ornstein–Uhlenbeck process by writing θ and µ from equation (14) as [24, eq. 44.147-148],

θ = ln(β)

∆t , (28)

µ = ln(β)

∆t (Ik− β)−1β(0), (29) where ln(β) is the matrix-logarithm, a consequence of this is that the equivalence may not hold if the the matrix-logarithm does not exist for β.

3.4.3 Brownian bridge

A Brownian bridge is a standard Brownian motion conditioned on that the end value is zero [26]. It can be described as follows,

{W (t), t ∈ [0, T ]|W (T ) = 0} , (30)

where W (t) is a standard univariate Wiener process. It can be implemented in the continuous univariate case as follows [26],

B(t) = W (t)− t

TW (T ) t∈ [0, T ]. (31) A multivariate version can be implemented by using a multivariate Wiener process. Brownian bridges can be used to simulating intermediate values between observations in a time series. An example of a multivariate Brownian bridge is shown in figure 3.1.

(28)

0.0 0.2 0.4 0.6 0.8 1.0

−0.40.00.40.8

Brownian Bridge

t

B(t)

Figure 3.1: A multivariate Brownian bridge with positive correlation between variables

(29)

4 Methodology

This simulation model is developed as a software that analysts at the Swedish National Debt Office can use and incorporate into other projects. Only a small part of the code is published in the appendix of this paper since several thousands of lines of code were needed for the model and a large portion of that is specific to the SNDO. However, all major parts of the code are described in this section. The language that was chosen is R [27] since it is vector-based, open-source, and used by other analysts at the SNDO. The R-library Parallel [27, lib. Parallel] is used to parallelize all calculations, this reduced computing time drastically.

4.1 Pricing of securities

The following types of securities are traded in the model and thus needs to be priced:

• Nominal government bonds

• Inflation-Linked bonds

• T-bills

• Overnight deposits

• FX futures contracts

(CAD CHF EUR GBP JPY USD)

• STIBOR fixed-for-floating swaps

Furthermore, STIBOR Forward Rate Agreements and Overnight Index Swaps were used to estimate historical parameters but were not traded in the simulation model.

4.1.1 Market value

It is straightforward to estimate the market value of a standard government bond or a zero-coupon bill given a yield curve, the standard form is as follows,

P0 =

n i=1

CFi· Dt0,ti. (32)

Equation (32) can be written in vector form as,

P0 = CFT · D, (33)

(30)

where P0is the price at time zero, CFiis the i-th cash flow and Dt0,tiis the forward discount factor from the settlement date (two bank days after the price date for Swedish government securities) to the date of the i-th cash flow. Let c be the coupon size, it then holds that,

CFi =





c if i̸= n c + 100 otherwise

(34)

The discount factors can be written as,

Dt0,ti = D0,ti

D0,t0, (35)

D0,ti =exp [−r(0, ti)ti] , (36)

⇒ Dt0,ti =exp [r(0, t0)t0− r(0, ti)ti] , (37)

where ti is the ACT/365 time to the i-th cash flow adjusted for when the coupon date is not a bank day. r(0, ti)is the continuously compounded zero-coupon yield from the nominal government yield curve.

The same method can be used to price Inflation-Linked-bonds, however, the real government yield curve should be used and the discounted cash flows should be multiplied by the inflation factor I as described by equation (5). In addition, it would be reasonable to adjust the price of the bond for the seasonality of CPI, see Section 4.2.3. The price of an Inflation-Linked-bond at time t maturing month m can be estimated by,

P0 = Sm−3ItCFT × D, (38) where Sm is the seasonal adjustment factor for month m as described in section 4.2.3 and It is the index factor at time t using a seasonally adjusted value of CPI.

This method is used since we want to adjust today’s value of the index factor as well as adjusting the future expected CPI for the month that all cash flows occur. Note that this assumes that all cash flows occur in the same month, this is indeed the case for Swedish government IL bonds. Three-month lagging adjustment factors are used since the index factor is three-month lagging [13].

The only type of swaps that are traded in the simulation are fixed for floating

(31)

STIBOR 3-month swaps. As explained in section 3.1.1, it is appropriate to discount cash flows of collateralized Swaps with the OIS curve. However, for the simplicity of the model, future swap cash flows are discounted with the STIBOR swap curve.

This is an approximation but it will have a negligible effect on the result. This, as well as equation (2) implies that swaps can be priced according to the following formula,

Ct= ∑Dt,Tn 0 − Dt,Ti

i=1iDt,Ti, (39)

Dt,Ti =exp [−r(t, Ti)Ti] , (40) where Ctis the fixed coupon size and T0is the time to the settlement date. Swaps are priced such that the initial value of the transaction is 0. Furthermore, it is not possible to trade a swap more than one time, every transaction will thus generate a new swap contract.

Overnight deposits or loans are securities with a time to maturity of just one bank day. Since they are often rolled over for multiple days, they are treated as FRNs with a tenor of one bank day in this model. Thus, the market value of the instrument at a given time tncan be described by,

Ptn = Ptn−1

Dtn−1(0, tn− tn−1), (41)

⇒ Ptn = Pt0

n−1

i=0 [Dti(0, ti+1− ti)] [tn > t0] , (42) where Pt0 is the price at any given day assuming that no trading has occurred between the two dates. The subscript of the discount factor D indicates which yield curve to use. It is assumed, since Swedish government debt is widely regarded as risk-free [3], that the interest rate is the same for deposits as it is for loans.

Hence, a short position can be held in a deposit to borrow funds and, thus, there is no need to create a separate instrument for loans. These instruments are used both as short term financing and deposits but also as a bank account. Like other financial institutions, the SNDO does not have a traditional bank account, instead, all cash flows must sum to zero at the end of every day. An overnight deposit acts as a residual to all other cash flows such that the sum of all cash flows including

(32)

the residual deposit is zero. The cash flow of the residual deposit at an arbitrary day t is described by the equation below,

0 =

n i=1

CFi(t) + CFres(t) + CFext(t), (43)

⇒ CFres(t) =

n i=1

CFi(t) − CFext(t), (44)

where CFi(t) is the cash flow of the i-th instrument at day t and CFext(t) is the external flows due to fiscal deficit or surplus at day t. Although this is a reasonable representation of how the SNDO manages liquidity in reality, the absolute value of the residual deposit must not be too large over a long period since it is unreasonable to refinance a large portion of the Swedish national debt every day.

The SNDO issues both bonds denoted in foreign currency and short term Commercial Papers, on the other hand, the long term duration of the foreign currency debt should not increase one-year [2]. Consequently, derivatives are used to shorten the duration of the foreign currency debt. In fact, this means that the foreign currency debt can be replicated by cross currency swaps or FX-futures instead of bonds and Commercial Papers. In this model, all foreign currency debt is replicated by three months FX futures. As shown in Section 3.1.3, a three month FX future can be priced with a STIBOR term structure and an implied three- month foreign yield. Thus, only a three-month observation of the implied yield as well as a spot exchange rate are needed for the model. After three months, the futures contract is automatically renewed for three additional months in the model. This is almost identical to a Cross-currency swap but this method only requires an implied three-month yield compared to a Cross-currency swap which requires a LIBOR spread which might be more complicated to simulate. In this model, it is only possible to trade a specific FX forward when its value is zero, i.e.

one time every three months. To trade more regularly, new contracts need to be created. Since trading is only done when the market value is zero, there is no need to calculate any market value of the FX contracts.

(33)

4.1.2 Book value

When calculating debt costs it would be inappropriate to value the debt portfolio by its market value. For instance, if interest rates decrease unexpectedly, the market value of existing bonds increases but the actual costs of the existing bonds are unaffected. The cost of existing fixed coupon and zero-coupon bonds should be independent on future changes in interest rates and default probabilities.

Instead, existing bonds were discounted with its average Yield To Maturity (YTM) independent on market fluctuations. This alternative valuation measure is referred to as Book Value in this thesis. Furthermore, clean value is defined as the book value minus the accrued interest.

The book value of government bonds and T-bills are calculated in this model using the same procedure as the SNDO’s portfolio management system. Firstly, each instrument’s average YTM need to be calculated. Unintuitively, the average YTM immediately after the first issuance is not equal to the YTM of that transaction.

Instead, it is calculated using the following procedure:

1. Calculate the dirty price of the security by discounting the cash flows to the settlement date (two bank days after the price date) using the transaction YTM, see equation (3).

2. Solve equation (3) numerically for the YTM discounted to the price date that gives the actual dirty price. This is the first average YTM of the security.

The average YTMs for all subsequent transactions are calculated using the following logic:

1. The old clean price was calculated from the previous average YTM.

2. The clean price of the new transaction was calculated from the transaction YTM.

3. Let Noldand Ntransbe the old and transaction nominal amount respectively, and Pold and Ptransbe the clean prices. The new clean price is the weighted average such that,

Pnew = Nold· Pold+ Ntrans· Ptrans

Nold+ Ntrans

. (45)

(34)

4. Calculate the new dirty price by adding the accrued interest to the clean price.

5. Determine the new average YTM by solving equation (3) numerically for the YTM that gives the new clean price (discounted to the price date).

This is a rather complicated and time-consuming method but other debt offices do not need to use exactly this method, this method was chosen to replicate the SNDO’s existing software. The accrued interest of a bond was computed using the following formula given by the Swedish Securities Dealers Association [13, sec.

2],

U = I× [

360− dc

360 ]

, (46)

where I is the inflation index factor, dc is number of days to the next coupon (using 30/360 date convention [13, sec. 1]) and C is the coupon size. The average YTM is unaffected when a debt security is repurchased but the nominal amount is clearly reduced. As a consequence, a cost occurs when bonds are repurchased for more than their book value. The book value at an arbitrary day is calculated by computing the clean value and accrued interest based on the average YTM.

Overnight deposits have daily compounding of interest in this model and the interest rate is reset to the market overnight rate every bank day. Hence, the book value of an overnight deposit is the same as its market value. See Section 4.1.1 for an explanation on how to calculate market values of overnight deposits.

A fixed for floating swap can be replicated by a long position in a fixed coupon bond and a short position in a three-month floating rate coupon bond, as explained in Section 3.1.1. Consequently, the book value of a swap is calculated as the difference between the book value of a coupon bond and the book value of a FRN. The difference in clean value between the fixed and the floating legs is always equal to zero since the average yields are the fixed coupon rate and the floating coupon rate respectively and the bonds were traded at par at issuance.

The accrued interest was calculated in the same way as a standard coupon bond for both the fixed and the floating leg. In conclusion, the book value of a fixed for floating swap is equal to the difference in accrued interest between a fixed coupon bond with a coupon rate equal to the fixed-rate and a STIBOR FRN.

(35)

4.1.3 Cost and risk calculation

The simulation aims to compute costs in different scenarios and with different portfolios. Thus, costs must be measured using a reasonable method.

Furthermore, it was not obvious how to create a reasonable risk measure and several different methods have been proposed by other authors, for instance, the Conditional cost-at-risk measure used by the Turkish treasury [4].

It is not a viable option to derive the probability distribution of the debt cost analytically since the system is too complex. Hence, Monte Carlo simulation is used to estimate the expected value and standard deviation of costs by generating a large number of observations and then calculate the observed cost in each scenario. Let X be the debt cost from t0 to T , we are then interested in the distribution of,

X|Sk,Ft0 :=

T t0

(Xt|Sk,Ft) dt, (47) where (Xt|Sk,Ft)is the cost at time t given a portfolio strategy Skand a filtration Ftcontaining all information up to time t. Hence, (X|Sk,Ft0)is the accumulated cost over a time period for a specific portfolio strategy.

Let CSki)be the observed cost in the i-th Monte Carlo scenario at time t using the k-th debt management strategy. ωi contains all simulated macroeconomic data in the i-th scenario. Then, the observed cost in the model from t0 to T is the accumulated observed cost over that time period,

CSki) :=

T t0

cSk,ti) dt. (48)

Monte Carlo simulation let us estimate the distribution of costs as follows,

X|Sk,Ft0 ∈ N(

CˆSk, ˆσS2

k

)

, (49)

where ˆCSk is the arithmetic mean of all observed costs for the k-th portfolio strategy and ˆσSk is the sample standard deviation.

The general equation for observed costs defined in equation (48) is discretized to monthly costs since it is not practical to measure continuous costs. The observed

(36)

portfolio cost during N months in the i-th scenario using portfolio Skis

C(Sk)i) :=

N t=1

Ct(S−1,tk)i), (50)

where Ct−1,tis the observed cost from month t− 1 to t and ωiis the i-th simulated observation. Furthermore, the portfolio cost is simply the sum of the cost of every security,

Ct(S−1,tk)i) :=

D d=1

Ct(S−1,tk,d)i), (51)

where Ct(S−1,tk,d) is the cost of the d-th security in a portfolio of D instruments.

Furthermore, the cost of the d-th instrument was defined as,

Ct(S−1,tk,d) := ∆BVt(d)−1,t+ CFt(d)−1,t, (52)

∆BVt(d)−1,t := BVt(d)− BVt(d)−1 (change in book value), (53) CFt(d)−1,t :=

Nc

c=1

CFc(d) (sum of all cash f lows). (54)

I.e., the cost for a security over a period is defined as the difference in book value over that period plus the net cash flow of that instrument over the same period.

For every month, the cost of a financial security is computed as follows:

1. Compute the difference between the book value at the beginning and end of the period.

2. Sum all cash flows due to transactions (issuance and repurchases).

3. Sum all cash flows due to coupon payments and maturities.

4. The cost of the instrument is the sum of (1) to (3).

This is simply equation (52)-(54) expressed in text. Clearly, all cash flows that occur in a foreign currency must be exchanged to Swedish krona using the spot exchange rate that day. The total krona amount of debt cost is computed using equation (50). An (almost) equivalent but arguably more intuitive cost measure would be to divide the yearly krona amount of debt cost with the average book

(37)

value of the portfolio, this gives the effective interest rate per annum,

re(Sk)i) := C(Sk)i)

BV(Sk)i) × 12

N, (55)

where BV is the mean book value over the simulation period.

The expected cost for a specific portfolio strategy Skcan then be estimated as the mean observed accumulated cost for that strategy. Equivalently, the expected effective interest rate with the k-th strategy can be computed as follows

ˆ

r(Se k)= 1 n

n i=1

r(Se k)i), (56)

I.e., the expected effective interest rate is estimated as the average observed effective interest rate over the simulation period.

The risk measure is defined as the standard deviation of the effective interest.

This is estimated by calculating the sample standard deviation of the effective interest rate. Note that it is the volatility in cost between different scenarios that is measured, not the variance over time, this is indeed an important distinction.

4.2 Modeling of macroeconomic data

4.2.1 Term structures

Nelson-Siegel-parameters for the following term structures needed to be simulated:

1. Nominal Swedish government yield.

2. Real (IL) Swedish government yield.

3. STIBOR swap curve.

There are no public NS- or NSS parameters for the Swedish government debt market, furthermore, a general description on how to estimate parameters would fall outside of the scope of this project. However, Gilli et al. [16] have written a brief introduction to NSS parameter estimation. Diebold & Li [8] have written a

(38)

paper describing their method of simulating NS-based yield curves, they optimize all beta-parameters while keeping the lambda-value fixed (see equation (8)) for historical data. The three beta-parameters can then be seen as time series that can be simulated. Diebold & Li used a fixed value of lambda (which is the inverse of lambda used in equation (8)) of λf ix = 0.0609which maximizes the effect of beta 3 at a duration of 2.5 years [8]. They also used monthly time-periods instead of yearly, this is equivalent to estimating yearly lambda for equation (8) as follows,

λf ix = 1

12λ(Diebold)f ix = 1

12· 0.0609 ≈ 1.37. (57)

This value of lambda is used in this model. Parameters for the Swedish government nominal yield as well as the real yield curve and the Nominal- STIBOR-spread curve needed to be estimated, this implies that a total of nine yield curve-parameters needed to be simulated. Swedish government securities were used to estimate historical parameters of the nominal and real yield curve.

STIBOR-swaps, overnight deposits and forward rate agreements were used to estimate STIBOR parameters. All data needed to estimate the parameters is available from data providers such as Bloomberg. The three beta parameters were modeled as Ornstein–Uhlenbeck processes (see Section 4.2.4).

An alternative approach would be to model the expected future yield curve as the forward yield curve at the start date of the simulation.

EQ[rt(0, τ )|F0] = r0(t, t + τ ) f or any [t≥ 0, τ > 0] . (58)

I.e. that the expected future spot yield for an arbitrary duration is today’s forward interest rate. This is somewhat related to the Vasicek-model for short-term rates [28]. This holds under the risk-neutral probability measure Q, nevertheless, the existence of term premia imply that it may not hold under the physical probability measure P, see Section 3.3. Thus, this method is not used. See for instance Orphanides & Kim [19] for further readings on term premia.

(39)

4.2.2 Foreign exchange rates and implied foreign interest rate

The spot Foreign Exchange rate between SEK and CAD, CHF, EUR, GBP, JPY, and USD needed to be simulated. One logical approach would have been to model spot exchange rates such that the expected value satisfies the Uncovered Interest rate Parity (UIP), see Section 3.3 and Isard [20] for further reading on UIP. However, as explained in Section 3.3, there is strong empirical evidence that the UIP does not hold and that currencies with high interest rates generally have higher real interest rates than those with low nominal interest rates. No drift of foreign exchange spot rates is used regardless of the interest rate difference since this may be more realistic than the UIP. Spot exchange rates were indeed modeled as martingales,

EP[St+∆t|St= st] = st. (59) Consequently, historical residuals were simply calculated as follows:

e = [

e1 e2 . . . eT

]T

, (60)

where, ei = si− si−1 (si := spot rate at time i). (61)

Hence, the distribution of a spot exchange rate is simply modeled as follows,

S∆t ∈ N(S0, ς2∆t), (62)

where ς is the sample standard deviation of the residual e. However, note that all variables need to be simulated simultaneously as a stochastic vector to adjust for the correlation between variables, see Section 4.2.4.

The weighted spread between three-month foreign implied interest rates and the domestic interest rate can on a given day be calculated as follows,

rspread= RTF X· DF X− rstibor, (63)

where RF X is a vector of implied three-month foreign interest rates and DF X is a vector of the distribution between currencies such that the sum of all elements is equal to 1. Issuing foreign currency debt has an expected cost advantage in this

(40)

model if the spread is negative. The total cost of issuing foreign currency debt instead of domestic debt is the average yield-spread plus the difference in the spot exchange rate between the start and the end of the simulation.

The model aims to choose a relative distribution vector DF X such that the initial spread is negative but future spreads are, clearly, unknown when the initial distribution is chosen.

4.2.3 Consumer price index

Swedish Inflation-Linked bonds have nominal amounts that are linked to the Swedish CPI (KPI). Swedish CPI-values are published every month and thus, a value for each month needed to be generated. Barclays [29] has shown that there is a strong seasonality in CPI and, hence, it is reasonable to take seasonality into account when modeling. The basic idea behind the modeling of CPI is as follows:

1. Create a time-series of historical seasonally adjusted CPI values and adjust for the publishing date of the data.

2. Simulate future values of that time-series.

3. Add the historical seasonality to the simulated time-series.

Since CPI does not have a steady level, a multiplicative seasonality model is used instead of an additive. The value each month, CP Iy,m, is described by a seasonally adjusted value Py,m and a seasonality factor Smsuch that,

CP Iy,m = Py,m · Sm. (64)

CPI data from January 2002 to December 2019 is used. The R-function stl from the Stats-library [27, lib. stats] is used to extract seasonality adjustment factors Sm. A seasonally adjusted time series of historical CPI is then calculated by rearranging equation (64) as:

Py,m = CP Iy,m

Sm . (65)

References

Related documents

Secondly, we predicted that smaller firms have lower ratios of long-term bank debt than larger firms since the borrowers usually pay for the monitoring costs

This paper shows that if the period following the granting of debt relief is taken into account, debt relief increases adjustment effort (investment), irrespective of whether there

The covariates used in the final model were; Dow Jones closing price, Shanghai opening price, conjuncture, oil price, share’s opening price, share’s highest price,

Columns (3)-(7) represent numerical results of option prices by the binomial tree method with 270 time steps, regression, Dual- ˆ V with 100 generated subpaths and the

In this thesis a mathematical approach is applied to analyse sales statistics using the multiple regression model in order to construct a model that predicts the value of an

Genom att datorisera äldreomsorgen hoppas beslutsfattare och andra på goda effekter såsom bättre tillgång till information i sam- band med möte med den äldre, förbättrad

Rådande bostadsbrist i kommunen är många gånger en anledning till lågt flyktingmottagande, många kommuner anser sig helt enkelt inte ha plats för att ta emot

7.. År 2003 tillkom ett tillägg i läroplanen angående daglig fysisk aktivitet. I och med detta lades ansvaret för fysisk aktivitet på hela skolans personal. Här följer