Home > Bootstrap of Dependent Data in Finance

Page 1 |

∣ ∣ G��OTEBORG UNIVERSITY

MASTER��S THESIS

Bootstrap of Dependent Data in Finance

ANDREAS SUNESSON

Department of Mathematical Statistics CHALMERS UNIVERSITY OF TECHNOLOGY G��OTEBORG UNIVERSITY Göteborg, Sweden 2011

Page 2 |

Page 3 |

Andreas Sunesson

CHALMERS ∣

∣ ∣ G��OTEBORG UNIVERSITY

Department of Mathematical Statistics Chalmers University of Technology and Göteborg University SE−412 96 Göteborg, Sweden Göteborg, August 2011

Page 4 |

Page 5 |

Andreas Sunesson August 17, 2011

Page 6 |

Page 7 |

In this thesis the block bootstrap method is used to generate resamples of time series for Value– at–Risk calculation. A parameter to the method is the block length and this parameter is studied to see what choice of it gives the best results when looking at multi–day Value–at–Risk estimates. A choice of block length of the roughly the same size as the number of days used for Value–at–Risk seems to give the best results. iii

Page 8 |

Page 9 |

I would like to thank my supervisor, at Chalmers, Patrik Albin for his support during my work. He his an ideal supervisor for a student. Further on i wish to thank Magnus Hellgren and Jesper Tidblom and the rest of Algorithmica Research AB for their support. v

Page 10 |

Page 11 |

1 Introduction 1 2 Theory 2 2.1 Basic definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2 Autocorrelation function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.3 Serial variance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.4 QQ–plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.5 Kolmogorov–Smirnov test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.6 Value–at–Risk, VaR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.7 GARCH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.8 Ljung–Box test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.9 Kupiec–test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3 Resampling methods 7 3.1 The IID Bootstrap method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.2 Example of IID Bootstrap shortcomings . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.3 Block bootstrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.4 Example cont. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.5 Optimal block length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4 Financial timeseries 10 4.1 Stylized empirical facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.2 Interest rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.3 The dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 5 Implementation 12 5.1 Optimal block length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.2 VaR–estimaton by block bootstrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.3 VaR–estimation by stationary bootstrap . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.4 Implementation of VaR backtest. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 6 Results 14 6.1 Choice of blocklength . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 6.2 Backtests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 6.3 Comments on the results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 A C#–code 25 vii

Page 12 |

Page 13 |

In financial institutions there is an ever increasing need to estimate the risk of various positions. Today there exists a number of measures available to risk managers. A risk measure made popular by J.P. Morgan is the Value–at–Risk measure, which simply is the a chosen quantile of the loss distribution. Value–at–Risk quickly became popular in the industry was also soon adopted by the Basel Committee on Banking Supervision who regulated that a certain amount of capital was needed to cover for the risk exposure indicated by the Value–at–Risk measure. Initially, however, Value–at–Risk was based on an assumption of independent normal distributed asset returns, mainly because of the simplicity of calculation and the ease of explaining to senior managment. As known though, real world assets, in general, are neither normal distributed nor independent. This way of estimating Value–at–Risk is by the use of a parametric method, assumptions has been made of the underlying asset return process and parameters has been estimated from his- torical data. By the use of a non–parametric model, though, one can drop a lot of these model assumptions. One such non–parametric model is resampling by the Bootstrap method, initially proposed by Efron in 1979 [3]. This non–parametric model assymptotically replicates the density of the resampled process. The bootstrap method assumes independent asset returns and a problem with it, if you try to apply it on a dependent time series, is that the resampled series is independent. To correct for this some modifications to the bootstrap method was later proposed. In this thesis, dependent time series will be used to study extended versions of the bootstrap method, the block bootstrap and the stationary bootstrap. The choice of parameters for the meth- ods are of particular interest and are studied for empirical data by different approaches. Also, how does resampling by these methods preserve the autocorrelation structure in the resamples and further on Value–at–Risk estimates will be made based on the resamples. 1

Page 14 |

2.1 Basic definitions

We begin by looking at an asset with a price process {St}T

t=0, St > 0. We��re now interested in the

returns of this price process. There are a couple of ways to define this, starting with the simple net return, Rt defined by Rt = St St−1 − 1 Furtheron, define the log return, Xt, t �� [1,T] by Xt = log(1 + Rt) = log ( St St−1 ) . If we look at multiperiod returns Rt(l) and Xt(l) we see that they are obtained by multiplying the daily simple net returns between the desired days and adding the log returns for the same period. Further on we need to define the bias and the mean square error of an estimate. Suppose that {Xt}T

t=0 is identically distributed with some common distribution function, G. Suppose also that

in an experiment we get a sample from the previous sequence, {X1 ...Xn}. Now suppose we��re interested in the functional relation �� = ��(G) but don��t know the distribution G. We might esti- mate G with ˜G, from the sample {X1 ...Xn}. That is, ˜G(X1,...,Xn). Thus an estimate of �� is gotten by applying ˜G instead of G. Now is this estimate, ̂�� = ��( ˜G) a good one? To check this we introduce the bias, Bias(̂��) = E [ ̂�� ] − ��, which is essentially the average error we make by estimating �� with ̂��. Also we introduce the mean square error and define it by MSE(̂��) = E [( ̂��− �� )2] = Bias(̂��)2 + Var(̂��).

2.2 Autocorrelation function

The correlation, between two random variables X and Y , both square integrable, is defined through ��(X, Y ) = Cov(X, Y )/ �� Cov(X, X)Cov(Y,Y ). The sample correlation between two samples X = {X1,...,Xn} and Y = {Y1,...,Yn} with ¯X =

1 n

��n

i=1 Xi and ¯Y = 1 n

��n

i=1 Yi is defined by

��(X, Y ) = ��n

k=0(Xk − ¯X)(Yk − ¯Y)

�̡�n

k=0(Xk − ¯X)2 ��n k=0(Yk − ¯Y)2

. 2

Page 15 |

i=l+1(Xi − ¯X)(Xi−l − ¯X)

��T

i=1(Xi − ¯X) 2

,l �� [0,T − 1] Here a value of 1 for a specific l would indicate that there is a perfect correlation between the series starting at day k and the series starting at day k + l. Note that −1 �� �� �� 1.

2.3 Serial variance

The sample variance for X = {X1,...,Xn} is calculated by ̂ Var(X) = 1 n − 1

n

��

i=1

X2

i −

1 n ( n ��

i=1

Xi )2 . The reason for dividing by n − 1 instead of n is that this makes Var(X) an unbiased estimator of the variance if the process X is IID and stationary. When looking at multiperiod returns instead, how do we expect the sample variance to change? If we look at k–day changes, the sample size will decrease by a factor k. Thus we expect to see an increase in the sample variance since it is expected to increase with a decreasing sample. Now, looking at k–day, non–overlapping, returns, Xi[k]. Assume that they are stationary and IID and that k divides n evenly. The data set is Y = {Y1,...,Yn/k}, where Yi = Xi(k−1)+1 + ··· + Xik for i = {1, . . . , n/k}. We thus have n/k number of observations, the sample variance of this sample is, with an index k indicating the multiperiod returns, ̂ Vark(X) = ̂ Var(Y ) = 1 n/k − 1

n/k

��

i=1

Y 2

i −

1 n/k

n/k

��

i=1

Yi

2

= 1 n/k − 1

n/k

��

i=1

(X(i−1)k+1 + ··· + Xik )2 − 1 n/k

n/k

��

i=1

(X(i−1)k+1 + ··· + Xik )

2

. 3

Page 16 |

n/k

��

i=1

(X(i−1)k+1 + ··· + Xik )2 − 1 n/k

n/k

��

i=1

(X(i−1)k+1 + ··· + Xik )

2

= k n − k

n/k

��

i=1

E [( X(i−1)k+1 + ··· + Xik )2] − k n E ( n ��

i=1

Xi )2 = k n − k

n/k

��

i=1

( Var(X(i−1)k+1 + ··· + Xik) + E[X(i−1)k+1 + ··· + Xik ]2) − k n Var ( n ��

i=1

Xi ) + E [ n ��

i=1

Xi ]2 = k n − k (n k ( Var(Xi) · k + k2 E[Xi]

2)

− k n (n · Var (Xi) + n2 E[Xi]2) ) = k n − k ( n · Var (Xi) + nkE[Xi]

2 − k · Var (Xi) − nkE[Xi] 2)

= k · Var(X1), we see that the sample variance increases by a factor of k when the sample size decreases by a factor 1/k. Now if a sample does not show this tendency, apart from random noise, we could be inclined to say that the sample is not independent.

2.4 QQ–plots

Assume a stationary sample {X1,...,Xn}. A quantile–quantile plot, qq–plot, is a visual way of checking if the data in the sample belongs to a specified distribution. The ordered sample, {X(1),...,X(n)}, where X(i) is the i:th largest element, is plotted against the quantiles of the corresponding inverted density function. ( X(i),F

−1(i − 0.5

n )) ,i �� [1,n] The qq–plot can also be used to check if two samples come from the same distribution. Assume that the samples are of equal size, then the corresponding qq–plot is gotten by ordering the two samples with increasing values and plotting them against each other. If both samples belong to the same distribution, the plot is expected to lie on a 45◦ line. If the samples are of different sizes, the same principle applies but a form of interpolation between data points is required to make sure the same quantiles are being plotted against each other. A deviation from the 45◦ linear fit between the two samples would thus indicate that the two samples does not share the same distribution and it is in this manner the qq–plots will be used in this thesis. A bad fit will be ��seen�� as a rejection of some hypothesis of the samples not having the same distribution. This does not imply that they have the same distribution but it will indeed be an indication of it. 4

Page 17 |

The Kolmogorov–Smirnov test, KS–test, is a hypothesis test that can be used for testing if two samples belong to the same distribution. The KS–test usually analyzes a data set to check if it comes from a known distribution. However, in this article we are looking at non–parametric meth- ods and do not want to mix in any assumptions of that the data has a certain distribution function. We will compare the empirical distribution function of the resampled multi–period returns against the original series empirical distribution function. Under the null–hypothesis, the two compared data sets have the same distribution function. This is tested by calculating the statistic D = max

x

|Fest(x) − Femp(x)|. Under the null–hypothesis, �� n1n2

n1+n2

D is Kolmogorov distributed where n1 and n2 are the sample sizes of the first and the second series. Thus if the largest difference between the distribution functions are too large, the null–hypothesis is rejected.

2.6 Value–at–Risk, VaR

Value–at–Risk, VaR��(l), is the magnitude of which losses does not exceed, with probability p = 1 − ��, �� �� [0,1] in a timespan of l days. That is, VaR��(l) is defined through p = P[L(l) �� VaR��], where L is the loss function, for example L(l) = −(St+l − St). This can be rewritten on the form VaR��(L) = inf {l �� R : P(L �� l) �� ��} Note that VaR has a weak linearity property, that is for �� �� (0,��) and µ �� R, VaR�� (��L + µ) = inf {l �� R : P(��L + µ �� l) �� ��} = inf {l �� R : P(L �� (l − µ)/��) �� ��}, substitute k = (l − µ)/��, = inf {��k + µ �� R : P(L �� k) �� ��} = �� inf {k �� R : P(L �� k) �� ��} + µ = ��VaR�� (L) + µ. The textbook way of calculating VaR makes use of this fact when it assumes normal distributed log– returns. Calculating VaR is then reduced to estimating the mean,µ, and the standard deviation,��, of the log–returns. That is, at time t, VaR�� = S(t)(µ + �Ҧ�(��)).

2.7 GARCH

A way of estimating volatility, ��2

t , in financial time series is by applying a Generalized autoregressive

conditional heteroscedastic, GARCH, model. A GARCH(p, q) model for estimating the volatility 5

Page 18 |

t = ��0 + p

��

i=1

��ia2

t−i + q

��

i=1

��i��2

t−i

where at is zero–mean adjusted log return process described in section 2.1. Also at = ��tϵt and, in this thesis, ϵt ∼ N(0,1). From the way the GARCH model is constructed, at each time t, the volatility process ��2

t is con-

structed from the previous q volatilities, weighted down by the ��i–coefficients. Also the process takes the last p innovation values, at into consideration, weighted down by the ��i–coefficients. To estimate the parameters ��0,...,��p, ��1,...,��q from a data sample, one method commonly used is MLE.

2.8 Ljung–Box test

The Ljung–Box test is a hypothesis test for determining if the autocorrelation function is non–zero, [12]. • H0: ��(1),...,��(m) is all zero. • H1: at least one of ��(1),...,��(m) is non–zero. Thus under the null–hypothesis, Q(m) = T (T + 2)

m

��

l=1

̂��

2 l

T − l is chi–square, ��2

m, distributed with m degrees of freedom.

2.9 Kupiec–test

A Kupiec–test is a hypothesis test for checking if the number of exceptions in a backtest is as many as expected, given that an exception occurs independently of the others [5]. Let Nobs be the number of observed exceptions in a backtest. Let Nexp be the expected num- ber of exceptions in the backtest. • H0: Nobs = Nexp • H1: Nobs = Nexp That is, under the null–hypothesis Nobs will be binomial distributed with parameter p, where p is the level of VaR–measurement. 6

Page 19 |

The bootstrap method is a commonly used way of checking the distribution function of some estimator on a time series. Here we give a definition of the method and supply an exampel, with dependent data, where the standard method fails. We then continue to expand the method to behave descent for dependent data.

3.1 The IID Bootstrap method

The main principle of the bootstrap method is resampling from a known data set, X1,X2,...,Xn, to give a distribution of the estimator ̂��. This is done in the IID Bootstrap–method by picking n numbers from {1,...,n} with equal probability and with replacement. Call a number chosen this way U to get a sequence Ui, i �� [1,n]. Then construct a resample by chosing n data points XUi , i �� [1,n], call this series ˜ X1,..., ˜ Xn and then applying this resample to the estimator ̂��. By repeating this process N times we get a series of estimations { ̂��(˜ X1

j

,..., ˜ Xn

j

) }N

j=1

which can be used to construct a distribution function, P ( ̂�ȡ� x ) of ̂�� [1]. The IID Bootstrap–method is based on the idea that the data, X1,X2,...,Xn, only represents a single realisation of all possible combinations of that data. The distribution of the estimate ̂�� given by the IID Bootstrap method is hence an estimate of the distribution of ̂�� if X1,X2,...,Xn came from a common distribution function P (X �� x). This however requires the data to be inde- pendent. If the data is in fact dependent, the method fails to give a proper estimate, as seen in following example, modified from an article by Eola Investments , LLC [4].

3.2 Example of IID Bootstrap shortcomings

The article proposes a gamble, you��re allowed to buy as large a series as you want for $1 per num- ber. The series you get is comprised of consecutive 0s and 1s. For every sequence of ��10101�� you can show in that series, you win $1000. To analyze this gamble, a series of 10000 numbers is aquired X = {1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,1,1,0,...}. The mean of this se- ries lies at 0.55 which implies that the probability, p, of encountering a 1, looking anywhere in the series, is 0.55. Assuming that the data is independent of each other, the expected value of ��10101��s�� in a 10000 number long series is thus roughly �� p·(1−p)·p·(1−p)·p·10000 �� 337. Applying the IID Bootstrap–method to this data to estimate the possibility of having an occurence of ��10101�� gives a 95% confidence interval of [295.42,335.23,375.03]. However, going back to the original data and actually counting the number of occurences results in a finding of only 5. This huge discrepancy found is explained from the fact that when calculating the theoretical ex- pected value of occurences, we assumed that the sequence was IID, obviously, this was also the case with the IID Bootstrap–method. However, the sequence was constructed by a simple algorithm that took the previous value and kept it with probability 0.7, and changed the value to either 0 or 1, both with equal probability, with probability 0.3. Clearly, this sequence is not independent, and Monte–Carlo simulations from this process give the expected number of occurences of ��10101��s�� to be 5.89. 7

Page 20 |

As seen in previous example, the IID Bootstrap–method completly fails to replicate the properties of dependent sequences. This problem is treated by the block bootstrap method. The general idea of the method is to construct a sample of the data by splitting it into blocks and choosing, with equal probability, among them with replacement until a new series has been created. More formaly, given a sequence X1,...,Xn, assume that the block length l �� {1,2,...} evenly divide n into b blocks, i.e. n = b · l. Now call Bl

i the block of length l starting at i,

Bl

i = {Xi,...,Xi+l}. The new sample will be created by drawing b blocks from {Bl 1,Bl 2,...,Bl N }

with replacement, here N = n−l+1 and indicates the number of available blocks. This procedure puts a lesser weight on the first and last numbers, {1,...,l − 1} and {n − l + 1,...,n}. To correct this the data is placed end to end with itself, {...,Xn,X1,...,Xn,X1,...}, giving us n unique blocks. This is called a circular block bootstrap, [11]. By the use of the block bootstrap method, one runs the risk of destroying time stationarity prop- erties of the time series. To correct for this, Politis and Romano, [11], introduced a random block length. When constructing a block and choosing an element of the series, draw a random number from a U(0,1) distribution, if it is greater then a number p �� (0,1] then your block is done. Other- wise include the next element as well. Thus the block length is a random variable with a geometric distribution with parameter p with expected block length 1/p elements long. Thus choose the parameter, p, so that you on average have an 1/p �� l long blocks. This modification is called the stationary bootstrap since it preserves the stationarity of the series.

3.4 Example cont.

By applying the block bootstrap method with a block length of 20 and counting the number of occurences of 10101��s, we get from 1000 resamples a sample mean of 8.53 with a 95% confidence interval of [2.67,14.38]. Which is a much better result than with the IID bootstrap. [4]

3.5 Optimal block length

A method of calculating the optimal block length is suggested by Lahiri and is essentialy based on the jackknife method for calculating mean square error. The Jackknife–after–bootstrap, as presented in [6],[7], is a jackknife method, where instead of deleting individual observations, overlapping blocks of observations are deleted. That is, set Ii = {1,...,N}��{i,...,i + m − 1} where i = 1,...,M and M = N − m + 1. Then the esti- mate of the functional ˜ϕ

(i) n , i indicates the blocks to be left out, is the functional ϕn acting on the

empirical distribution function gotten by the resampled data from {B

(i) Jj

}b

j=1 where Jj is a discrete

uniform random variable taking its values in Ii. The jackknife–after–bootstrap estimator for the variance is then defined by ̂ VARJAB = m N − m · 1 M

M

��

i=1

( ˜ϕ(i)

n − ˆϕn

)2 . 8

Page 21 |

(i) n = (N ˆϕn − (N − m)ˆϕ (i) n )/m. The bias of ϕn is estimated by

˜ Bn = 2l1 (ˆϕn(l1) − ˆϕn(2l1)) where l1 is the initial guess of blocklength. By expansion of the MSE, under some constraints, an estimation of the optimal block length is gotten by ˜ l = ( ˜ B2

n · n

̂ VARJAB )1

4

. The exponent 1/4 here comes from the fact that we are looking at one–sided distributions, see for example [7] and [10]. Further on, a starting value of the block length, l1, and the block of blocks parameter m is sug- gested. A choice of l1 = n

1 4 and m = 0.1 · (nl2

1)

1 3 is said to be optimal, [7].

9

Page 22 |

The timeseries presented in this paper comes from three different categories of assets. Indexes, exchange rates and interest rates of various expiry lengths. These series are in this section presented with various properties, such as the average value and the standard deviation.

4.1 Stylized empirical facts

A stylized fact is a property shared between most financial time series. Presented below are some well–known stylized facts. • Squared returns got non–zero autocorrelation It��s a well known fact that the autocorrelations of a series of asset returns are essentially zero. However, any larger power of the returns are generally significantly non–zero. This is often understood as a form of long–horizon–dependence [2]. • Heavy tails Looking at the tails of the asset return distribution, they show a power–law tail [2]. Looking at their excess kurtosis, they are all strictly positive, that is leptokurtic. • Assymetrical distribution If the asset returns are split up into two parts, first its profits and last its losses, it can be seen that there is an assymetry between these two sets. The losses tends to be larger in size then the profits. An interpretation of this is that bad news comes as a shock to the market whilst good news are, in some sense, expected and does not make the market react as much. [2]

4.2 Interest rates

In this article, two types of interest rates are used. Both are LIBOR notes, that is London Interbank Offered Rates, similar to the Swedish version, STIBOR. As seen in the name, LIBOR is the rate banks trade between each others and are usually traded close to government bonds. The rates used in this thesis consists of • Deposit rates A deposit rate, short ��depo rate�� or just ��depo��, is a contract between two parties, one who wishes to borrow capital and one who wishes to lend the capital. The depo has a specified time until maturity. The rates presented in this paper as depo rates are to be interpreted as the interest rates payed by the borrower to the lender. A depo is non–tradable. [8] • Swap rates A swap of interest rates are, simplified, a trade between two parties, one with a loan with a floating–rate, short–bound rate, and one with a fix rate, long–bound rate. They both wish to change from their respecitve rate to the others and doing this, they perform a swap. The rates presented in this paper as swap rates are to be interpreted as the rate offered if one wishes to pay a 3–month LIBOR note to the specified fixed rate. [9]

4.3 The dataset

The dataset is composed of different series interest rate series, shown in table 1. The data was checked for outliers and also corrected for non–trading holidays, such as 25, 30–31 of Dec. Each 10

Page 23 |

Name Maturity EUR LIBOR 3M EUR LIBOR 1Y USD LIBOR 3M USD LIBOR 1Y

Table 1: Analyzed time series. 11

Page 24 |

The theory previously presented is used in computer programs, the code presented in appendix A. This section presents the algorithms and methods used to construct the tests.

5.1 Optimal block length

In calculations of the optimal block length by the ̂ VARJAB, Monte–Carlo–simulations are run to estimate value–at–risk for a time series. Doing so, many resamples are produced, but these are not enough, subsampling through the jackknife method are also required. This is a very expensive, computation wise, procedure. However, through the use of following theorem a reuse of resamples are allowed. Theorem Let J1,...,Jb be iid discrete uniform random variables on {1,...,N} and let {Ji1,...,Jib} be iid discrete uniform random variables on Ii, see section 3.5, 1 �� i �� M. Also, pi = ��

b j=1 1{Jj ��Ii}/b

Then P(J1 = j1,...,Jb = jb|pi = 1) = P(Ji1 = j1,...,Jib = jb). That is, given that one resample misses the blocks indexed i,...,i + m − 1, the probability of it having certain blocks is the same as it having the same blocks but not being able to choose from the missing blocks in the first place [7]. Thus the procedure of calculating the jackknife–after– bootstrap estimate och the variance is a matter of finding the resamples that already have a lack of the desired blocks. First of, start by Monte–Carlo–simulating ϕn This is done by fixing a block length, l, and then simulating K resamples, {kB∗

1,...,kB∗ b

}, k = 1,...,K. These resamples are stored for future use. For each resample, take the 100(1 − ��)% worst multi–period event and call this your value–at–risk estimate. Finally take the sample mean of the estimates. To measure ̂ VARJAB, ˜ϕ

(i) n

is calculated by choosing the resamples, already calculated in the Monte–Carlo–simulations, that lack blocks i,...,i + m − 1. That is choose the resamples where {kB∗

1,...,kB∗ b

}��{Bi,...,Bi+m−1} = ∅. The suggested optimal block length is then gotten as in section 3.5.

5.2 VaR–estimaton by block bootstrap

To use the block bootstrap method to estimate the density function of the m day multiperiod returns, m �� 1, from the daily return data {Xi}n

i=1, we follow these simple instructions.

• Construct a set of blocks Bl = {Bl

1,...,Bl n} where Bl i = {Xi,...,Xi+l}.

• Draw b discrete uniform random numbers from 1 to n, call them {Ui}b

i=1.

• Choose b blocks from Bl by taking the block with indexes Ui. That is, Bl

∗ = {Bl U1

,...,Bl

Ub

} = X∗ = {X∗

1 ,...,X∗ n}.

• Compound the resample, {X∗

1 + ··· + Xm,...,Xn−m+1 + ··· + X∗ n}, m �� 1

• Sort X∗ by size, smallest first, and choose the n�� first element, X∗

(n��)

. Store this number. • Repeat this procedure N times and after that take the sample mean of the observations. This is an estimate of the ��–VaR. 12

Page 25 |

An algorithm for VaR estimation by the stationary bootstrap is presented with these step–by–step instructions. Construct a set of numbers U = {U1,...,Un} by following these procedures. If at any time U got n elements, quit the algorithm. • Set i to 1. • Choose a number from a discrete uniform distribution over the numbers 1 to n. Store this number as Ui. • With probability p jump to the next step and with probability 1−p increase i by 1 and jump to the previous step. • Choose Ui+1 as Ui + 1, increase i by 1 and jump to the previous step. Now construct a stationary bootstrap resample, X∗, by choosing the elements of X with indexes U. To get the m day VaR–estimate with level ��, follow the procedures 4–5 from section 5.2. Repeat all of these procedures N times and after that, take the sample mean of these observations. This is the VaR–estimate.

5.4 Implementation of VaR backtest.

To construct a VaR backtest, a large historical data sample is needed. This is in practice a serious problem. When looking at the 99% level VaR for 10–days changes, one is essentially looking at the worst event happening in 1000 days, i.e. roughly 4 years. To get a reasonable amount of data points for this risk measure in a back test many many years worth of data are needed. There are also a problem with the choice of size of the data used for VaR estimation in the calculations. Not enough data points and the model does not give an accurate estimate and too many data points makes the risk measure to slow in capturing market changes. It is thus necessary to make a compromise. The construction of a backtest is a simple procedure but takes a considerable time to run. First of, split the data chosen for the backtest into two, not necessarily equal, parts. Think of the first part as the known history and consider the second part as if it had not already happened. The first part of the data is then used in the estimation of VaR, this estimate is then checked against the actual outcome, from the second part of the data. Every time an actual outcome is worse than the VaR estimate, call this an exception, is counted and stored. Last, check if the number of exceptions is significantly different from the �� level suggested by the VaR model. If this is the case, the model is not a good measure of VaR, at suggested significance level. 13

Page 26 |

Figure 1: Autocorrelation plots for resampled series (plus) with different block lengths and real data (square).

6 Results

Now how well does these extended bootstrap versions replicate the properties of dependent time series? As seen in section 3.3, the block length is an unknown parameter and thus it might be interesting to see how sensitive the distribution of returns estimates are for different block lengths. In this section, we will study the effects of an increasing block length on the tail of the distribution of varying multi–period returns. We will also perform backtests on time series to get a feel if these estimates are a good estimate of risk. Certain correctional techniques, such as weighting of more recent data and correlation with other time series, will be ignored mainly because of the assumptions that have to be done that risks to ��pollute�� the data.

6.1 Choice of blocklength

Looking at the autocorrelation plots 1(a),1(b) and 1(c), there is a capture of autocorrelation up to the lag equal to the block length in question. Thus, the VaR–measure seems to only care about correlation up to this point. Further on, looking at the sample variance for multi–period returns, figures 2,3,4, we see a clear deviation from a linear increase in the original sample. Also for the resampled data, the approximation of the variance for different multi–periods for the original series gets better as the block length increases. As seen, there is a tendency to better and better describe the dependence structure the higher the block length is and intuitively speaking, with a block length equal to the sample size, one would expect to see the same autocorrelation structure as the original sample. The same reasoning goes for the serial variance. The empirical distribution function of the multi–period returns and the resampled data was compared against each other through the K–S test, see figure 5. There is a clear trend in this data that increasing block lengths up to the number of days in the multi–period returns lowers the K-S distance. As seen there is a local minimum when the block length equals the number of days in the multi–period returns. The distribution fit is also illustrated in the QQ–plots shown in figures 14

Page 27 |

Page 28 |

Page 29 |

Page 30 |

SEK3M EUR3M USD1Y USD3M EUR1Y 1 0.79 0.64 0.58 1.81 1.15 5 5.39 7.18 2.97 4.80 3.72 10 9.73 10.00 3.16 8.45 4.05

Table 2: Suggested block length by the JAB–method for different time series for various multi– period returns, �� = 0.95.

SEK3M EUR3M USD1Y USD3M EUR1Y 1 1.44 1.27 1.01 0.90 3.13 5 3.22 6.65 4.61 7.83 4.28 10 6.33 8.49 5.31 12.28 6.00

Table 3: Suggested block length by the JAB–method for different time series for various multi– period returns, �� = 0.99.

6.2 Backtests

A GARCH(1,1) process was used to create a large number of data. The parameters used were es- timated from the log returns of the 3 month EUR LIBOR note using a maximum likelihood based software. The initial volatility was estimated by the variance of the log returns of the time series. From these parameters, a new dataset was constructed by following the GARCH(1,1) model and recursively calculating the innovations at, as defined in section 2.7. The series produced was used to check the fit of distributions by QQ–plots, as seen in figures 6 and 7. 18

Page 31 |

Page 32 |

0.95 0.96 0.97 0.98 0.99 1–day VaR Gauss 3550– 3108– 2644– 2138– 1573– Bb 4939+ 3955+ 2990+ 1988+ 987+ Sb 4964+ 3957+ 2979+ 1992+ 1023+ E 4950 3960 2970 1980 990 5–day VaR Gauss 620– 530– 461– 379+ 265– Bb 939+ 728+ 547+ 370+ 174+ Sb 908+ 715+ 549+ 372+ 181+ E 950 760 570 380 190 10–day VaR Gauss 276– 228– 199– 161+ 119– Bb 434+ 348+ 261+ 175+ 76+ Sb 435+ 350+ 262+ 176+ 87+ E 450 360 270 180 90

Table 4: Backtest of VaR estimated by stationary bootstrap, Sb, and block bootstrap, Bb, against a gaussian estimate of VaR. A + sign indicates an acceptance of the null–hypothesis in the Kupiec– test. A – sign indicates a rejection. E is the expected number of exceptions.

USD LIBOR 1Y EUR LIBOR 3M 1 5 10 1 5 10 1 -0.0431 -0.0995 -0.1472 -0.0086 -0.0215 -0.0316 5 -0.0431 -0.1035 -0.1515 -0.0086 -0.0333 -0.0554 10 -0.0432 -0.1046 -0.1605 -0.0087 -0.0358 -0.0626 15 -0.0432 -0.1051 -0.1593 -0.0087 -0.0367 -0.0657 20 -0.0431 -0.1053 -0.1628 -0.0086 -0.0372 -0.0673

Table 5: �� = 0.95–VaR–calculations for different block lengths for USD LIBOR 1Y and EUR LIBOR 3M by the use of the block bootstrap method.

6.3 Comments on the results

As seen in the Result section, an increasing block length gives a better Kolmogorov–Smirnov fit of the distribution of multi–period returns. The JAB based method, as well as looking directly at the VaR values, however indicates that, block lengths should not be choosen to high. A trade off that 20

Page 33 |

Figure 6: QQ–Plots of resampled log returns against a GARCH(1,1) simulated series with param- eters estimated from USD 1Y IR.

USD LIBOR 1Y EUR LIBOR 3M 1 5 10 1 5 10 1 -0.0432 -0.0993 -0.1470 -0.0086 -0.0215 -0.0317 5 -0.0431 -0.1038 -0.1544 -0.0086 -0.0330 -0.0523 10 -0.0431 -0.1046 -0.1586 -0.0086 -0.0358 -0.0671 15 -0.0431 -0.1050 -0.1603 -0.0087 -0.0369 -0.0650 20 -0.0431 -0.1053 -0.1619 -0.0087 -0.0372 -0.0702

Table 6: �� = 0.95–VaR–calculations for different block lengths for USD LIBOR 1Y and EUR LIBOR 3M by the use of the stationary bootstrap method.

USD LIBOR 1Y EUR LIBOR 3M 1 5 10 1 5 10 1 -0.0756 -0.1509 -0.2125 -0.0168 -0.0365 -0.0546 5 -0.0756 -0.1647 -0.2327 -0.0169 -0.0649 -0.0953 10 -0.0756 -0.1681 -0.2479 -0.0170 -0.0713 -0.1322 15 -0.0756 -0.1687 -0.2473 -0.0170 -0.0732 -0.1288 20 -0.0756 -0.1691 -0.2515 -0.0170 -0.0737 -0.1368

Table 7: �� = 0.99–VaR–calculations for different block lengths for USD LIBOR 1Y and EUR LIBOR 3M by the use of the block bootstrap method. 21

Page 34 |

Figure 7: QQ–Plots of resampled log returns against a GARCH(1,1) simulated series with param- eters estimated from EUR 3m IR.

(a) Block length 1 (b) Block length 10

Figure 8: QQ–Plots of resampled log returns against the log returns of USD 1Y IR. 22

Page 35 |

Figure 9: QQ–Plots of resampled log returns against the log returns of EUR 3M IR.

USD LIBOR 1Y EUR LIBOR 3M 1 5 10 1 5 10 1 -0.0756 -0.1509 -0.2127 -0.0168 -0.0367 -0.0550 5 -0.0757 -0.1660 -0.2368 -0.0170 -0.0659 -0.1105 10 -0.0756 -0.1681 -0.2451 0.0170 -0.0710 -0.1246 15 -0.0755 -0.1687 -0.2480 -0.0170 -0.0719 -0.1298 20 -0.0755 -0.1689 -0.2503 -0.0169 -0.0728 -0.1314

Table 8: �� = 0.99–VaR–calculations for different block lengths for USD LIBOR 1Y and EUR LIBOR 3M by the use of the stationary bootstrap method. seems reasonable is thus a value of block length in the interval of one or two times the multi–period days. Looking at both the autocorrelation plots and the serial variance plots the autocorrelation structure seems to be preserved in the resamples. Also the serial variance deviation from the independent case is replicated in the same way. The preservation of the ��dependence–structure�� in the resam- pled series provides a foundation for the evaluation of dependent time series. As seen not only in the example in the Resampling methods section, but also in the huge difference in VaR calculation for the short term interest rates. 23

Page 36 |

[1] Patrik Albin. Lecture notes in the course ��stochastic data processing and simulation��. Avail- able at http://www.math.chalmers.se/Stat/Grundutb/CTH/tms150/1011, 2011–08–17. [2] Rama Cont. Empirical properties of asset returns: stylized facts and statistical issues. Quan- titative Finance, 1:223–236, 2001. [3] Bradley Efron. Bootstrap methods: Another look at the jackknife. The Annals of Statistics, 7(1):1–26, 1979. [4] LLC Eola Investments. Notes on the bootstrap mehod. Available at http:// eolainvestments.com/Documents/Notes%20on%20The%20Bootstrap%20Method.pdf, 2011– 06–13. [5] Paul H. Kupiec. Techniques for verifying the accuracy of risk measurement models. The Journal of Derivatives, 3(2):73–84, 1995. [6] S.N. Lahiri. On the jackknife after bootstrap method for dependent data and its consistency properties. Econometric Theory, 18:79–98, 2002. [7] S.N. Lahiri. Resampling Methods for Dependent Data. Springer–Verlag New York, Inc, 2010. [8] Johan A Lybeck and Gustaf Hagerud. Penningmarknadens Instrument. Rab��n & Sjögren, 1988. [9] Lionel Martellini, Philippe Priaulet, and St��phane Priaulet. Fixed–Income Securities. John Wiley & Sons, Inc., 2003. [10] Daniel J. Nordman. A note on the stationary bootstrap��s variance. The Annals of Statistics, 37(1):359–370, 2009. [11] Dimitris N. Politis and Joseph P. Romano. The stationary bootstrap. Technical Report 91–03, Purdue University, 1991. [12] Ruey S. Tsay. Analysis of Financial Time Series. John Wiley & Sons, Inc., Hoboken, New Jersey, 3rd edition, 2010.

Page 37 |

The programs used in calculations in this thesis are The basic building blocks are presented here. class Norm { private WH2006 _myRand = new WH2006(); //Normal-dist r.v. generator using Box-Muller public double Rnd(double mu, double sigma) { double chi = _myRand.NextDouble(); double eta = _myRand.NextDouble(); double z = mu + sigma * Math.Sqrt(-2 * Math.Log(chi)) * Math.Cos(2 * Math.PI * eta); return z; } public static double N(double x) { const double b1 = 0.319381530; const double b2 = -0.356563782; const double b3 = 1.781477937; const double b4 = -1.821255978; const double b5 = 1.330274429; const double p = 0.2316419; const double c = 0.39894228; if (x >= 0.0) { double t = 1.0 / (1.0 + p * x); return (1.0 - c * Math.Exp(-x * x / 2.0) * t * (t * (t * (t * (t * b5 + b4) + b3) + b2) + b1)); } else { double t = 1.0 / (1.0 - p * x); return (c * Math.Exp(-x * x / 2.0) * t * (t * (t * (t * (t * b5 + b4) + b3) + b2) + b1)); } } public static double InvN(double alpha) { double eps = 0.00000001; int counter = 0; double guess = 10; bool nonconv = true; if (alpha < 0.5) { 25

Page 38 |

Page 39 |

Page 40 |

Page 41 |

Page 42 |

Page 43 |

Page 44 |

Page 45 |

Page 46 |

Page 47 |

Page 48 |

Page 49 |

Page 50 |

Page 51 |

Page 52 |

Page 53 |

- cache:nPvGNMMY6rgJ.gslk?514274:www.edu.cn - Google Search
- GUIDELINES FOR ETHICAL REVIEW OF COURSE-BASED RESEARCH
- The following information was generated from the
- cache:vmoho2eq5c4j:www.edu.cn - Google Search
- cache:cnb/CLPdvmCkAoYJ:www.edu.cn - Google Search
- The Magazine of Rhodes College ? Fall 2011
- EDPR 7/8542 – Statistical Methods Applied to Education II
- Depression is one of the most prevalent, and disabling, mental health conditions in the country
- Recognising Marriage as a Symbolic Institution
- Draft 1
- - . .,m .,mn .,mnb /., /.,m /.,mn /.,mnb /bin /dev/nul /etc/pas /lib /tmp /usr /usr/bin /usr/gro /usr/lib /var 0 00 000 0000
- CURRICULUM VITAE
- cache:fc5gqu8jerej:www.edu.cn - Google Search
- Survey of Contractor's Organization, Accounting System and System of Internal Controls (ICQ), Contractors with CCFY Dollars Between $15 Million and $1
- Full text of "Transactions .."
- 3. Project Design: Annex 4. Project Concept Note TemplatePROJECT CONCEPT NOTE TEMPLATEPROJECT CONCEPT NOTE TEMPLATEPROJECT CONCEPT NOTE TEMPLATE
- cache:9bh39scan5gj:www.edu.cn - Google Search
- Model Language for Patent and Licensing Agreements for Industrially
- Hub and Spoke Tour for Gunnison County, Colorado

- Dog
- The force transmission way
- Socialist harmonious society
- washback effect
- ArcEngine
- Baumol’scost
- Wang School of Pipa
- Canine coronavirus
- Organizational commitment
- empirical study
- party construction
- Clean Development Mechanism
- Cognitive function
- 周永康
- social stratum cooperation
- e waste
- SWOT analysis
- liveness property
- Fitzgerald
- KNOWLEDGE
- Decoration art

All Rights Reserved Powered by Free Document Search and Download

Copyright © 2011This site does not host pdf,doc,ppt,xls,rtf,txt files all document are the property of their respective owners. complaint#downhi.com