• No results found

Pricing European options under stochastic volatility

N/A
N/A
Protected

Academic year: 2021

Share "Pricing European options under stochastic volatility"

Copied!
38
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Pricing European options under stochastic volatility

Robert Tol

Student number 10367756

Master’s thesis

Actuarial Science and Mathematical Finance

Faculty of Economics and Business

University of Amsterdam

Supervisor: Mr. A. Lalu MSc

(2)

Statement of originality

This document is written by Student Robert Tol who declares to take full responsibility for the contents of this document.

I declare that the text and the work presented in this document is original and that no sources other than those mentioned in the text and its references have been used in creating it. The Faculty of Economics and Business is responsible solely for the supervision of completion of the work, not for the contents.

(3)

Abstract

The Black-Scholes model and formula (Black and Scholes, 1973) are widely used for pricing options, but the model imposes restrictions on real-world dynamics. In this thesis, methods for pricing options are discussed, when the restriction of a fixed volatility is relaxed. For European-style options, the Heston model (Heston, 1993) and the Heston-Nandi model (Heston and Nandi, 2000) are discussed and for pricing the options, the Heston-Nandi model is implemented. We find that the Heston-Nandi yields overall better option pricing results than the Black-Scholes model, especially for out of the money (OTM) options and options that have a long time to expiration. The Heston-Nandi pricing fit improves when the time to expiration increases, while the Black-Scholes fit worsens. The data set consists of options on Royal Dutch Shell A with different maturities (all maturities are less than one year) and different strike prices. The options are priced from 25 November 2015 to 29 February 2016. Model performance is measured by relative error, absolute error and by relative error in implied volatility.

(4)

Contents

1 Introduction 7

2 Models and assumptions 9

2.0.1 Volatility . . . 9

2.0.2 The Black-Scholes model for European options . . . 10

2.1 Models with stochastic volatility . . . 11

2.1.1 The Heston model . . . 11

2.1.2 The Heston-Nandi model . . . 12

2.2 Assumptions . . . 13

2.2.1 Risk-free interest rate . . . 13

2.2.2 Dividends . . . 14

2.2.3 Moneyness . . . 14

2.2.4 Volatility smile . . . 14

2.3 Recap . . . 14

3 Data and parameter estimation 15 3.1 Data . . . 15

3.2 Parameter estimation . . . 16

3.2.1 Parameter estimation for the stock process (fixed volatility) . . . 16

3.2.2 Parameter estimation for the variance process (stochastic volatility) . . . 16

3.2.3 Parameter estimation for the Heston-Nandi process . . . 18

3.3 Recap . . . 18

4 Results and discussion 19 4.1 Results on fixed-volatility pricing . . . 20

4.2 Results on stochastic-volatility pricing . . . 22

(5)

Bibliography 27

A Black-Scholes option pricing 29

B Heston-like option pricing 30

C Estimating the parameters of a GARCH-process 32

D Estimating the Heston-Nandi parameters and pricing options 33

E Results of timing the calculations 35

F Tooling choice 36

(6)

Preface

This is the master’s thesis ’Pricing European options under stochastic volatility’, made for obtaining the master’s degree in Actuarial Science and Mathematical Finance at the University of Amsterdam (UvA).

(7)

Chapter

1

Introduction

Options provide the buyer or seller of a certain asset security about the price they are going to pay, because they get a right to buy or sell the asset at a predetermined price (the strike price). Reducing market risk is commonly known as hedging. Options are also used to replicate or design (series of) cash flows, for arbitrage and to speculate (Hull, 2006). Nowadays, there are many types of options on many sorts of products. The two most important kinds of options are European and American options. European options can only be exercised at the expiration date, while American options can be exercised at any time (before and including the expiration date). As a result, the price of an American option must be equal or higher than the price of an European option on the same (non-dividend paying) asset, ceteris paribus (Barone-Adesi and Whaley, 1987).

Options have been around for a long time, but after the Chicago Board Options Exchange (CBOE) opened in 1973 and Fisher Black and Myron Scholes developed a closed-form formula for valuing European options in the same year (for which they won the 1997 Nobel Prize in Economics), trading options has become a big part of global trading markets. With more option trading, option pricing has also become a bigger subject. The Black-Scholes formula makes a few unrealistic (according to empirical evidence) assumptions on the asset and the market (which are mentioned later) and can only be used to price European options (Cox, Ross and Rubinstein, 1979). These assumptions were made to ensure that the value of the option only depends on the stock price, and that the other variables, such as the interest rate, are assumed to be deterministic constants.

The assumptions Black and Scholes made are that there exists a risk-free interest rate r that is known and con-stant over time, that the asset price follows a log-normal distribution (which means that the log-returns are distributed normally) with fixed variance rate σ (Merton, 1976).

The first assumption is known to not be true (Lauterbach and Schultz, 1990). Often, the risk free rate is known, but not constant over time. The interest rate is a continuously moving process, but for short-maturity option pricing, using a fixed interest rate is a good starting point.

The second assumption is also known to not be true but it often is a very good approximation and it makes it easy to generate series of stock prices and to find semi-closed form analytical solutions for the prices of various types of option

(8)

contracts. One of the other advantages of the log-normal distribution is that the stock price can not become negative, which is a very desirable featurem because a stock price can not be negative1

Assuming a constant volatility makes the pricing more tractable, but in the long run, it leads to inaccurate pricing. The volatility is a constantly moving process (Wiggins, 1987). Moreover, the market-implied volatility is not constant for options that have different strike prices and different times to expiration. This phenomenon is known as the volatility smile. As a result of this, errors on fitted option prices get bigger as the moneyness of the option deviates more from 100%.

This problem can be resolved with OLS regression, like in Ncube (1996), for options on a particular day. In that research, implied volatilities of options are regressed on strike price K, time to expiration T and a dummy (to distinguish between call and put options). Another way to deal with this is to apply a weighting scheme to the implied volatilities of a number of options, and to use the weighted volatility as the estimate for future volatilities (Schmalensee and Trippi, 1978 and Mayhew, 1995).

The assumptions Black and Scholes made on the market are that there are no transaction costs for buying and selling, that it is possible to borrow at the risk free rate and that it is possible to buy and sell any fraction of the stock at any point in time (continuous trading). These assumptions are of course not valid, but when there is operated on a very large scale, the difference between the real world and these assumptions would be negligible, although there are some limitations in practice (Shleifer and Vishny, 1997). For example, short selling (the selling of an asset that the seller does not own) can be limited by government regulations and in an illiquid market (e.g. a crisis situation), these assumptions do not go up.

In chapter 2, the models and assumptions are introduced. The data and the procedures for estimating parameter values for the models are described in chapter 3. In chapter 4, the results are displayed and discussed, and chapter 5 concludes the thesis.

1This is because of the rule of limited liability (Easterbrook and Fischel, 1985), which means that investors are not liable for more than the

(9)

Chapter

2

Models and assumptions

In this chapter, models for pricing options are discussed, as well as some assumptions that are made before choosing the data and generating results.

There are many models that can be used to determine the value of an European option. Popular models that assume a fixed volatility are the binomial tree model (Cox, Ross and Rubinstein, 1979), Boyle’s (1977) Monte Carlo simulation model and Black-Scholes model (Black and Scholes, 1973). Only the Black-Scholes model will be discussed later, because the outcomes of the other models will eventually converge to the Black-Scholes outcomes and for the Black-Scholes model, there is a closed-form formula to calculate the option price.

Under the assumption that volatility is stochastic, many models that incorporate this are available. The Hull and White model (1987) describes the stock and variance processes as two correlated geometric Brownian motions. The Stein and Stein (1991) model describes the stock process as a geometric Brownian motion and the variance process as a mean-reverting geometric Brownian motion that is independent of the stock process. The Heston (1993) model and the Heston-Nandi (2000) model describe the stock process as a geometric Brownian motion and the variance process as a mean-reverting geometric Brownian motion that is correlated with the stock process. Particular focus will be given to the last two models, because they are more flexible than the models mentioned before (when some parameters are set to zero in the last two models, they are equal to the other models).

2.0.1

Volatility

The volatility of an asset is the degree in which the price of an asset varies over time. Under the assumption of constant volatility, the typical standard deviation estimator can be used. The (population) standard deviation is defined as:

σ = v u u t 1 n n X i=1 (Ri− ¯R)2 (2.1)

with Rithe returns made from period t = i − 1 to period t = i. These returns can be calculated on a discrete basis, as well on a continuous basis, but for log-normal distributional type assumptions the log return calculations make more

(10)

sense. Discrete and continuous returns (Ridand Ric) are calculated as follows:

Rid= Si

Si−1− 1, Ric= log 

Si Si−1



(2.2)

with Si the price of asset S on time t = i and ¯R the average return. These standard deviations can be based on a population, but a population often is intinitely big, so in most cases, a standard deviation based on a series of historical prices (for example the data of 3 months of daily prices) is calculated. When this is done, Bessel’s correction has to be applied (Heij et al, 2004), so instead of dividing the sum of squared deviations from the mean by n, it is divided by n − 1. If a very large sample is used, this penalty term becomes very small, so the effect of the (n − 1) term eventually dies out.

2.0.2

The Black-Scholes model for European options

In Black and Scholes (1973), the stock price process, S, is assumed to follow a Geometric Brownian motion (under risk measure P):

dSt= µStdt + σStdzt (2.3) with µ the expected (continuously compounded) annual rate of return, σ the annual rate of volatility and zta Wiener process (dzt∼ N (0, dt)). In option pricing models, the existence of a risk neutral world due to the absence of arbitrage opportunities is assumed to hold. In this world, there exists a risk free interest rate r at which everybody can lend freely, there are no additional costs like transaction costs and individuals can not influence r or any price. Also, the market is assumed complete, so that all claims are hedgeable, and there is no arbitrage. The expected return on riskless assets therefore becomes the risk-free rate r (µ = r) to prevent arbitrage (Cox and Ross, 1976), which means that the differential equation for S changes to:

dSt= rStdt + σStdzt (2.4) The price of an option is determined by the discounted expected payoff. For a call option, this expected payoff is M ax(S(T ) − K, 0), and for a put option, it is M ax(K − S(T ), 0), with S(T ) the asset price at time T and K the strike price.

The formulas Black and Scholes developed are:

c = S0N (d1) − Ke−rTN (d2), p = Ke−rTN (−d2) − S0N (−d1) (2.5)

with c a call option, p a put option and T the time to maturity and:

d1=log(S0/K) + (r + σ 2/2)T σ√T , d2= log(S0/K) + (r − σ2/2)T σ√T = d1− σ √ T (2.6)

When the stock pays dividends, it is worth less the amount of dividend per share (on the ex-dividend date), because the dividends have been transferred from the company to the shareholders. The impact on the stock process in the risk neutral world is described by:

(11)

with Dtthe dividend amount at time t. Including a dividend yield also makes the Black-Scholes formula a bit different, but the problem can be solved quite easily: a stock that pays a continuous dividend yield q grows from time t = 0 from price S0to price ST at time t = T . If the stock would not pay its dividends, it would grow to price STeqT at time t = T . If the stock would not pay dividends, and it would be worth S0e−qT at time t = 0, it would be worth ST at time t = T . This means that the dividend-paying stock worth S0and the non-dividend-paying stock worth S0e−qT have the same distribution for the stock price at maturity t = T (Hull, 2006). When S0is replaced by S0e−qT in the Black-Scholes formula, the formulas for a put and a call option on a stock that pays a continuous dividend yield q are obtained:

c = S0e−qTN (d1) − Ke−rTN (d2), p = Ke−rTN (−d2) − S0e−qTN (−d1) (2.8) with d1= log(S0/K) + (r − q + σ 2/2)T σ√T , d2= log(S0/K) + (r − q − σ2/2)T σ√T = d1− σ √ T (2.9)

An R-script for pricing a European call option is found in Appendix A.

2.1

Models with stochastic volatility

As mentioned in the introduction, loosening the restriction of a fixed volatility might give a better approximation of the real-world option price, because the volatility is a continuously moving process.

2.1.1

The Heston model

Heston (1993) came with a model that featured two separate processes, one for the stock process and one for the variance process: dSt= (r − q)Stdt +pVtStdz1t (2.10) and dVt= κ(θ − Vt)dt + σpVtdz2t (2.11) with: S: stock price: S ≥ 0

r: risk-free rate (constant and continuously compounded) q: dividend rate (constant and continuous): q ≥ 0 V : variance rate: V ≥ 0

κ: rate of reversion to the long-term variance (constant) θ: long-term variance (constant): θ ≥ 0

σ: volatility of the volatility (constant): σ ≥ 0

(12)

With these processes, there is a stock process that is dependent of a moving variance. The variance process de-pends on constant parameters: the rate of reversion, the long term variance and the volatility of the volatility. If the rate of reversion is small, the volatility will converge slowly to the long-term variance rate (and vice versa). This means that there will be periods in which the variance (and also volatility) is higher/lower than the mean for a longer time. This is called volatility clustering (Cont, 2005). In financial markets, this can be seen as periods of high or low risk. Eventually, the variance moves to its steady state.

Another advantage of this model is that the two Wiener processes are correlated with each other. This correlation coefficient often is negative, because of the leverage effect (Bouchaud, Matacz and Potters, 2001). This means that negative returns make the volatility go up and vice versa. In this thesis, an R-code is provided for pricing a call option with the following variance process:

dVt= κ(θ − Vt)dt + σVtdz2t (2.12) It is slightly different from the model that Heston (1993) showed in his paper (dz2is multiplied by the variance instead of the volatility), but this model has been chosen because its parameters are estimated easier, with the help of a GARCH(1,1) model. There is more on this subject in chapter 3.

In the R-script, a series of stock prices is simulated (Monte Carlo simulation), and the discounted average of the payoff vector at expiration date is used as option price. The R-code for this method can be found in Appendix B. In the case the variance becomes negative, which is possible in this process (a series of negative dz2s for example), it is floored at 0.

2.1.2

The Heston-Nandi model

In Heston and Nandi (1993), the assumption is made that the logarithm of the stock price log(S(t)) follows a GARCH(p, q) process (these processes are not continuous, but discrete-time processes, with time steps of size ∆t): log(S(t)) = log(S(t − ∆)) + r + λh(t) +ph(t)z(t) (2.13) h(t) = ω + p X i=1 βih(t − ∆) + q X i=1 αi(z(t − ∆) − γi p h(t − ∆))2 (2.14)

with r the continuously compounded interest rate, z(t) a Wiener process and h(t) the conditional variance of the log return (known from the data). λ can be seen as a ’risk premium’ parameter. The paper focuses on the GARCH(1, 1) process, and if the equations are rewritten, the following is obtained:

Rt= log  S(t) S(t − ∆)  = log(S(t)) − log(S(t − ∆)) = r + λh(t) +ph(t)z(t) (2.15) h(t) = ω + βh(t − ∆) + α(z(t − ∆) − γph(t − ∆))2 (2.16) For computing option values, f (φ) = E(S(T )φ), the generating function of S(T ), is needed (note that the generating function of S(T ) is the moment-generating function of log(S(T )), this can be seen when it is written out: E(S(T )φ) =

(13)

E(eφ log(S(T )))):

f (φ) = S(t)φexp(A(t) + B(t(h(t + ∆)) (2.17) with (Heston and Nandi, 2000):

A(t) = A(t; T, φ) = A(t + ∆; T, φ) + φr + B(t + ∆; T, φ)ω −1

2log(1 − 2αB(t + ∆; T, φ)) (2.18) B(t) = B(t; T, φ) = φ(λ + γ) −1

2+ βB(t + ∆; T, φ) + 1/2(φ − γ)2

1 − 2αB(t + ∆; T, φ) (2.19) The value of A(t) and B(t) can be calculated recursively from:

A(T ; T, φ) = 0, B(T ; T, φ) = 0 (2.20) Also, f (iφ) is the characteristic function of the logarithm of S(t), with i =√−1. If this characteristic function is inverted, like in Scott (1997), the following is obtained:

M ax(S(T ) − K, 0) = f (1) 1 2 + 1 π Z ∞ 0 Re K −iφf (iφ + 1) iφf (1)  dφ  − K 1 2 + 1 π Z ∞ 0 Re K −iφf (iφ) iφ  dφ  (2.21) The first part of the equation is f (1) multiplied by the delta of the call option, which the sensitivity of the option price with respect to changes in the stock price. In the Black-Scholes formula, this is equal to N (d1), as discussed before. The second part of this equation is the strike price K multiplied by the chance that the option expires in the money (P (S(T ) > K)). In the Black-Scholes formula, this is equal to N (d2), as discussed before (Hull, 2006).

After this, the value has to be discounted to time t = 0 and the risk neutral characteristic function f∗(iφ) has to be used. Using f∗(1)e−rT = E(S(T )e−rT) = S(0) under the risk neutral distribution and that f (1) is independent of φ, the option formula becomes:

C = e−rTE∗[M ax(S(T ) − K, 0)] (2.22) =1 2S(0) + e−rT π Z ∞ 0 Re K −iφf(iφ + 1) iφ  dφ − Ke−rT 1 2+ 1 π Z ∞ 0 Re K −iφf(iφ) iφ  dφ  (2.23) With E∗[ ] the risk neutral expectation and Re the real part of a complex number. The price of put options can be calculated with the help of the price of the corresponding call options using the put-call parity (Hull, 2006): C + Ke−rT = P + S0.

Heston and Nandi (2000) have shown that when the time intervals shrink, the formulas for the stock and variance processes boil down to the processes in Heston (1993).

2.2

Assumptions

2.2.1

Risk-free interest rate

The risk-free interest rate is assumed to be known and equal to the Euribor rates for European options. Over the last years, the general trend has been that interest rates have been declining up to the point where most yields on short-maturity government bonds (and also on the risk-free rates) are below zero. Under the assumptions made so far, the equity option pricing models discussed allow for the use of negative interest rates..

(14)

2.2.2

Dividends

A stock often pays dividends on predetermined dates (for example once per three months on a fixed day), which makes it more tedious to model implications on the stock price. With a stock index, there sometimes are hundreds of individual stocks that pay different dividends on different dates, so the implications on the stock price become even harder to model. In this thesis, the dividend yield is assumed constant over time and paid out on a continuous basis.

2.2.3

Moneyness

The moneyness of an option is the relative position of the asset price in comparison to the strike price of the option (Hull, 2006). For a call option, the moneyness is defined as S/K. If S > K, the moneyness is bigger than 100 % and the option is called in the money. If S < K, the moneyness is smaller than 100 % and the option is called out of the money. If S = K or S ≈ K, the option is called at the money.

2.2.4

Volatility smile

The market price of options that are deep out of the money (OTM) or deep in the money (ITM) can differ quite some bit from options prices that are calculated with the models mentioned before. For example, European options that are deep in the money tend to be priced higher than the Black-Scholes price and European options that are deep out of the money tend to be priced lower than the Black-Scholes price obtained using the volatility coefficient which would fit the at the money (ATM) option price. This is because of the volatility smile/smirk.

Before the crash of 1987, the implied volatiliy formed a ’smile’ pattern plotted against the strike price (if the moneyness deviates a lot from 100%, the market-implied volatility goes up). After the crash, the volatility formed a pattern that looked more like a ’smirk’ or ’skew’ (Andersen and Andreasen, 2000).

Because the Black-Scholes formula uses a volatility that is constant over all time horizons and strike prices, its fits deviate more from the market prices when the moneyness deviates more from 100%. It is expected that the Heston-Nandi fits are better for options that are not ATM or closely around the money.

2.3

Recap

Different models for pricing European options have been discussed, as well as assumptions made on the risk-free interest rate, dividends and the volatility smile. In the next chapter, methods for estimating the model parameters from time-series of stock returns are provided, so that real-life options can be valued with the help of these models and estimated parameters based on the prices of the assets and other market variables.

(15)

Chapter

3

Data and parameter estimation

3.1

Data

All data used in this thesis is retrieved from Thomson Reuters Datastream, except where noted. Datastream is available at the University of Amsterdam and it provides a variety of data over a long time span with lots of exporting pos-sibilities. The market data needed for this thesis consists of stock prices, option prices, dividend yields and risk-free rates.

The stock for which European option prices are evaluated is Royal Dutch Shell A (RDSA on Euronext). Royal Dutch Shell (commonly known as Shell) is one of the biggest companies in the world and one of the big players on the oil market. This stock has been chosen because options on it are traded a lot, so there should be a good liquidity (small bid-ask spread) on many options in terms of moneyness and expiration time. The dates on which the options prices are evaluated are 25 November 2015-29 February 2016. The options are evaluated in 6 categories of moneyness (< 90%, 90% − 95% 95% − 100%, 100% − 105%, 105% − 110% and > 110%) and in 4 categories of expiration time (<60 days left, 60-100 days left, 101-150 days left and >150 days left).

The dividend yield is assumed to be constant and paid out continuously. The dividend yield rate that is used is the current rate at the moment the option is priced.

The (assumed) risk-free Euribor rates are available at the web sites of the European Money Markets Institute (EMMI). These rates are for short maturities up to 1 year. Because some maturities that were used when pricing the options were not available right away, there had to be interpolated between known values (using linear interpolation). If there are two known maturities x1and x2with rates y1and y2and the rate for maturity x∗is needed, rate y∗is:

y∗= y1+ (x∗− x1)y2− y1

x2− x1 (3.1)

In R, this interpolation can be done with the function approx(x,y,xout). Here, x is the vector with maturities, y the vector with the (annual) rates for the corresponding maturities and xout the maturity that is needed. By default, this

(16)

function interpolates linearly, so there are no extra commands needed.

3.2

Parameter estimation

3.2.1

Parameter estimation for the stock process (fixed volatility)

When a fixed volatility is assumed, and the model with differential equation dSt= (r − q)Stdt + σStdztis used, just σ has to be estimated robustly. This can be done in many ways. In this thesis, we have chosen to estimate the volatility based on the returns made in the last 100 trading days. As mentioned before, the daily (sample) standard deviation is:

σ = v u u t 1 n − 1 n X i=1 (Ri− ¯R)2 (3.2)

with Rithe continuously compounded return made on trading day i.

All models that are discussed before use an annualized volatility, so this daily value has to be annualized. If the daily volatility is known and all returns are assumed independent and identically distributed, the volatility is multiplied by the square root of the number of observations (Canina and Figlewski, 1993). In this thesis, it is multiplied by the square root of 252. The period over which the standard deviation is taken is 100 days, so the volatility that is used in the Black-Scholes formula is the annualized (sample) standard deviation of the past 100 daily returns. This number has been chosen because it makes the standard deviation easy to calculate and after 100 days, returns that differ significantly from the mean do not affect the standard deviation too much.

3.2.2

Parameter estimation for the variance process (stochastic volatility)

Here, the models of Heston (1993) and Hull (2006, chapter 22) are combined. In the GARCH model, there is just one innovation dztthat drives both the stock and the variance processes, whereas now, there are two different correlated innovations dz1t and dz2t, so that they can be different. Also, the innovation is now multiplied by σVtinstead of σ√Vt, like in the Heston model. It is practical, but not necessarily optimal from an econometric point of view, as instead of estimating all parameters at once via some correctly specified criterion function, it resorts to different model approximations.

When the models with stochastic volatility with processes dSt= (r − q)Stdt +√VtSdz1tand dVt= κ(θ − Vt)dt + σVtdz2tare used, 5 parameters have to be estimated:

V0: the starting variance

κ: rate of reversion to the long-term variance θ: long-term variance

σ: volatility of the volatility

ρ: The coefficient of correlation betweeen the two Wiener processes

(17)

before, because it is the annualized volatility that has been realized over the entire year 2015. The variance is obtained after squaring the volatility. Sometimes, this value is also used as an approximation for the long-term variance. This is called variance targeting (Francq, Horvath and Zakoian, 2011)

A model that can estimate κ, θ and σ quite well is a GARCH(1,1) model (generalized autoregressive conditional heteroscedasticity), which is formulated as:

ξt2= ω + αR2t−1+ βξt−12 , α + β + γ = 1, Rt−1= log(St−1 St−2

) (3.3)

with α, β and γ the weights assigned to the long-term average variance θ, the squared previous return Rt−1and the previous variance rate ξt−12 . The "(1,1)" stands for 1 squared historic return and 1 historic variance. These models can be extended to incorporate more returns and/or variances in a GARCH(i,j) model, in which the αis, the βis and γ still sum up to 1.

It can be proven that the GARCH(1,1) model is equivalent to dVt = κ(θ − Vt)dt + σVtdz1t (with z1t the same Wiener process from the stock process), using the assumption that Rt−1(the continuously compounded return over a very small interval of time) is distributed normally with expectation 0 and variance σt−12 (Hull, 2006). From this assump-tion and the moment generating funcassump-tion of the normal distribuassump-tion follows that the expectaassump-tion of R2t−1is ξt−12 and the expectation of R4t−1is 3ξt−14 . This means that the variance of Rt−12 is 2ξ4t−1and the standard deviation is

√ 2ξt−12 . With the assumption that the Ris were generated with a Wiener process, R2t−1can be written as ξ2t−1+

√ 2ξ2

t−1t−1, with t−1a standard normal random error term (in this case,  is used because these equations are set in discrete time). If this is filled in the formula above and ξ2

t−1is subtracted on both sides, it becomes: ξn2− ξ2 n−1= γθ + (α + β − 1)ξ 2 n−1+ α √ 2ξn−12 t−1 (3.4)

When ∆t gets very small and realizing α + β − 1 is equal to −γ:

dV = γ(θ − ξ2) + α√2dzt (3.5)

With γ the rate of reversion κ, ξ2the variance V at that moment and α√2 equal to the volatility of the variance σ.

The parameters ω, α and β of the GARCH(1,1) model make it possible to construct the parameters for the vari-ance process:

κ = (1 − α − β) θ = ωκ

σ = α√2

For estimating ρ, the method of Wiggins (1987) is used. In his research, the formula for ρ is defined as:

ρ = 1 σ(π/2)

1/2X t

(18)

with σ the volatility of the volatility, stthe volatility at time t, sgn(Xt) the sign of the continuously compounded return (−1 if the return is negative and 1 if the return is positive) and T the number of observations.

The R-code for the estimation of the variance process is described in Appendix C. The code uses the garchFit formula from the fGarch package which needs to be installed first. The garchFit formula estimates a GARCH model, based on the returns data. In the script, there has been chosen to leave a µ parameter out, so it just estimates parameters ω, α and β. The parameter values are estimated with maximum likelihood estimation (MLE) and a normal conditional distribution.

Because this script calculates the parameter values based on real returns, the process needs to be risk neutralized first. This problem, together with the fact that the Monte Carlo simulation takes quite some time to produce option values, the choice has been made to move to pricing options with the Heston-Nandi model in the case of stochastic volatility. In the next section, there is more on the parameter estimation of that process.

3.2.3

Parameter estimation for the Heston-Nandi process

In the Heston-Nandi model (Heston and Nandi, 2000) with the processes Rt= log(S(t−∆)S(t) ) = rλh(t) +ph(t)z(t) and h(t) = ω + βh(t − ∆) + α(z(t − ∆) − γph(t − ∆))2, the following parameters have to be estimated: α, β, γ, λ and ω. This can be done with the function ’hngarchFit’ from the ’fOptions’ package. This function estimates the parameters for the Heston-Nandi model based on MLE. The inputs for this function are daily log returns and some starting values for the parameters. The number of returns used for parameter estimation is 250. This number has been chosen because it incorporates almost a year of past data and all the options in the sample expire in less than a year. Also, a model can be estimated quickly based on a set of this size.

The R-code for estimating the GARCH-model and calculating the option price is found in Appendix D.

In the case of a dividend paying stock, the asset price is taken equal to S0e−qT, just as mentioned before with the Black-Scholes formula. Another way to correct for dividends is to take the risk free rate equal to (r − q). When this is done, E∗[M ax(S(T ) − K, 0)] is discounted with e−(r−q)T = e−rTeqT, so there has to be corrected for this by multiplying with e−qT.

3.3

Recap

In this chapter, the data that is used when pricing options has been discussed, as well as where it has been retrieved from. Also, methods for estimating the parameters for the stock and variance processes have been discussed. The volatility in the fixed volatility model can be estimated with the help of the daily stock returns. The parameters of the variance process for the models with stochastic volatility can be estimated with a GARCH(1,1) model. The correlation coefficient between the two Wiener processes is calculated with the formula provided in Wiggins (1987).

(19)

Chapter

4

Results and discussion

In this chapter, European option prices are calculated based on the models and parameters estimated with the methods that are described in previous chapters. The fitted values from both the fixed volatility and stochastic volatility models are compared to market prices and the results are discussed. The dates the option prices are evaluated are 25 November 2015 - 29 February 2016. For the asset, there are 4 categories of moneyness and 3 categories of maturity, so there are 12 option types that are priced. The real option price is assumed equal to the midpoint of the bid price (the maximum price a buyer on the market will pay) and the ask price (the minimum price a seller wants).

The expiration time T is taken equal to the amount of calendar days to expiration divided by 365, the number of days in a non-leap year (this is a convention, although 2016, the year in which all the options expire, is a leap year). The pricing errors is calculated as the absolute percentage error: error%= abs((market − f itted)/market ∗ 100%) and as the implied volatility percentage error (in this formula shortened to IV): errorIV = abs((IVmarket− IVmodel)/IVmarket∗ 100%). The mean absolute percentage error (MAPE) of the options is also given.

On the next pages the results of pricing 720 options on Royal Dutch Shell A are found (on 25 December 2015 and 1 January 2016, the exchange was closed, so there was no trade in the option, otherwise it would have been 744 options). The expiry dates of the options are 19 February 2016, 18 March 2016 and 17 June 2016. The options are priced for strike pricese 20, e 21, e 22 and e 23. The dates the options are priced are 25 November 2015 - 29 February 2016, except for the options that expire in February 2016, they are valued until 29 January 2016. The risk free rate is assumed constant from 25 November 2016 - 29 January 2016 (the risk free rate is taken equal to the average rates of December 2015) and from 1 February 2016 - 29 February 2016 (in this case, the risk free rate is taken equal to the average rates of February 2016). This is because the Euribor rates started declining more in February 2016 (up to the point where all rates became negative), after being relatively stable in the months before.

(20)

4.1

Results on fixed-volatility pricing

Most parameters that are needed as input for the Black-Scholes formula are directly observable, such as the strike price, and the time to maturity. The only parameter that is harder to estimate is the volatility σ. The volatility has been taken equal to the standard deviation of the returns of the past 100 trading days.

Days to expiration <60 60-100 101-150 >150 Moneyness Subtotal <90% 42,89% (11,53%) 24,91% (8,00%) 37,34% (12,59%) 28,84% (10,20%) #Options 103 43 51 35 232 90%-95% 27,57% (10,73%) 24,79% (11,32%) 28,92% (14,32%) 32,97% (16,64%) #Options 58 40 35 30 163 95%-100% 14,29% (8,98%) 13,28% (9,07%) 18,25% (12,41%) 21,96% (14,76%) #Options 37 33 26 24 120 100%-105% 7,74% (8,29%) 5,92% (6,03%) 9,49% (9,08%) 13,32% (11,95%) #Options 22 34 22 27 105 105%-110% 4,32% (8,44%) 2,62% (3,84%) 2,93% (3,84%) 6,01% (6,98%) #Options 8 20 12 18 58 >110% - 6,08% (16,53%) 5,36% (12,62%) 3,04% (5,62%) #Options 0 14 14 14 42 Subtotal 228 184 160 148

Table 4.1: Average absolute percentage errors and implied volatility percentage errors between brackets (assuming fixed volatility)

Above, the results of the Black-Scholes method are displayed for both the average absolute percentage error in Euro and the absolute percentage error in Black-Scholes implied volatility quotes between brackets. Under the errors, the amount of options that is in that category is displayed.

The MAPE of the 720 fitted options is 22.69% (e 0.11). The average percentage error gets bigger when the moneyness gets smaller. This probably is a result of the volatility smile. When the moneyness differs a lot from 100%, the market-implied volatility gets higher. In this case, the errors don’t seem to form a symmetrical pattern, but more like a ’smirk’ pattern.

Comparing implied volatility quotes gives a better overview over the errors, because it corrects a bit for price scaling. When the implied volatility percentage errors are observed, there seems to be more evidence for a volatility smirk. The errors are the smallest for a moneyness slightly above 100%, and are worse for slightly below 100%.

The implied volatility of an option can be calculated by inverting the Black-Scholes formula and solving for the implied volatility ˆσ and using the market variables as inputs. Next, there is a graph of the implied volatilities (that were calculated from the market prices of the 720 options) plotted against the moneyness. A trend line is also included.

(21)

Figure 4.1: Implied volatilities of the 720 options

Although the fit is not too good (the R2is quite small), the volatility smile looks relatively symmetric, with its lowest point slightly below 1. Implied volatilities for OTM options are more spread out around the smile, while they are relatively concentrated around the smile for ITM options. Also, there are options that are deeper out of the money than there are options in the money. If to this is added that (for the Black-Scholes model) the more the moneyness differs from 100 %, the bigger the differences, it is understandable that the errors on the deep OTM categories are bigger than on deep ITM categories.

Another possible explanation for the big percentage errors can be the fact that OTM option prices are lower than options that have a higher moneyness, so percentage errors are higher. Below, a graph with the average absolute error in Euro is shown. Days to expiration <60 60-100 101-150 >150 Moneyness Subtotal <90% e 0,04 e 0,05 e 0,14 e 0,12 #Options 103 43 51 35 232 90%-95% e 0,07 e 0,11 e 0,19 e 0,25 #Options 58 40 35 30 163 95%-100% e 0,08 e 0,11 e 0,18 e 0,25 #Options 37 33 26 24 120 100%-105% e 0,08 e 0,08 e 0,14 e 0,22 #Options 22 34 22 27 105 105%-110% e 0,06 e 0,05 e 0,06 e 0,13 #Options 8 20 12 18 58 >110% - e 0,21 e 0,19 e 0,12 #Options 0 14 14 14 42 Subtotal 228 184 160 148

Table 4.2: Average absolute errors in Euro under assumed fixed volatility

(22)

expiration is the smallest of all the categories, with the biggest amount of observations (103). This is not what would be expected from the table with the percentage errors. When there are less than two months left (around 60 days), the chance that the stock price will increase with more than 10% gets quite small, especially in a market that looks quite stable (which was the case around january 2016), so those option prices get very small.

When the time to expiration gets bigger, most errors get bigger as well in percentage as in Euro (especially for the OTM options). This could be a result of using a different risk free interest rate than the market does. Around the beginning of 2016, most Euribor rates were around 0%, and most rates were negative. For example, if the market calculates option prices with a higher risk free rate (because they probably can’t borrow at such low or even negative rates or are a bit more conservative about interest rates). Below is a graph in which the percentage errors are displayed for the options that expire in more than 150 days:

Figure 4.2: Errors on options with a longer time to expiration (fixed volatility)

87% of the time, the error is negative, which means that the market price is lower than the fitted price. Especially in the 155-195 day range, almost none of the options has a positive error. A part of these errors might be explained because of the volatility smile, but there is more on that later.

4.2

Results on stochastic-volatility pricing

Next, the results on Heston-Nandi option pricing are discussed. The options that are priced are the same as with the Black-Scholes pricing method discussed before, the risk free rate and dividend data are also the same, so the results can be compared quite well. Parameter estimates of some dates are found in Appendix G.

(23)

Days to expiration <60 60-100 101-150 >150 Moneyness Subtotal <90% 36,67% (9,58%) 19,18% (6,21%) 21,89% (7,60%) 11,78% (4,28%) #Options 103 43 51 35 232 90%-95% 20,09% (8,16%) 13,97% (6,70%) 15,17% (7,56%) 13,74% (7,05%) #Options 58 40 35 30 163 95%-100% 10,09% (6,69%) 8,90% (6,44%) 6,56% (4,42%) 7,50% (5,20%) #Options 37 33 26 24 120 100%-105% 8,93% (10,18%) 7,21% (7,25%) 4,61% (4,51%) 5,30% (4,82%) #Options 22 34 22 27 105 105%-110% 9,60% (16,71%) 8,80% (12,98%) 5,80% (8,02%) 6,11% (7,01%) #Options 8 20 12 18 58 >110% - 10,29% (29,00%) 10,62% (25,25%) 11,03% (19,39%) #Options 0 14 14 14 42 Subtotal 228 184 160 148

Table 4.3: Average absolute percentage errors and implied volatility percentage errors between brackets (assuming stochastic volatility)

The first thing worth mentioning is that in most of the cases, the absolute percentage error is lower than with the fixed volatillty. The MAPE of the options has also decreased to 15.81% (e 0.09). For all the OTM options, the Heston-Nandi method scores better. For ITM options, the results are mixed. Also, the Heston-Nandi method scores significantly better for options that have a longer time to expiration. Below, the average error in Euro is displayed for all the categories.

Days to expiration <60 60-100 101-150 >150 Moneyness Subtotal <90% e 0,03 e 0,04 e 0,08 e 0,05 #Options 103 43 51 35 232 90%-95% e 0,06 e 0,07 e 0,10 e 0,10 #Options 58 40 35 30 163 95%-100% e 0,06 e 0,08 e 0,06 e 0,09 #Options 37 33 26 24 120 100%-105% e 0,10 e 0,10 e 0,07 e 0,09 #Options 22 34 22 27 105 105%-110% e 0,16 e 0,17 e 0,12 e 0,13 #Options 8 20 12 18 58 >110% - e 0,35 e 0,36 e 0,39 #Options 0 14 14 14 42 Subtotal 228 184 160 148

Table 4.4: Average absolute errors in Euro under assumed stochastic volatility

Both the percentage error and error in Euro seem to stay stable when the amount of days to expiration gets bigger. This could mean that the risk free rate has been chosen correctly and that the overfitting in the Black-Scholes method could have another reason. Next, a graph is in which the Heston-Nandi errors are displayed for options that have an expiration time of longer than 150 days. The errors are more evenly distributed around 0, and the errors become bigger as the expiration time gets bigger.

(24)

Figure 4.3: Errors on options with a longer time to expiration (stochastic volatility)

A disadvantage of the Black-Scholes formula is that it works with a fixed volatility based on historic returns. The volatility is a continuously moving process, and the Heston-Nandi model does incorporate this. In that model, the volatility converges to a ’long time average’ (while a fixed volatility is just based on a short history) and it incorporates a stochastic nature, so that the volatility is dependent of the past volatility and a drift parameter. It is possible that the 100-day historic volatility is different from this long time average, so that the options that have a long expiration time are mispriced when using a fixed volatility, because the real volatility moves to the long time average. The Heston-Nandi model accounts for this and the percentage errors are diminishing as the epiration time increases, as displayed in the table.

The last thing that is discussed is the time it takes to do the calculations. The Black-Scholes method only uses the Black-Scholes functions, whereas the Heston-Nandi method has to estimate a model first, and on the model parame-ters, the option price is approximated (with the function mentioned in chapter 2). Timing can be done in R quite easily with the help of the function ’microbenchmark’ that is part of the ’microbenchmark’ package. With this function, a function can be evaluated a number of times and it measures how long it took to get to an answer. After 100 calculations, the average calculation speed was around 104 microseconds for the Black-Scholes method and 254 milliseconds (roughly a quarter of a second) for the Heston-Nandi method. This means that the calculations can be done very quickly. If more options on one time point have to be calculated with the Heston-Nandi method, the same estimated parameters can be used, so that the average calculation time is lower. The results of timing the calculations can be found in Appendix E.

(25)

Chapter

5

Conclusion

In this thesis, models on pricing European options with both fixed (Black and Scholes, 1973) and stochastic volatility (Heston and Nandi, 2000) have been discussed, implemented in R, and have been compared to market prices. These market prices are option prices on Royal Dutch Shell A around the end of 2015/beginning of 2016. The errors are measured both in absolute percentage and absolute difference in money for 6 categories of moneyness and 4 categories of time left to expiration. The risk free interest rate is assumed to be equal to the Euribor rate. These rates have been getting lower and lower, and all became negative (even the 12 months rate) in February 2016.

Both methods price the options quite efficiently (a good relationship between calculation time and relative error), especially when at the money (ATM) options are priced. When the options are deep out of the money (OTM), the errors get significantly worse. Errors on in the money (ITM) options are a bit smaller. This might be because the market-implied volatility is not fixed, but varies over strike price and time to expiration (volatility smile). Because errors are bigger on OTM than on ITM options, it was expected that the implied volatility forms more a ’smirk’ pattern rather than a symmetric ’smile’ pattern. After plotting the implied volatility against the moneyness, it looked like a symmetrical shaped ’smile’. Because there are more options that are deeper out of the money than there are in the money in the sample, the errors on these OTM options are bigger.

When the time to expiration gets bigger, the relative errors on the Black-Scholes fits get bigger and the errors on the Heston-Nandi fits get smaller. This might be the result of the real volatility of the stock reverting to a long term average and the way these methods are made to foresee this. The Black-Scholes method does not incorporate this, but the Heston-Nandi method does, so it gets better fits on the prices, even if the starting volatility has not been chosen too well.

The calculation times are good for both methods. Because the Black-Scholes method only does a few basic calculations, it can price options very quickly. With the Heston-Nandi model, a GARCH(1,1) model has to be estimated first, after which also some calculations have to be done, which make the calculation time a little longer (in absolute numbers, in percentage numbers it takes much longer than with the Black-Scholes formula). If many options are valued on one day, these option values can be fitted with just one GARCH model based on daily returns, which makes the average calculation time go down, because now only 1 model has to be estimated, which takes up most of the time.

(26)

These things make the choice for the Heston-Nandi model quite easy, especially for OTM options that have a long time to expiration. Theoretically speaking, it also makes a lot of sense because it loosens up one of the restrictions of the Black-Scholes model (fixed volatility), and models it more like real-world dynamics (under certain assumptions). Short-term ATM options are priced equally good under both models, and while the Heston-Nandi model takes a little longer to calculate, it is well worth going the extra mile in most cases.

Although the methods discussed in this thesis yield acceptable results, there are a few disadvantages to them. In all the models, the dividend is assumed to be paid out continuously, which is quite a generalization. As mentioned before, dividends on individual stocks are often paid out on predetermined dates, so the effects on the stock price are different than with continuous payments. On the other hand, for stock indices that incorporate a big number of individual stocks, this approximation works better.

The models also do not account for the volatility smile, which is obviously present in the data set. Because of this, options that have a moneyness that differs significantly from 100% will never get better fits.

The stochastic parts in the discussed models solely consist of (standard) normal random innovations. There are models available that incorporate other stochastic parts, like the jump-diffusion model as discussed in Merton (1976), where Poisson distributed jumps can occur in the stock process (jumps can also be added to the variance/volatility process).

As for parameter estimation, the size of the time series that are used for this can be changed. When the length of the returns vector for calculating the standard deviation is increased (when a fixed volatility is assumed), the standard deviations will probably differ not significantly, because big differences would not influence the average too much.

For estimating the variance process, increasing the sample size could result in slightly different parameters. For example, the ’long time average variance’ (described by θ in previous chapters) could be different, because the average volatility is different when the sample goes further in the past. One probable disadvantage of this would be that parameter estimation takes more time, because of this bigger sample.

For further research, there are some things that can be looked at. For instance, while the Monte Carlo method based on the model in Heston (1993) first has to be risk neutralized, there are a few advantages to it. When using antithetic sampling like in Boyle, Broadie and Glasserman (1995), Monte Carlo simulation can be sped up, so the quality increases and it takes less time. It can also be used to price American options, like in Longstaff and Schwartz (2001). Because pricing American options often requires the whole stock process of a great number of simulations and often needs recursive calculations, it might take more time to generate results robustly and efficiently.

(27)

Bibliography

[1] Andersen, L. and Andreasen, J. (2000). Volatility smile fitting and numerical methods for option pricing. Review of derivatives research, 4(3), 231-262.

[2] Barone-Adesi, G. and Whaley, R.E. (1987). Efficient analytic approximation of American option values. The journal of finance, 42(2), 301-320.

[3] Black, F. and Scholes, M. (1973). The pricing of options and corporate liabilities. The journal of political economy, 81(3), 637-654.

[4] Bouchaud, J.P., Matacz, A. and Potters, M. (2001). Leverage effect in financial markets: the retarded volatility model. Physical review letters, 87(22)

[5] Boyle, P.P., Broadie, M. and Glasserman, P. (1995). Recent advances in simulation for security pricing. Proceedings of the 27th conference on Winter simulation, 212-219.

[6] Boyle, P.P. (1977). Option: a monte carlo approach. Journal of financial economics, 4(3), 323-338.

[7] Byun, S.J. (2011). A study on Heston-Nandi GARCH Option Pricing Model. KAIST Business School, Korea.

[8] Canina, L. and Figlewski, S. (1993). The informational content of implied volatility. Review of financial studies, 6(3), 659-681.

[9] Cont, R. (2007). Volatility clustering in financial markets: empirical facts and agent-based models. Long memory in economics, 289-309. Springer Berlin Heidelberg

[10] Cox, J.C. and Ross, S.A. (1976). The valuation of options for alternative stochastic processes. Journal of financial economics, 3(1-2), 145-166.

[11] Cox, J.C., Ross, S.A. and Rubinstein, M. (1979). Option pricing: A simplified approach. Journal of financial economics, 7(3), 229-263.

(28)

[13] Duan, J.C. (1995). The GARCH option pricing model. Mathematical finance, 5(1), 13-32.

[14] Easterbrook, F.H. and Fischel, D.R. (1985). Limited liability and the corporation. The university of Chicago law review, 52(1), 89-117.

[15] Francq, C., Horvath, L. and Zakoian, J.M. (2011). Merits and drawbacks of variance targeting in GARCH models. [16] Heij, C. et al (2004). Econometric methods with applications in business and economics. OUP Oxford.

[17] Heston, S.L. (1993). A closed-form solution for options with stochastic volatility with applications to bond and currency options. Review of financial studies, 6(2), 327-343.

[18] Heston, S.L. and Nandi, S. (2000). A closed-form GARCH option valuation model. Review of financial studies, 13(3), 585-625.

[19] Hull, J.C. (2006). Options, futures, and other derivatives, Pearson Education India.

[20] Hull, J.C. and White, A. (1987). The pricing of options on assets with stochastic volatilities. The journal of finance, 42(2), 281-300.

[21] Lauterbach, B. and Schultz, P. (1990). Pricing warrants: an empirical study of the Black-Scholes model and its alternatives. The journal of finance, 45(4), 1181-1209.

[22] Longstaff, F.A. and Schwartz, E.S. (2001). Valuing American options Review of financial studies, 14(1), 113-147. [23] Mayhew, S. (1995). Implied volatility. Financial analysts journal, 51(4), 8-20.

[24] Merton, R.C. (1976). Option pricing when underlying stock returns are discontinuous. Journal of financial economics, 3(1-2), 125-144.

[25] Ncube, M. (1996). Modelling implied volatility with OLS and panel data models. Journal of banking and finance, 20(1), 71-84.

[26] Schmalensee, R. and Trippi, R.R. (1978). Common stock volatility expectations implied by option premia. The journal of finance, 33(1), 129-147.

[27] Scott, L.O. (1997). Pricing stock options in a jump-diffusion model with stochastic volatility and interest rates: Appliations of Fourier inversion methods. Mathematical Finance, 7(4), 413-426.

[28] Shleifer, A. and Vishny, R.W. (1997). The limits of arbitrage. The journal of finance, 52(1), 35-55.

[29] Stin, E.M. and Stein, J.C. (1991). Stock price distributions with stochastic volatility: an analytic approach. Review of financial studies, 4(4), 727-752.

[30] Wiggins, J.B. (1987). Option values under stochastic volatility: theory and empirical estimates. Journal of financial economics, 19(2), 351-372.

(29)

Appendix

A

Black-Scholes option pricing

BlackScholes <- function(T,r,sigma,S,K,q){

d.1 = (log(S/K)+((r-q) + sigma^2/2)*T))/(sigma*sqrt(T)) d.2 = d.1 - sigma*sqrt(T)

call = exp(-q*T)*S*pnorm(d.1) - K*exp(-r*T)*pnorm(d.2) print(call)

}

In this script, the used variables are:

T : Time to maturity

r: Continuously compounded annual risk-free interest rate sigma: Annual rate of volatility of the asset

S: Asset price at t = 0 K: Strike price q: Dividend yield

(30)

Appendix

B

Heston-like option pricing

library(MASS) Heston <- function(n,T,k,r,v0,S0,K,rho,kappa,theta,sigma,q){ dt <- T/k S <- matrix(0,nrow=n,ncol=(k+1)) v <- matrix(0,nrow=n,ncol=(k+1)) S[,1] = S0 v[,1] = v0

# Correlation matrix for random processes mu.mvn = rep(0,2)

sigma.mvn = matrix(rho,nrow=2,ncol=2) + diag(2)*(1-rho)

for(i in 1:n){

for(j in 2:(k+1)){

randoms.mvn = mvrnorm(n=1, mu=mu.mvn, Sigma=sigma.mvn) dz.1 = randoms.mvn[1]

dz.2 = randoms.mvn[2]

# Generate v and S

(31)

v[i,j] <- max(v[i,j-1] + dv,0)

dS <- (r-q)*S[i,j-1]*dt + sqrt(v[i,j])*S[i,j-1]*sqrt(dt)*dz.1 S[i,j] <- S[i,j-1] + dS

} }

# Calculate call and put value callvec = pmax(S[,k+1]-K,0) putvec = pmax(K-S[,k+1],0) call = sum(callvec)/n*exp(-r*T) put = sum(callvec)/n*exp(-r*T) print(call) print(put) }

In this script, the used variables are:

n : Number of stock paths generated T : Time to maturity

k: Number of time steps

r: Continuously compounded annual risk-free interest rate v0: Starting variance

S0: Asset price at t = 0 K: Strike price

rho: Correlation coefficient between the two Wiener processes kappa: rate of reversion to the long-term variance

theta: long term variance

sigma: Annual rate of volatility of the variance q: Dividend yield

(32)

Appendix

C

Estimating the parameters of a GARCH-process

# Need package fGarch rm(list=ls(all=TRUE)) library(fGarch)

x = read.table("Table with daily log returns")

y = garchFit(formula=~garch(1,1),data=x,trace=F,include.mean=FALSE) z = coef(y) # Output: # Coefficient 1 = omega # Coefficient 2 = alpha # Coefficient 3 = beta

# Calculation of the parameters for the variance process kappa.fit = 1 - z[3] - z[2]

theta.fit = z[1]/kappa.fit sigma.fit = z[2]*sqrt(2) theta.ann = theta.fit*252

(33)

Appendix

D

Estimating the Heston-Nandi parameters and

pricing options

# Clear lists

rm(list=ls(all=TRUE))

# Use package fOptions library(fOptions)

# Riskfree rate

rr = read.table("Risk free rates)

# Timeseries

z = read.table("Returns data")

# Other data

data = read.table("Other data")

T = cbind(data[,3],data[,6],data[,8]) S = data[,2] K = c(20,21,22,23) t.1 = data[,10] t.2 = data[,11] q = data[,5] opt = matrix(0,nrow=length(T[,1]),ncol=12)

(34)

# risk neutral (call)

for (i in 1:length(T[,1])){

x = z[t.1[i]:t.2[i],3]

y = hngarchFit(x , model = list(lambda = -0.5, omega = var(x), alpha = 0.1 * var(x), beta = 0.1, gamma = 0, rf = 0), symmetric = TRUE,

trace = FALSE) fitmodel = list(lambda=-0.5,omega=y$model$omega, alpha=y$model$alpha,beta=y$model$beta, gamma=y$model$gamma+y$model$lambda+0.5) for (k in 1:3){ for (j in 1:4){

r.ann = approx(rr[,1],rr[,2], T[i,k]/365, method = "linear")$y opt.y = (4*(k-1)+j)

opt[i,opt.y] = HNGOption(TypeFlag = "c", model = fitmodel, S = S[i]*exp(-q[i]*T[i,k]/252),

X = K[j], Time.inDays = T[i,k], r.daily = r.ann/365)$price }

} }

library(xlsx)

write.xlsx (opt, "Output RDSA HN.xlsx", sheetName = "Output")

After reading all the data, the script estimates the parameters based on the data and starting values, and calculates 12 option prices (3 different expiration dates and 4 different strike prices) with the risk neutralized parameters (λ∗= −0.5 and γ∗= γ + λ + 0.5, see Duan (1995) for more on this risk neutral specification). The results are written to an Excel spreadsheet afterwards.

(35)

Appendix

E

Results of timing the calculations

Black-Scholes:

Heston-Nandi:

A microsecond is a millionth of a second and a millisecond is a thousandth of a second. With the Black-Scholes method, there is quite a difference between the median and the average. This is probably because there are other processes running on the PC, which makes the calculation time a little bit longer in some cases. Because this method generates its results very quickly, a few microseconds of delay make it look much slower (and also makes the average bigger), while this almost makes no difference with the Heston-Nandi method.

(36)

Appendix

F

Tooling choice

For generating and interpreting the results of this thesis, a big amount of calculations has been done. R and Microsoft Excel have been used for all the calculations and producing graphs and tables.

R is a programming language and a software environment in which statistical calculations can be done. It can also be used for data analysis and graphing. I have used R many times before and I know to get around with it. Big advantages of R are that it is free software and it can be expanded with expansion packages. With these packages, R can be used for more things than when standard, such as measuring calculation times and writing data to Excel spreadsheets. In this thesis, the packages ’fOptions’, ’RQuantlib’, ’microbenchmark’ and ’xlsx’ are used. The formulas for calculating Heston-Nandi option prices are part of the fOptions package. In the RQuantlib package are formulas included that can calculate implied volatilities. The microbenchmark package has functions that can measure calculation times very precisely. Writing results to Excel spreadsheets can be done using the xlsx package.

Microsoft Excel is a spreadsheet programme and more or less the industry standard for all static calculations. It is very easy to use and very flexible when structuring data. Excel also has a programming language, Visual Basic for Applications (VBA), that can be used simultaneously with the spreadsheets, so that it creates a hybrid working place (static values and programmed code), but this is not used. When doing many statistical calculations, R is much faster and more flexible because of the optional packages. I have used Excel for study and for work, so I can work fast and efficiently with it.

In this thesis, Excel is used for retrieving data, structuring data, analyzing results, making tables and graphing. At the University of Amsterdam, ThomsonReuters DataStream is available as an Excel add-in, so timeseries can be saved into spread sheets. After this, the data is structured and saved as .csv files (comma separated values) so that it can be loaded into R. The results from the calculations are analyzed in Excel and using the results, tables and graphs are also made with it.

(37)

vari-ables in the Black-Scholes formula in Excel and using an estimating value for the implied volatility. Next, the GoalSeek feature is used that can set one cell to the desired value by manipulating another cell.

Another way to estimate the implied volatility is by using the function ’EuropeanOptionImpliedVolatilty’ that is included in the ’RQuantlib’ package. This method also uses the other market variables, and gives similar results to the method in Excel. They differ a little bit because of different convergence criteria of the optimizing engines, but this difference is negligible. R is preferred because it can work with matrices, while with Excel the GoalSeek function would have to be used a lot of times, which is very time consuming. This problem could be resolved using a little bit of code in Excel VBA, but this would be a bit superfluous.

(38)

Appendix

G

Parameter estimates for the Heston-Nandi

method

Heston-Nandi parameter estimates are displayed for 3 dates. 25 November is the first day the options are priced, 31 December 2015 is the last trading day of 2015 and 29 february 2016 is the last day the options are priced.

Parameter estimates for 25 November 2015:

Parameter estimates for 31 December 2015:

Parameter estimates for 29 February 2016:

Despite the fact that the 250-day samples are overlapping for the biggest part, the estimated parameter values for the three dates are quite different.

Referenties

GERELATEERDE DOCUMENTEN

The different items that were measured were: contact with Dutch people, contact with people from the home country, satisfaction with the buddy programme,

Er werd wel een significant effect gevonden van perceptie van CSR op de reputatie van Shell (B = .04, p = .000) Uit deze resultaten kan worden geconcludeerd dat ‘perceptie van

Manufacturer Data For Wallstent and Prote´ge´, manu- facturers provided data on the metal-to-artery ratio (Sup- plementary material, file 4—Table 6), while for Precise a general

Consequently, this study set out to answer two research questions: i) which South African manufacturing sectors exert the greatest effects on economic growth (GDP)

• This study reports the long-term follow-up of patients with ST-segment–elevation myocardial infarction randomized to ticagrelor versus prasugrel maintenance therapy and demonstrated

Bij het onder­ deel veiligheid en gezondheid tenslotte, behandelt Byre de drie actieprogramma’s van de EG ten aanzien van veiligheid en gezondheid en daar­ naast een

Preventie van verzuim en arbeids­ ongeschiktheid J.P.A. Bakkum 66 Column: Arbeidsomstandigheden-

Several implications are discus­ sed, especially the employment situation, social dumping, regional inequalities, social security systems and national systems of