Ước lượng vasicek bằng OLS
Ước lượng vasicek bằng OLS
Ước lượng vasicek bằng OLS
VASICEK MODEL
Gönül AYRANCI
Bornova-İZMİR
2013
i
YASAR UNIVERSITY
GRADUATE SCHOOL OF NATURAL AND APPLIED SCIENCE
Gönül AYRANCI
Bornova-İZMİR
2013
ii
ÖZET
DAĞILIMLARI
AYRANCI, Gönül
Mayıs 2013
ABSTRACT
AYRANCI, Gönül
Mayıs 2013
In this study time series of TRLIBOR interest rates in different maturities are
modeled with Vaiscek Model. OLS method is used for calibrating the model
parameters of Vasicek to TRLIBOR rates data which is between 2.01.2008 and
5.12.2012. Then distributions of parameters are obtained by using Monte Carlo
Simulation ragarding the Vaicek Model. Thus, not only parameters are estimated but
also confidience intervals are given.
ACKNOWLEDGEMENTS
I would not have been able to complete this journey without the aid and support of
countless people.
First I must express my gratitude to my supervisor Assist. Prof. Dr. Banu Özgürel
for the guidance, useful comments, remarks and engagement through the learning
process of this master thesis.
I want to express the separate gratitude to Assist. Prof. Dr. Serkan Albayrak for
his advices, irreplaceable contributions, support and especially for his helps in
application of this study.
I am also grateful to Prof. Dr. Behzat Gürkan for encouragement and support in
many ways to the success of this study.
Last but not least, I would like to thank my parents and friends, especially my
Mother and Father for their unconditional support throughout my study.
vi
TEXT OF OATH
TABLE OF CONTENTS
1 INTRODUCTION ...........................................................................................1
2 METHODS ......................................................................................................5
2.1 Model Description ....................................................................................5
2.1.1 Vasicek Interest Rate Model..............................................................6
2.2 Parameter Estimation ................................................................................9
2.2.1 Ordinary Least Square Estimation for Vasicek Model......................9
2.2.2 Maksimum Likelihood Estimation for The Vasicek Model ............10
2.3 Monte Carlo Simulation..........................................................................11
3 APPLICATION .............................................................................................16
4 CONCLUSION .............................................................................................24
5 BIBLIOGRAPHY .........................................................................................25
viii
INDEX OF FIGURE
INDEX OF TABLE
Abbreviations Explanation
CIR Cox-Ingersoll-Ross
1 INTRODUCTION
Interest rates are an indicator for the global cost of the money. There are
financial instruments which directly link with interest rates in portfolio of
financial institutions and especially of insurance companies. Interest rates and the
volatility of interest rates play a crucial role in estimation of losses which is
caused for holding the money. Moreover there are some government regulations
about estimation of those losses for insurance companies (Solvency II). Insurance
companies have to calculate the capital requirement for the market risk under the
Solvency II requirements. There is a committee that is established by Treasury on
2009 for inform the sector about Solvency II directives and assess the impact of
these directives on the insurance sector. Ten insurance companies, of which 5
operate in life, 4 non-life and 1 in reinsurance, participated in these studies. The
Solvency Capital Requirement (SCR) is the new solvency standard for firms in
Solvency II directives. SCR is based on the idea that an insurance firm should
have the amount of capital that is sufficient with a 99.5% confidence-level to
guarantee that the firm will have enough assets to cover its liabilities at the end of
one year period. In other words, SCR calibrated to the Value-at-Risk of basic own
funds subject to a confidence level 99.5% over a 1 year time horizon. The SCR is
intended to reflect all quantifiable risks that the firm might face. A basic SCR
calculation divided into modules per risks, with adjustment for the loss-absorbing
capacity of technical provisions and deferred taxes. These calculations must be
done at least once per year using a standard formula or an internal model. But
internal models improve risk sensivity of SCR and provide better risk
management, which also improves policyholder protection (CP20 final advice1).
Martin (2012) applies the model of Gatzert and Martin (2012) for deriving a
partial internal model for the market risk module regarding the underlying interest
rate process and parameters. Solvency II Directive gives an option to model only
certain risk modules or business units and to use the standard formula for the
remaining parts.
1
CP20 is a consaltation process initiated by CEIOPS (Committee of European Insurance and
Occupational Pensions Supervisors) on the “advice to the European Commision in the Framework
of the Solveny II”
2
There is a figure below that shows the risk modules of SCR (Figure 1.1).
As we can see in the Figure 1.1, interest rate risk plays a significant role
for calculating SCR (Martin, 2012). The aim of this study is to evaluate model
with focus on market risk module of Solvency II regarding the interest rate risk.
Already it is an inevitable fact that insurance companies must have fitting interest
rate model while they estimate the value at risk (VaR) on a specific portfolio of
financial assets. Also Martin (2012) shows that the change in SCR is sustainable
when changing the underlying interest rate model.
rates. Also enormous literature in finance such as Vasicek (1977) and Cox,
Ingersoll and Ross (CIR) (1985) have documented that interest rate should be
followed by a stochastic process.
2 METHODS
There are also single or multi-factor models for the interest rate modeling
and the Vasicek model is classified as one-factor model and the interest rate is
called instantaneous interest rate. In one-factor models it is accepted that there is
only one source of the risk. These models may be preliminary among the recent
multi-factor models but they provide a good introduction to the study of interest
rates. Moreover they can be easily solved and Sorwar (2007) states that the
existence of analytical solutions leads to quick valuation of the bond, option,
prices, and the hedge parameters such as delta for risk management purposes.
(1)
(2)
(3)
where Wt is a Wiener process (also called Brownian Motion) under the risk
neutral measure modelling the random market risk factor. With ,
corresponding to the choice , in equation (1). This
description of the spot rate process has been proposed by Merton (1971).
The most important feature which this model exhibits and explained by
Vasicek is the mean reversion, which means that if the interest rate is bigger than
the long run mean ( then the coefficient makes the drift become
negative so that the rate will be pulled down in the direction of . Similarly, if
the interest rate is smaller than the long run mean ( , then the coefficient
makes the drift term become positive so that the rate will be pulled up in
7
One of the most attractive feature of the Vasicek Model is that there is
close form solution for . We start solution of the Stochastic Differential
Equation (2) by taking the derivative of , which yields:
(4)
(5)
(6)
(7)
8
(8)
(9)
If we multiply both sides of the equation with the solution of the differential
equation (2) is:
(10)
(11)
and variance:
(12)
If time increases the mean tends to the long-term value and the variance
remains bounded, implying mean reversion. The long-term distribution of the
Ornstein-Uhlenbeck process is stationary and is Gaussian with mean and
2
Önalan Ö., Vasicek ve CIR Modelleri Kullanılarak Oynaklık ve Faiz Oranlarının Modellenmesi,
Marmara Üniversitesi, İİBF dergisi, II, S. 329-344, 2009.
9
(13)
(14)
(15)
(16)
(17)
(18)
Rearrange equations (16), (17) and (18) in terms of the parameters α, β, and
which yield:
10
(19)
, ,
(20)
(21)
(22)
MLE method is consistent for the Vasicek model since its error term is
normally distributed (Ren Raw Chen, 1996). So, the likelihood function can be
derived for the MLE. We need to define the likelihood function and find the
paremeters that maximize the likelihood function. There is different methods in
literature for maximize the methods likelihood function (Sypens, 2010).
Optimization method is explained for this problem. The conditional probability
function is derived by combining the solution of our model with the normal
distribution function (Calibrating the Vasicek Thijs Von den Berg, 2011).
(23)
(24)
(25)
(26)
Carlo Simulation. Also it is used in kinetic theory of gases by Kelvin (1901). But
the method today labeled as “Monte Carlo Method” is formally introduced to the
literature by Ulam (1940) where he advocated the use of computers in an
integration problem related to Manhattan Project which has no formal solution.
We can explain Monte Carlo method further with a nice and well-known
example of value estimation. is a constant that is the ratio of a circle’
circumference to its diameter. It is simply accepted as 3.14 but true value cannot
represent as a finite decimal fraction. Let us consider a unit circle with a radius 1.
If is a point on the unit circle, by the Pythagorean Theorem, that satisfy the
following equation;
(27)
By choosing random points on the plane, we need to decide each point that we
have chosen whether is within the circle or not. The quarter unit circle is
considered as shown in the following figure.
13
(28)
The unit circle area is equal to and the area of the quarter circle that we
(29)
If we pick a random point times and of those times the point lies
inside the unit circle, the probability of that a random point lies inside the unit
circle is given as :
(30)
14
where the dot indicates that this is a discreet distribution (because M and N are
integers). But if N becomes very large (theoretically infinite), the two
probabilities will become equal and we can write :
(31)
n=10000
x=runif(n)
y=runif(n)
counter=0
plot(NA,type="n",xlim=c(0,1),ylim=c(0,1),
xlab="n=10000",ylab="")
for (i in 1:n){
if ((x[i]^2+y[i]^2)<=1) {
counter=counter+1
points(x[i],y[i],type="p")
4*counter/n
15
( )
Monte Carlo simulation can be used to approximate probability distributions
of functions of random variables. For example, let be a random variable and its
expected value be If we generate independent random
variables from the same distribution then we can approximate by
(32)
3 APPLICATION
In this thesis, we are going to use TRLIBOR data with different time to maturities.
The Turkish Lira Interbank Offered Rate, or TRLIBOR, is the average interest
rate at which term deposits are offered between prime banks in the Turkish
wholesale money market or interbank market.
17
Our study sample from the web page of the Banks Association of Turkey
TRLIBOR3 data period is from 2.01.2008 to 5.12.2012 and contains 1230 daily
observations for each time maturity. The rates are shown in the following figures
in different maturities, 1 month (Figure 3.1), 6 month (Figure 3.2), 1 year (Figure
3.3) and overnight (Figure 3.4).
3
http://www.tbb.org.tr
18
It can clearly be seen from the figures (Figure 3.1, Figure 3.2 and Figure 3.3) in 1
month, six month and 1 year maturities same pattern is observed. TRLIBOR rates
were extremely high at the start of monitored period, especially in last months of
2008. After that there is a dramatic fall occurred in earlier months of 2009 and
then it seems stable from 2010 to 2011. Finally, there is an increasing trend
between the year 2011 and 2012.
In the case of overnight maturity, we observed a pattern that more sensitive than
the others especially on the last interval from 2011 to 2012. So to estimate the
parameters of Vasicek Model we use the daily TRLIBOR data with overnight
maturity.
19
The time series plots of our sample data is shown in the figures above. Since we
can observe from the figures, modeling interest rates is a very complex and hard
task. So Vasicek Model parameters will be estimated using TRLIBOR data.
(33)
(34)
In order to estimate the development of the instantaneous interest rate the Euler-
discretisation of the Vasicek Model (Equation 33) is used and is given:
(35)
In the simulation process, the most important step is to estimate the parameters of
our model accurately. Parameter estimation methods regarding the
Vasicek Model are described in Chapter 2. Estimation of parameters with OLS
method gives very similiar results to MLE (Sypkens, 2010). To estimate the
parameters of our model we use OLS method and run the R code below which
estimates required parameters (Table 3.1)
Vasicek.OLS = function(data,dt){
N = length(data)
rate = data[2:N]
lagrate= data[1:(N-1)]
a=(N*sum(rate*lagrate)-sum(rate)*sum(lagrate))/
(N*sum(lagrate^2)- sum(lagrate)^2)
alphahat = -log(a)/dt
v2hat=sum((rate-lagrate*alpha-betahat*(1-a))^2)/N
sigmahat=sqrt(2*alpha_hat*v2hat/(1-a^2))
c(betahat,alphahat,sigmahat)}
To estimate distribution of the parameters that fits Vasicek Model, Monte Carlo
Simulation explained in Chapter 2 is used and the codes of process are given:
init.value=test.data[sizedata[1]]
sizeofsim=1000
sizeofMonteCarlo=1000
delta.t=1/260
set.seed(1)
TEZ=matrix(data=NA,nrow=sizeofMonteCarlo,ncol=3)
for (j in 1:sizeofsim){
r=init.value
for (i in 2:sizeofsim){
delta.r=(outt[2]*(outt[1]-r[(i-
1)])*delta.t)+(outt[3]*rnorm(1)*sqrt(delta.t))
tempo=r[(i-1)]+delta.r
r=c(r,tempo)
TEZ[j,]=Vasicek.OLS(data=r,dt=1/260)
In each run of the Monte Carlo Simulation process, new parameter values are
estimated from the interest rate observations. Each run initiates from a different
21
random point. Furthermore at each step randomized variates enter the model
distinguishing each run. Monte Carlo does this process thousands of times. This
process runs with two simulation steps. The histograms and plots of the
simulation results are given.
As we can see in the Figure 3.5 observations of estimation, which of long run
mean from simulated values of interest rate, have extreme values (outliers)
relative to other observations. Ghosh and Vogt (2012) states that there is three
main approaches to eliminate outlier problems:
22
1. To keep the outlier and treat it like any other data point
2. To modify its value
3. To eliminate it
Also they state that method 2 and 3 introduce statistical bias and may undervalue
the outlier.
To obtain distribution of parameters, increase our sample size the simulation step
is increased to 10000 times.
Now after the simulation with time step n=10000, parameters are normally
distributed as it can be observed in the Figure 3.7 and Figure 3.8. We give our
results in Table 3.2 %95 confidence intervals and Table 3.3 %99 confidence
intervals for the estimated parameters.
As we can see from Table 3.2 , there is a significant difference between the
confidence interval borders for the long term mean and speed of reversion
parameters. Also increasing confidence level (%99) caused increase in interval
length. Any chosen parameter ignores the confidence intervals may cause over
estimation or under estimation of the model parameters and interest rates.
4 CONCLUSION
This study has been focuses on the distribution of the Vasicek Model
parameters. First we emphasized the importance of interest rate modeling
especially in insurance sector. As we indicate in introduction, with the new
regulations about capital requirements (Solvency II) modeling interest rates arise
one of the most important problem in that field. First we gave a general form of
the stochastic differential equation for the interest rate modeling. The focus is on
the Vasicek Model. The solution of the stochastic differential equation of Vasicek
Model is given and it is shown that two different parameter estimation methods,
25
Ordinary Least Square and Maximum Likelihood estimation, can be applied to the
model. Then Monte Carlo Simulation Method is explained.
In the third part of this study is the application of the model on a data set from
TRLIBOR rates. We simulated new data set that is approximated by Euler
discretization with parameters from OLS estimators. This process applied with
Monte Carlo Method for 1000 time steps and 10000 time steps. First simulation
gave us distribution of the long term mean with outliers and also high variance. In
order to achieve greater accuracy, we increased the sample size to 10000. After
we clearly saw that our estimated parameter values from simulations are normally
distributed, we gave our results with the %95 and %99 confidence intervals for
the parameters.
In this study our aim is observing the distribution of the Vasicek Model
parameters. There are already various studies about parameter estimation of the
Vasicek and other diffusion models. But we used Monte Carlo Method for
obtaining the distribution of the estimated parameters. Through this technique we
observed probability distributions of parameters and we also got confidence
intervals. It can be clearly seen major difference between the borders of the
intervals for long term mean and mean reversion parameters. So during the
parameter estimation process confidence intervals are necessary for more
accuracy. This step is the key element of our study because probability
distributions are much more realistic way describing uncertainty in variables of
risk analysis.
5 BIBLIOGRAPHY
Brigo, D., Neugebauer, M., Dalessandro, A., and Triki, F., (2009). A stochastic
Processes Toolkit for Risk Management, Journal of Risk Management in
Financial Institutions, Vol. 3, 1.
Hsiao C. and Semmler W., Modeling Short Term Interest Rates, (2002), Elsevier
Science
Şahin H. and Genç İ., (2009), Kısa Dönem Faiz Modellerinin Türkiye için
Ampirik Analizi, BDDK Bankacılık ve Finansal Piyasalar, Cilt 3, Sayı 2.
Martin M., (2012), Assessing the Model Risk with Respect to the Interest Rate
Term Structure under Solvency II, FAU.
Zeytun S. and Gupta A., (2007), A Comparative Study of the Vasicek and the
CIR Model of the Short Rate, Berichte des Fraunhofer ITWM, Nr. 124
Hull J. and White A., (1990), Pricing Interst Rate Derivative Securities, The
Review of Financial Studies, Volume 3, number 4, p. 573-392.
Tang C. and Chenb S., (2009), Parameter Estimation and Bias Correction for
Difusion Processes., Journal of Econometrics 149, (2009) 65-81.
Semir C. and Taray M., (2005), Türk Lirası Referans Faiz Oranı-TRLIBOR
Uygulaması, Bankacılar Dergisi, Sayı 54.