An Investigation of Heston and SVJ Model During Financial Crises

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

LONDON SCHOOL OF ECONOMICS AND POLITICAL SCIENCE

An Investigation of Heston
and SVJ model during
Financial Crises
FM408 Financial Engineering
MSc Finance (Full-Time)

2012-2013


Candidate Number: 82751
Word Count: 5752



The copyright of this dissertation rests with the author and no quotation from it or information derived
from it may be published without prior written consent of the author.
1

Table of Contents
Abstract ........................................................................................................................... 2
1. Literature review and Introduction ............................................................................... 2
2. Description for the Market Data ................................................................................... 4
2.1 Data Source and its Selection .............................................................................................. 4
2.2 Normality Test of the data .................................................................................................. 6
3. Black Scholes Model ..................................................................................................... 9
4. Heston Stochastic Volatility Pricing Model .................................................................. 11
4.1 The Heston Model ............................................................................................................ 11
4.2 Calibration of the Heston Model ....................................................................................... 12
5. An Extension of Heston Model .................................................................................... 16
5.1 Add Jumps ....................................................................................................................... 16
5.2 Calibration of the SVJ Model ............................................................................................. 16
6. Financial Crises Analysis with the SVJ model ............................................................... 19
7. Conclusion .................................................................................................................. 22
Acknowledgement ......................................................................................................... 23
References ..................................................................................................................... 23
Appendix ........................................................................................................................ 24


2

Abstract
After the crash of the stock market in the 20
th
century, the implied volatility surface of the stock
market exhibits a smile shape. That aroused the interests of researchers to develop more
sophisticated models beyond the basic Black-Scholes model. In this study, two stochastic models were
studied the Heston model and the Stochastic Volatility Jump model. They were used to analyze the
implied volatility surface for S&P 500 index options during two typical financial crises 2000 Dot
com bubble crisis and 2008 US Subprime Mortgage crisis. The results from this study show that the
parameters of these two models capture the volatility and stock crash, yet these models are still
imperfect at pricing options.
1. Literature review and Introduction
In 1973, the paper published by Black and Scholes (1973) introduced an option pricing model
based on the assumptions that the return of the stock is log normal and the volatility is
constant across all options with different maturities. After the stock crash in 1987, the market
implied volatility was observed to perform a smile-like shape, i.e. the implied volatility is
higher for the lower end of the strike price. This smile feature of the volatility surface
suggests that the Black Scholes model is no longer good enough as an option pricing model.
In particular, for equities, the volatility smile is noticed to be right skewed. Thus for equities,
Black Scholes model would tend to under price the in the money puts while over estimating
the out of the money calls. Figure 1.1 by C.Chen (2007) reveals the crashing impact of the
stock market on the implied volatility surface. We can easily see that before the crash, the
implied volatility surface roughly exhibited a table top shape. This suggests that the Black-
Scholes model indeed shall give a good prediction before the crash in the 20
th
century.
However, things have changed after the crash, the implied volatility surface has become more
skewed (See Figure 1.1:Right). Moreover, the price for the out of the money puts (in the
money calls) shoots up drastically due to the over demand of the put options from the
investors in the market.

Figure 1.1: Left: the Implied volatility smile curves for pre and post the crash in the 20
th
century (1987);
Right: A skewed surface for low strike and short maturity options by C. Chen (2007).
3

Since then, a significant amount of studies have been done on developing more sophisticated
option pricing models. In 1987, Hull and White proposed a stochastic volatility (SV) model
to capture the smile effect in the stock, among which the Heston model is seen as the most
widely accepted one. The Heston model corrects various restrictions imposed by the Black-
Scholes model. It allows the volatility to be stochastic; addresses the leverage effect (a price
drop normally is accompanied by an increase in the volatility); includes the non log return
character of the stock; moreover, the Heston model also imposes a boundary restriction to
exclude negative volatilities while at the same allows a volatility mean reverting property.
Furthermore, the Heston model is also well - known for this computational advantage among
other SV models. It has a closed loop formula as was derived by Heston (1993), which could
be solved easily by using computational method whereas other SV models require complex
numerical methods. To conclude, the SV model could be regarded as an extension of the
basic Black-Scholes model. In this model, it resolves some limitations imposed by the Black-
Scholes model and gives an improved representation of the implied volatility surface.

Although it is an improvement over the BS model, the SV model still does not fully capture
the smile feature. It mirrors the implied volatility surface for mid and long - term maturities
but not for the short-term maturities options. The high implied volatility for the out of the
money puts with shorter maturities would be under priced under this model. This leads to the
development of the SVJ model by Bakshi, Cao and Chen (1997). The jump feature of this
more advanced model could be used to explain the smile shape of the surface better than the
previous two models. Yet empirical study shows that neither SV (Heston) nor SVJ alone
could give an accurate estimation of the market. SVJ still has its own drawbacks. It excludes
the relationship between the size of a market crash and its impact on the quantity that the
volatility could be increased. Researchers have been dedicated to develop more advanced
models to address these issues, which is beyond the scope of this study.

This dissertation aims to find how the implied volatility surface changes during different
financial crises period. In particular, the 2000 Dot com bubble crisis and the 2008 US
Subprime Mortgage crisis were studied in this dissertation. A time period extending from
1999 to 2010 was selected, covering the two crises periods.

This study consists of five main chapters, starting with the raw data analysis in Chapter 2, in
which the normality test was conducted for several selected time horizons. Followed by
Chapter 3 - a brief introduction on the basic Black Scholes model and how the implied
volatility surface from the Black Scholes model could be used to benchmark other more
advanced models. In Chapter 4, the Heston model without jumps was computed, and the
calibration method was employed to give the best fit of the market data. In the next chapter,
based on the Heston model built in Chapter 4, a stochastic volatility jump (SVJ) model was
developed to address the shortcomings of the Heston model. Again, the SVJ model was
calibrated by employing a least square non - linear optimisation method in Matlab. In the last
chapter Chapter 6, I have discussed some findings by comparing the implied volatility
surfaces using the developed models. All the Matlab codes used in this dissertation were
attached in the Appendix for future reference.
4

2. Description for the Market Data
The main purpose of this study is to investigate how the implied volatility surface changes in
and out of the financial crisis by using the Heston and the SVJ model. To give a good
overview of change of the implied volatility surface over several financial crises periods, the
data used in this dissertation is based on the daily closing price of S&P 500 index options
from 1999 to 2010, retrieved from Wharton Database. It would have been good to compare
the data of today with that of the 1980s where very few jumps could be observed in the stock
market. However, due the limited data that I could import from Wharton Database, the time
horizon of the data investigated in this study is from 1999 to 2010.
2.1 Data Source and its Selection
For this study, I have chosen the S&P 500 index options data. This index has been
investigated in many literature, such as Madan and Chang(1996) and Bakshi, Cao and Chen
(1997) etc. S&P 500 index options is one of the many indices that have been studied in the
past due to its larg trading volumes and big open interest. On top of that, because S&P 500
index options exhibit a European exercise style, it eliminates the complication of the model
building due to early exercise problems.

S&P 500 Index Time Series

Figure 2.1: Times Series for S&P 500 index
The underlying stock (S&P 500 index) of the options was collected using the historical
adjusted closing price from Yahoo Finance. The whole time series studied in this dissertation
mainly covers two recent financial crises in the history, namely, 2002 Dotcom Bubble crisis,
2008 the US Subprime Mortgage Crisis. Figure 2.1 depicts the whole time series, from which
we observe that the stock price experienced drastic drops during periods 2003 and end of
2008. A similar pattern could also be found for the return statistics we see the daily returns
of S&P 500 index becomes more volatile, dropping significantly to negative levels. The
-15.00%
-10.00%
-5.00%
0.00%
5.00%
10.00%
15.00%
0
200
400
600
800
1000
1200
1400
1600
1800
7/24/98 4/19/01 1/14/04 10/10/06 7/6/09 4/1/12 12/27/14
S&P 500 index Time Series S&P 500 index return
5

returns are also observed to have more clustering during the crisis periods, especially around
2000-2001 and 2008.

S&P 500 Index Options Data:
The data source extracted from Wharton Database has the following format (Table 2.1). The
Strike price in the data has been scaled by a notional number of 1000. The Impl_volatility was
computed by reverse-engineering the Black-Scholes formula, taking the option price as the
average of the Best_bid and Best _offer.

Date Exdate CP_flag Strike Best_bid Best_offer Volume Impl_Volatility
19990601 19990717 C 1475 0.875 1 43 0.188725
19990601 19990619 C 1275 37.75 39.75 5 0.249485
19990601 19990619 P 675 0 0.0625 0

19990601 20000617 P 1350 138.25 142.25 0 0.275875
19990601 20000617 C 750 581.125 585.125 0 0.39934
19990601 20000318 C 1450 68.25 70.25 100 0.242048
Table 2.1: Historical Data of S&P 500 Index Options - source from Wharton Database
According to the paper published by the International Monetary Fund (IMF), the crisis dates for
Dot com and US Subprime Mortgage were defined as follows:

Crisis Name Crisis Date Period
Dot com 28/02/2000 07/06/2000
US Subprime 26/07/2007 31/12/2008
Table 2.2: Crisis dates defined by IMF (2010)
Following a paper written by Mo Chaudhury (2011), I have further specified the crisis into
pre, in and later crisis periods. In particular, the US Subprime Mortgage crisis in 2008 was
divided into three sub-periods pre-crisis period starting from 01/01/2007 to 31/08/2007,
early crisis period from 01/09/2007 to 14/07/2008, and lastly the later crisis period from
15/07/2008 until 31/12/2008. Figure 2.2(a) plots the smile curves for the 2008 US Subprime
Mortgage crisis in particular, we can see that the plot (green dots) before the crisis, the IV
(implied volatility) exhibits a smile curve, reaching a minimum point at Moneyness equals 1.
Figure 2.2(a) also plots the implied volatility curves in periods during and after the financial
crisis. The curve during 2008 US Subprime crisis became more right skewed, gradually
losing its smile-like curve shape.

Similar results were observed for the Dot com crisis in 2000. The crisis periods were split
into several sub periods. Pre-crisis period starts from 01/06/1999 to 27/02/2008; the actual
Dot com crisis period starts from 28/02/2000 to 15/06/2000; finally, the later crisis period
was defined to be from 16/06/2000 31/12/2000. We see that the implied volatility curves
become right- skewed significantly during the crisis period, indicating a change of the risk
appetite of the investors. People are more worried about more crashes in the stock market,
buying put options to hedge their portfolios, pushing up the prices for out-the-money puts.
After 2000 - the Dot com crisis, we see the implied volatility on 01/06/2001 for example, has
recovered its smile shape.
6


Figure 2.2 (a): 2008 US Subprime Crisis: The smile curves for S&P 500 index Call options for pre, in and later
crisis periods. *Notice that the discontinuity of the points is due to the incompletion of the data



Figure 2.2 (b): 2000 Dot com Crisis: The smile curves for S&P 500 index Call options for pre, in and later crisis
periods
2.2 Normality Test of the data
The normality test was conducted on the return of the S&P 500 index. The following figures
display the results from the normality tests conducted for S&P 500 stock returns studied in
this paper. During the sample period extending from 1999 to 2010, we can see that the stock
return does not follow a perfect uniform normal distribution shape as depicted in the Black
Scholes model - it has kurtosis and fat tails. The effect becomes more pronounced for periods
0 0.5 1 1.5 2 2.5
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
Moneyness = K/s0
I
V


2006/12/01
2008/08/01
2008/01/02
2008/12/01
0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
0.2
0.25
0.3
0.35
0.4
0.45
0.5
0.55
0.6
0.65
Moneyness = K/s0
I
V


2000/02/28
2000/06/01
2000/12/15
2001/06/01
7

2001- 2004 and 2007 2008, which are the time periods covering the Doc.com and the US
Subprime Mortgage crisis. During 20012004, we observe a right skewness in the
distribution, accompanied by a few more spikes occurring in the left tail. A similar pattern
was observed again during the 2008 crisis. The kutosis (peakness) of the distribution
increased during the crisis periods, spreading into both tails. However, since investors
demand more puts than the calls to hedge their portfolios in crisis, the whole distribution,
therefore, is skewed towards the right, squeezing the right tail more.

This phenomenon seems counterfactual in a Black-Scholes world, where the return is
assumed to be normally distributed, and the instant volatility is considered to be constant.
Thus, if Black Scholes models assumption is valid, we should not observe any of the
patterns described above. However, Black Scholes does not hold in the real market, the
market data tells us that the implied volatility against the strikes shows a smile pattern
(Figure 2.2), and furthermore this smile curve becomes right skewed during the crisis.
More recent studies have been focusing on stochastic volatility and jump diffusion models,
which was further discussed in Chapter 3.



0
10
20
30
40
-7% -6% -5% -4% -3% -2% -1% 0% 1% 2% 3% 4% 5% 6% 7%
F
r
e
q
u
e
n
c
y
(a) 1999 - 2000
0
10
20
30
40
-5.00% -4.00% -3.00% -2.00% -1.00% 0.00% 1.00% 2.00% 3.00% 4.00% 5.00%
F
r
e
q
u
e
n
c
y

(b) 2001 - 2004
8




Figure 2.3: Normality test on the return of the S&P500 index for period from 1999 to 2010: (a) Pre financial
period: 1999 2000; (b) Dot com Bubble: 2001 2004; (c) After Doc.com before US Subprime Mortgage crisis
period: 2004 2007; (d) In US Subprime Mortgage crisis: 2007 -2008; (e) After US crisis and during Eurozone
crisis: 2009 -2010.


0
10
20
30
40
-4.00% -3.00% -2.00% -1.00% 0.00% 1.00% 2.00% 3.00% 4.00%
F
r
e
q
u
e
n
c
y

(c) 2004 - 2007
0
10
20
30
40
-12.00% -9.50% -7.00% -4.50% -2.00% 0.50% 3.00% 5.50% 8.00% 10.50%
F
r
e
q
u
e
n
c
y

(d) 2007 - 2008
9

3. Black Scholes Model
The model was first published in Black and Scholes (1973), in which the stock price was
assumed to be a Geometric Brownian motion process.

(3.1)

(3.2)
where is the instantaneous rate of return and is the volatility of the stock price. Then by
Its lemma using a replicated portfolio, Black and Scholes reached the following equations
for the price for European style call options. Then the put price could be computed by using
Put-Call Parity.
( ) (

) (

)
()
(3.3)

[(

) (

)( )] (3.4)

[(

) (

)( )] (3.5)
As discussed before, the Black-Scholes model alone would not be used as a tool to price the
securities in the market. However, we can use Black-Scholes model as a benchmark to
reverse engineer the implied volatility of an option for a specific strike and maturity given its
option price observed in the market. Therefore, the implied volatility surface computed by
this method could be used as a reference to benchmark more advanced models such as the
Heston and SVJ models.
By reverse engineering the raw data from Wharton Database and making assumptions that
the option price would be calculated as the average of the best-bid and best-ask prices in the
market, the implied volatility surface is calculated. Figure 3.1(a), (b) shows one of the
implied volatility surface plotted by reverse engineering the call prices observed in the
market. The Matlab code used to plot the surface was written by Rodolphe Sitter (2009).
However, one drawback of this Matlab function is that for maturity and moneyness points
where no option price data data is given, the Gaussian function would provide an
extrapolated value which might be inaccurate. Thus this Matlab function should not be used
with incomplete data sets to plot the implied volatility surface.
By comparing Figure 3.2 (a) and (b) one in the financial crisis (2008) and one out of the
financial crisis (2005), we can see that the 2008 plot is more skewed, whereas the 2005 plot
looks more smile shaped. Note that the Moneyness (M) is defined as K/S
0
, and time to
maturity (T) is in years.
10


Figure 3.1 (a): In 2008 US financial crisis period: Implied Volatility Surface on 01/10/2008

Figure 3.2 (b): Out of the crisis period: Implied Volatility Surface on 03/01/2005

11

4. Heston Stochastic Volatility Pricing Model
4.1 The Heston Model
The Black-Scholes model is limited in real practice due to its restrictive assumptions. One
way to model the stock price and volatility is to adopt a stochastic volatility model. More
recent studies have been focusing on developing these stochastic models. In 1993, Steven
Heston published his first paper on the Heston model. In the paper, the stochastic volatility
Heston model was defined by the following stochastic differential equation:

(4.6)

(4.7)
Unlike the Black-Scholes model, the Heston model assumes that the volatility term is
stochastic. The diffusion term in Equation 4.6 depends on the instantaneous volatility V
t

instead of a constant volatility. The Heston model also includes the mean-reversion feature,
which the Black-Scholes model does not have. In Equation 4.7, denotes the mean reverting
speed, is the long-run mean, is the volatility of volatility. Lastly, dZ
1t
and dZ
2t
are two
Brownian motions, which are related to each other by Equation 4.8. The log-return of the
stock and the volatility is correlated to each other by a coefficient . This additional
coefficient resolves the limitation of the Black-Scholes model on modelling non-log normal
return stocks.

(4.8)

Therefore, the Heston model could be regarded as an extension of the Black-Scholes model.
It captures other features that a basic Black-Scholes model does not have; for example, it
takes into account of the non-normal distribution feature of the stock return, the mean
reverting property of the volatility as well as the leverage effect. Beside these, one principle
advantage of Heston model is that, unlike other stochastic volatility models (SV), the Heston
model yields to a closed-loop form solution no need of heavy numerical computation. In the
paper by Heston (1993), it derived the price of a European call option has the following form:

(

()

(4.9)

By Put-Call Parity, we can reach Equation (3.10) for a European put option price:

(

) (

)
()

(4.10)

where, P
1
and P
2
are the time and state dependent conditional probabilities that a call to be in-
the-money (ITM).

()

(4.11)
(

) ( ) ( )


12

( )

[(

) (

)]
( )

)

For j =1, 2 we have



Note that denotes the market price of the volatility, which becomes zero under the risk
neutral world . Therefore, by pricing under , we can eliminate the parameter in the
equation, i.e. = 0, leaving only five unknown parameters *, *, *, V
0
*, *
1
. These
unknown parameters could be computed by calibrating them against market data, which is
discussed in the next chapter Chapter 5.

)

The above equations look intimidating but they can actually be solved very easily using
numerical methods. There are several ways to reach the pricing solutions for a Heston model.
F D Rouah & G Vainberg (2007) explains two separate computational methods by using the
full valuation approach (Monte Carlo) as well as the closed loop-form approach. A third
method Fast Fourier Transform (FFT), which was proposed by Carr & Madan (1999),
proved to be considerably faster than most other existing numerical methods.

I have adopted the closed-loop method based on the following considerations. Monte Carlo
approach is the most mathematically clear way to simulate the process. However, the
accuracy of the model depends on the number of paths included in the model increasing the
number of paths could be computationally expensive. Secondly, although the Fast Fourier
Transform method is the fastest, my attempts at it were unsuccessful. However, the closed
form approach was promising and the results of using this model is thus reported in this
dissertation. The Matlab code HestonCall by Moeti Ncube (2010) was employed to
calculate the Heston option price.
4.2 Calibration of the Heston Model
Calibration is an important concept in the Heston model. In the previous section we have
defined six unknown parameters (, , , V
0
, , ), which are not observed directly in the
market. We have further addressed that under the risk neutral probability world , one
parameter could be eliminated, leaving only five parameters which are to be determined.


1
Parameters with * means pricing under
13

The calibration method is based on the idea that there is minimum error between price
computed from a mathematical model and the price, which is observed in the market.
Therefore, we start from a set of guessing parameters, compute the Heston option price
indicated by these guessing parameters, and then compare the obtained Heston price with the
actual market price. By iteratively changing the parameters to minimise the errors between
the Heston model price and the actual market price, we can calibrate the parmeters for the
Heston model, which can be used to price the securities in the market. Nevertheless, this
calibration approach relies strongly on the assumption that the market price is traded at a fair
price. It captures all the information used to predict the unknown stock.

The Matlab function called HestonCalibration written by Moeti Ncube (2010) was
employed to calibrate the Heston model for the entire time horizon covered in this
dissertation. HestonCalibration contains a Matlab least square non-linear optimisation
function lsqnonlin. It calibrates the data by searching for an optimum set of parameters (V
0
,
, , , ), which would give the best fit for the price observed in the market.

Table 4.1 displays one set of calibrated parameters on September 15, 2005 for SPX. The right
column, shows the calibration results obtained from Gatheral (2006) for a non-jump Heston
model. We can see that these two sets of data are comparable.


Calibration result Gatheral (2006)
V
0
0.0162 0.0174
1.2933 1.3252
0.0399 0.0354
0.4243 0.3877
-0.6833 -0.7165
Table 4.1: Heston calibration to S&P 500 index option surface on 15/09/2005
Figure 4.1(a) shows the daily calibrated surfaces by Heston model. The top surface is the
implied volatility surface obtained from the market data, and the flatter surface below is the
calibrated Heston model. We can see that the simple calibrated Heston model implied
volatility surface does not reveal the actual market implied volatility surface perfectly.
Nevertheless, it shows a more skewed smile shape in comparison with the table top surface
plotted from the Black-Scholes model. It could be concluded that the Heston model is an
improvement from the simple Black-Scholes model by introducing non-log normal return and
stochastic volatility characteristics of the underlying. On top of that, it is shown in Figure
4.1(a) in particular, the daily calibrated Heston model could predict the market implied
volatility better for longer maturities T > 2 years, but for short maturities (T < 1.5 years),
Heston model deviates from the actual implied volatility surface significantly. This feature
for the Heston model was discussed in more details in Zhang and Shu J (2003),

Last but not least, Figure 4.1(a) is a plot of the implied volatility surface during the 2008 US
Subprime crisis. The actual surface lost its smile shape, and becomes skewed as discussed in
Chapter 2.1. The calibrated Heston surface follows this skewed pattern. However, the surface
fit is not satisfactory for options which are deeply in-the-money and out-of-the money. This
14

characteristic reveals one of the shortcomings of the Heston model a simple Heston does
not capture the jumps, which is especially considered as an important feature during the
crisis.

Figure 4.1(a): Daily Basis: calibrated Surface on 2008/11/03 by using parameters from 2008/11/03



Figure 4.1(b): 15-day Basis: calibrated Surface on 2008/11/03 by using parameters from 2008/10/15
15


Figure 4.1(c): Monthly Basis: calibrated Surface on 2008/11/03 by using parameters from 2008/10/01
The remaining issue is how frequently the data should be calibrated. In Figure 4.1, the
calibrated surfaces by Heston model based on three different calibration windows are plotted.
As discussed before, the daily calibrated Heston model does not mirror the actual market data
perfectly, yet it still gives a good representation for mid and long term maturities. However,
the monthly calibrated surface in Figure 4.1(c), notably deviates from the actual market
implied volatility. By looking at the daily calibrated surface with the surface calibrated on a
15-day interval in Figure 4.1(a) and (b), no significant difference was observed. Therefore, to
simplify the computation method in this report, the parameters were calibrated every 15 days.

The following table shows a list of calibrated parameters.

V
0

2005/01/03 0.01971 1.38512 0.03492 0.40540 -0.62959
2005/09/15 0.01594 1.14916 0.04165 0.39069 -0.71728
2008/01/02 0.06142 0.49913 0.08582 0.43720 -0.73465
2008/08/01 0.04595 0.80769 0.07529 0.38107 -0.73625
2008/10/01 0.10939 0.67064 0.08086 0.49670 -0.76216
2008/10/15 0.30641 2.43717 0.05022 0.5000 -0.89999
2008/11/03 0.21221 1.15175 0.10446 0.50000 0.90000
2008/12/01 0.39647 2.83012 0.08625 0.50000 -0.89995
Table 4.2: Calibration results

16

5. An Extension of Heston Model
5.1 Add Jumps
In this Chapter, a more advanced stochastic diffusion jump model (SVJ) was investigated to
create a better option pricing model. The development of the model was based on Bakshi,
Cao, and Chen (1997), in which a stochastic jump model was modified into the equations on
top of the basic Heston model. Notice that the notations were changed from the original paper
in order to be consistent with the Heston model developed in Chapter 4.

(3.6)

(3.7)
All the parameters have the same meanings as that were defined in Chapter 4 except J
t

which is a jump percentage defined by Equation 3.8. The log normal of J
t
follows a normal
distribution with a mean of ln(1+
J
) ()
J
2
, and a standard deviation of
J
. The jump is
defined by a Poisson process, Equation 3.9, which follows the same definition in Bakshi,
Cao, and Chen (1997).

[ ()] ((

) (3.8)

{


(3.9)

The stochastic volatility jump model (SVJ) was coded into a Matlab function named
SJVCall. The algorithm followed to compute a SVJ call price is based on the equations
presented in Bakshi, Cao, and Chen (1997).

Comparing the basic Heston model and Black-Scholes model, SVJ model completes the
Heston model by including a jump feature of the stock market into the model. However, one
drawback of the SVJ model is that it assumes an independent relationship between large price
movements (jumps) with the implied volatility indicated by the model. This seems
counterfactual, as a big price crash should results in an increase of the volatility. This
shortcoming of the SVJ model was addressed in the SVCJ model, in which it includes an
additional parameter
j
compensating for the shortcoming of the SVJ model. Here in this
study, the SVCJ was not included.

5.2 Calibration of the SVJ Model
The calibration method used for the SVJ model follows a similar Matlab routine as was for
the Heston model. It employs a Matlab optimisation function lsqnonlin the least square
non-linear optimisation function to search for an optimal solution which could minimise the
error between the call price from a SVJ model and that of a market call price. Again this
17

calibration approach is based on the assumptions that the market is efficient and contains all
the available which could be used to price the options. The Matlab function called
SVJcalibrationNplot written by the author would calibrate and plot the SVJ model.


Figure 5.1: Comparison between Heston model and SVJ model on 2005/09/15
Figure 5.1 illustrates one example of the calibrated SVJ surface. In addition, it also plots the
actual implied volatility surface (the most top surface), and the simple Heston surface (most
bottom surface) which was computed from Chapter 4. The advantage of the SVJ model was
very obvious. By adding an additional jump diffusion term into the model, the fitting of the
model to the market data was improved notably, fixing the limitations of the Heston model in
pricing the short-term maturity options.

V
0
J J J
Heston 0.0159 1.1492 0.0416 0.3907 -0.7173
SVJ 0.0675 5.3800 0.0400 0.3800 -0.5700 -0.0530 0.0967 0.1308

Gatheral 0.0174 1.3252 0.0354 0.3877 -0.7165
BCC 0.5394 0.0439 0.3038 -0.6974
Table 5.1: Calibrated parameters for SVJ and the Heston model on 2005/09/15
* BCC parameters are the results obtained from Bakshi, Cao, and Chen (1997); Gatheral parameters are from Gatheral (2006).

The calibrated parameters are displayed in Table 5.1, for comparison, Table 5.1 also lists the
calibrated parameters for the Heston model on the same day. To examine the results, it was
noticed that the mean reverting speed ( = 5.3800) increased dramatically for a SVJ model
studied in this dissertation, while the rest of the parameters remain approximately unchanged.
The calibrated results for SVJ model are comparable with what was found in literature, apart
from the mean reverting speed . This deviation is due to the limitation of the calibration
code. Although the SVJ model is of a closed form, the equations are highly non-linear.
Besides, there are 8 parameters to calibrate. The code works by searching for a combination
of the 8 parameters that give the least error. Due to the non-linearity and high number of
0
0.5
1
1.5
2
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8

Time t o Mat ut it y T
I mplied Volat ilit y Surface
Moneyness M =
K
S

I
m
p
l
i
e
d
V
o
l
a
t
i
l
i
t
y
<
(
T
;
M
)
0.2
0.3
0.4
0.5
0.6
0.7
18

dimensions, it is possible that the code found a combination of parameters that are within a
local optimum point. A better global optimum point may exist. This search method is
inherently depended on the provided initial guess and limits. Thus to best achieve this global
optimum point, the variables were initially set off from points that are close to textbook
values or stable financial periods values.


19

6. Financial Crises Analysis with the SVJ model
In this chapter, the SVJ model developed in Chapter 5, is calibrated on a 15-day basis for two
particular financial crises the 2000 Dot com crisis and the 2008 US Subprime Mortgage
crisis. The computational method behind the calibration method is based on the numerical
optimisation approach to search for a local minimum that minimising the error between the
implied volatility surfaces over the 15-day period with that implied by the market. The
Matlab code called SVJcalibration_15Day developed by the author was attached in the
Appendix.
Below are two plots of the historical index price for S&P 500 during the two crises periods.
The S&P500 index had a large drop in July, 2002 and another significant drop in Oct, 2008.
According to the IMF, the crisis period for Dot com should start from February, 2000. Yet,
the stock crash only occurred in 2002, which should correspond to a drastic change of the
volatility surface. Therefore, only 2001 and 2002 periods were considered for Dot com crisis
in this chapter.

Figure 6.1 (a): S&P 500 index historical price during 2008 US crisis

Figure 6.1 (b): S&P 500 index historical price during 2000 Dot com crisis
The SVJ parameters (V
0
, , , , ,
J
,
J
,
J
), were calibrated on a 15-day interval, and the
calibrated results for these two financial crisis periods are included in the Appendix (Table I
& II). The following figures Figure 6.2 and Figure 6.3, are the plots for the calibrated
parameters for the two financial crises periods studied in this dissertation, where all the
symbols have their usual meanings as defined in Chapter 4 and Chapter 5. Table 6.1 shows
some statistics of the calibrated parameters over the sample period.
i) V
0
is the instantaneous volatility
ii) is the rate at which V
t
reverts
20

iii) is the long run mean of volatility
iv) is the volatility of volatility
v) is the correlation between the two Brownian motions
vi)
J
is the mean percentage of the jump size
vii)
J
is the standard deviation of jump expressed in percentage
viii)
J
is the expected jump per year that follows a Poisson distribution
2000 Dotcom Bubble Crisis
V
0

J

J

J

mean 0.23995 104.87104 0.81617 1.52002 0.45205 -0.11955 0.12179 1.28784
median 0.17323 53.94200 0.39646 1.03025 0.56142 -0.10200 0.12310 1.34950
S.D. 0.18975 103.81724 1.07117 1.19997 0.52777 0.07578 0.04340 0.70104

2008 US Subprime
mean 0.24429 7.76785 0.08568 1.01763 -0.38855 -0.24022 0.23573 0.57624
median 0.12695 6.81904 0.02149 0.73434 -0.37930 -0.18640 0.21993 0.55795
S.D. 0.27252 7.42190 0.22505 0.74371 0.26504 0.09298 0.11613 0.22679
Table 6.1: Statistic analysis of the calibrated parameters over the sample period
The calibrated parameters over the selected crises time horizon are presented in the following
figures. For the 2008 US crisis in Figure 6.2(a), shot up massively around Oct, 2008, which
could be explained by the crash observed in Figure 6.1 (a). The same pattern was observed in
parameter V
0
, implying a big increase in the volatility of the stock accompanies by a sharp
reduction in the stock price. On contrary, the mean percentage of the jump size
J
and the
correlation coefficient went down to more negative values. A negative indicates the return
of the stock is left skewed. Therefore, the increase in the magnitude of

while still keeping a
negative sign implies the stock return becomes more skewed to the left after the crash. As
could be expected, the expected jumps per year
J
increased accordingly with the increase of
and V
0
. The value for changed drastically from 10 before the crash to plus 30 at the crash
as shown in Figure 6.2(b).

Figure 6.2 (a): 2008 US Subprime Mortgage Crisis for calibrated SVJ model parameters V0, , , , , J , J , J
-2.0
-1.0
0.0
1.0
2.0
3.0
4.0
2008 US Subprime Mortgage Crisis
V0


J
J

21


Figure 6.2 (b): 2008 US Subprime Mortgage Crisis for calibrated SVJ model parameters V0, , , , , J , J , J
A similar pattern could be seen for the Dot com crisis. Significant fluctuations were
witnessed for the calibrated SVJ parameters in year 2001 and 2002
2
, in which the stock
market crashed. In particular, we see the value has increased by more than 3 folds to 290.

Figure 6.3 (a): 2000 Dot com bubble crisis for calibrated SVJ model parameters V0, , , , , J , J , J


Figure 6.3 (b): 2000 Dot com bubble crisis for calibrated SVJ model parameters V0, , , , , J , J , J

2
The discontinuity of the plot is due to missing data
-0.2
0.0
0.2
0.4
0.6
0.8
1.0
0
10
20
30
40
2008 US Subprime Mortgage Crisis


-1.0
0.0
1.0
2.0
3.0
4.0
2000 Dot com Bubble Crisis
V0


J
J

-1.0
0.0
1.0
2.0
3.0
4.0
-10
90
190
290
390
2000 Dot com Bubble Crisis


22


7. Conclusion
In my study, I have discussed the different option pricing models that were proposed by the
existing literature, namely, the Black-Scholes model, Stochastic Volatility (SV) model and
lastly the Stochastic Volatility Jump (SVJ) model. In the first part of my study, I have briefly
discussed the smile feature of the stock implied volatility and how it was changed after the
crashed in the 20
th
century, reflecting a change of the risk appetite for the investors. This
leads to a discussion of how to improve the basic Black-Scholes model to capture more
characteristics of the market data. In particular two more advanced models - the Heston
model and the SVJ model, were investigated in this study.
I have developed the model using Matlab by following the algorithm by Heston (1993) and
Bakshi, Cao, and Chen (1997). The calibrations for the Heston and SVJ models are based on
the least square non-linear numerical Matlab optimisation routine. The calibrated parameters
for both Hesotn and SVJ models were compared with the results from Gatheral (2006). In
general, it shows a consistency apart from parameter . However, this might due to the
limitation of the calibration method. The closed form of the Heston and SVJ model are highly
non linear, which results in complications when calibrating the model parameters.
The model studied was based on a 15-day calibration period, which was discussed in Chapter
4. Two financial crises the 2000 Dot com bubble crisis and the 2008 US Subprime
Mortgage crisis were examined in Chapter 6. It was found that the changes in the calibrated
parameters from the developed model are consistent with the response of the stock market.
Last but not least, neither SV nor SVJ model alone are good enough to predict the market
successfully. They still have their limitations and more sophisticated models such as SVCJ
and SVSCJ models could be used to correct some restrictions of the SVJ model, however,
this is beyond the scope of this study.

23

Acknowledgement
I would like to thank my lecturer Dr Jean-Pierre Zigrand, Reader in Finance of London
School of Economics, for his guidance in this dissertation.
References
Bakshi, G., Cao, C. & Chen, Z., 1997. Empirical performance of alternative option pricing models.
Journal of Finance, LII(5), pp. 2003-2049.
Bakshi, G., Cao, C. & Chen, Z., 2000. Pricing and hedging long-term options. Journal of Econometrics,
Volume 94, pp. 277-318.
Black, F. & Scholes, M., 1973. The pricing of options and Corporate Liabilities. Journal of Political
Economy, Volume 81, pp. 637-59.
Carr, P. & Madan, D. B., 1999. Option evaluation the using fast fourier transform. Journal of
Computational Finance, 2(4), pp. 61-73.
Chaudhury, M., 2011. The Financial Crisis and the Behavior of Stock Prices. [Online]
Available at: http://dx.doi.org/10.2139/ssrn.1802826
Chen, B., 2007. Calibration of the Heston Model with Application in Derivative Pricing and Hedging.
[Online]
Available at: http://ta.twi.tudelft.nl/mf/users/oosterle/oosterlee/chen.pdf
Dungey, M. et al., 2010. Are Financial Crises Alike?, s.l.: International Monetary Fund .
Gatheral, J., 2006. The Volatility Surface: A Practitioner's Guide. s.l.:Wiley Finance.
Heston, S., 1993. A closed-form solutions for options with stochastic volatility. Review of Financial
Studies, Volume 6, pp. 327-343.
Hull, J. & White, A., 1987. The pricing of options on assets with stochastic volatilities. Journal of
Finance, Volume 42, pp. 281-300.
Madan, D. B., Carr, P. P. & Chang, E. C., 1998. The Variance Gamma Process and Option Pricing.
European Finance Review, Volume 2, p. 79105.
Ncube, M., n.d. Matlab code for Heston Model Calibration and Simulation. [Online]
Available at: http://www.mathworks.com/matlabcentral/fileexchange/29446-heston-model-
calibration-and-simulation/content/HestonCalibration/hestoncalibrationexample.m
Rouah, F. D. & Vainberg, G., 2007. Option Pricing Models & Volatility Using Excel VBA. s.l.:Wiley.
Sitter, R., 2009. Volatility Surface. [Online]
Available at: http://www.mathworks.com/matlabcentral/fileexchange/23316-volatility-surface
Zhang, J. E. & Shu, J., 2003. Pricing S&P 500 Index Options with Hestons Model. Hong Kong, 2003
IEEE International Conference on Computational; Intelligence for Financial Engineering CIFEr.
24

Appendix
Table I: 2008 US Subprime Mortgage Crisis
Date V
0
J J J
01/07/2008 0.077881 7.120439 0.020448 0.672074 -0.202065 -0.174200 0.225967 0.585758
16/07/2008 0.084512 6.941103 0.026897 0.757024 -0.150375 -0.175033 0.231080 0.506767
01/08/2008 0.064522 7.530875 0.012819 0.709939 -0.065269 -0.146095 0.185138 0.792894
16/08/2008 0.068887 7.132403 0.019893 0.711664 -0.139355 -0.156610 0.212680 0.635086
01/09/2008 0.089576 6.696984 0.031021 0.626640 -0.273779 -0.186350 0.295827 0.405111
16/09/2008 0.125151 4.474113 0.046114 1.216326 -0.120257 -0.186458 0.305267 0.385285
01/10/2008 1.035481 30.542564 0.799236 2.999874 -0.583049 -0.368511 0.521949 0.151498
16/10/2008 0.346185 4.851679 0.019181 1.884473 -0.660408 -0.176315 0.206577 1.036884
01/11/2008 0.296841 7.504689 0.027985 0.953251 -0.484823 -0.265669 0.248717 0.790265
16/11/2008 0.273603 5.352539 0.000000 0.246616 -0.899972 -0.397555 0.015736 0.533627
01/12/2008 0.340085 4.029946 0.022527 0.884058 -0.538575 -0.372619 0.165967 0.509428
16/12/2008 0.128756 1.036877 0.002099 0.549610 -0.544710 -0.277224 0.213895 0.582263


Table II: 2000 Dot com Bubble Crisis
Date V
0

J

J
J
01/08/2001 0.1015 52.8381 0.0100 0.4352 0.6917 -0.0721 0.1039 2.3307
16/08/2001 0.0775 31.0964 0.0100 0.3899 0.4278 -0.0771 0.0998 2.3939
01/09/2001 0.3004 66.1583 0.0119 0.6337 0.2968 -0.0854 0.1068 2.2859
16/09/2001 0.0920 8.7910 0.0102 0.8413 -0.1693 -0.1391 0.0573 1.8325
01/10/2001 0.0881 8.0689 0.0100 0.5538 -0.2824 -0.0995 0.1118 1.7117
16/10/2001 0.0954 9.7037 0.0101 0.7015 -0.3545 -0.0891 0.1256 1.7133
01/11/2001 0.0887 8.2906 0.0174 0.4793 -0.1386 -0.1429 0.1862 0.7813
16/11/2001 0.8155 184.5115 3.0000 3.0000 -0.4214 -0.2877 0.2378 0.2506
01/12/2001 0.0776 6.9532 0.0156 0.5417 -0.0966 -0.1809 0.2198 0.5702
16/12/2001 0.6910 188.1630 3.0000 3.0000 -0.1009 -0.3088 0.1926 0.2623
01/01/2002 0.1092 46.3055 0.7346 0.0947 -0.9000 -0.2277 0.1752 0.3763
16/01/2002 0.2514 148.5651 0.9765 2.9999 0.8932 -0.1305 0.1243 1.0476
01/02/2002 0.6324 300.4410 3.0000 3.0000 0.2088 -0.1769 0.1445 0.5555
16/02/2002 0.1732 62.1793 0.3965 2.9996 0.4785 -0.1396 0.1306 0.9134
01/03/2002 0.4107 325.9699 2.9744 3.0000 0.9000 -0.1352 0.1253 0.8026
16/03/2002 0.0769 23.8455 0.0809 1.0303 0.9000 -0.0941 0.1354 1.0336
01/04/2002 0.0782 25.1994 0.0474 0.8883 0.8995 -0.0769 0.1231 1.3495
16/04/2002 0.4344 279.1500 1.5077 3.0000 0.9000 -0.0881 0.0961 1.5601
01/05/2002 0.3564 193.3800 0.8869 3.0000 0.8999 -0.1020 0.1019 1.3838
16/05/2002 0.0526 29.6190 0.0116 0.4930 0.8999 -0.0606 0.0976 2.5000
01/06/2002 0.0659 18.1300 0.0102 0.3943 0.9000 -0.0779 0.0920 2.6288
16/06/2002 0.1411 44.1400 0.0100 0.2838 0.8579 -0.0710 0.1046 2.4369
01/07/2002 0.3123 53.9420 0.0100 0.3592 -0.0716 -0.0905 0.1190 1.8924
16/07/2002 0.1246 11.2630 0.0100 0.5676 -0.2121 -0.1473 0.0371 1.5193


25

Matlab Code
Note that the following Matlab codes were all coded by the author of this dissertation.
I) SVJcall
function callPrice=SVJcall(spot,K,r,tau,V,kappaV,thetaV,sigmaV,rho,NuJ, NsigmaJ, lambda)
%--------------------------------------------------------------------------
%PURPOSE: computes the option price using SVJ model from Bakshi, Cao, Chen 1997.
%--------------------------------------------------------------------------
%USAGE: C=SVJcall(spot,K,r,tau,V,kappaV,thetaV,sigmaV,rho,uJ, sigmaJ, lambda)
%--------------------------------------------------------------------------
%INPUT: spot - scalar or vector, price of underlying at time t
% K - scalar or vector, strike price
% r - scalar or vector, continuously compound risk free rate expressed as a
% positive decimal number.
% sigmaV- scalar or vector, volatility of the volatility of the
% underlying(same time units as for r)
% tau - scalar or vector, time to maturity (same time units as for r)
% V - scalar or vector, instantaneous volatility
% kappaV - scalar or vector, is the rate at which vt reverts to th
% thetaV - scalar or vector, is the long vol, or long run average price
% volatility; as t tends to infinity, the expected value of ?t tends to ?
% lambda - scalar or vector, risk premium for volatility
% rho - scalar or vector, correlation between underlying and
% volatility (rho<0 generates the leverage effect)
% NuJ = mean percentage jump size, 100% is 1
% NsigmaJ = standard deviation of percentage jump size, 100% is 1
% over spot price
% Lambda = poisson intensity for jumps
%--------------------------------------------------------------------------
%OUTPUT: C - scalar or vector, Heston's model call option price
%--------------------------------------------------------------------------

% integral discretisation points, assume 50 is infinity
dphi=0.01;
maxphi=50;
phi=(eps:dphi:maxphi)';

uJ = NuJ;
sigmaJ = NsigmaJ;

discountFactor = exp(-r*tau);

sigmaVsquared = sigmaV*sigmaV;
rho_sigmaV = rho*sigmaV;
iPhi = i*phi;
iPhiRhoSigmaV = iPhi*rho_sigmaV;

etaV = sqrt((kappaV-(1+iPhi)*rho_sigmaV).*(kappaV-(1+iPhi)*rho_sigmaV)-
iPhi.*(iPhi+1)*sigmaVsquared);
etaVstar = sqrt((kappaV-iPhiRhoSigmaV).*(kappaV-iPhiRhoSigmaV)-iPhi.*(iPhi-1)*sigmaVsquared);

expEtaV = exp(-etaV*tau);
expEtaVstar = exp(-etaVstar*tau);

A = -1*iPhi*log(discountFactor);
B = -1*thetaV*(1/(sigmaVsquared))*2*log(1-(etaV-kappaV+(1+iPhi)*rho_sigmaV.*(1-
expEtaV)).*(1./(2*etaV)));
C = -1*thetaV*(1/sigmaVsquared)*(etaV-kappaV+(1+iPhi)*rho_sigmaV)*tau;
D = iPhi*log(spot);
E = lambda*(1+uJ)*tau*(((1+uJ).^(iPhi)).*exp(i.*phi.*0.5.*(1+i.*phi).*sigmaJ.*sigmaJ)-1);
%sum(E)
F = -1*lambda*iPhi*uJ*tau;
G = (iPhi).*(iPhi+1).*(1-expEtaV).*(1./(2*etaV-(etaV-kappaV+(1+iPhi)*rho_sigmaV).*(1-
expEtaV)))*V;

f1 = exp(A+B+C+D+E+F+G);

Bstar = -1*thetaV*(1./(sigmaVsquared))*2*log(1-(etaVstar-kappaV+iPhiRhoSigmaV.*(1-
expEtaVstar))).*(1./(2*etaVstar));
Cstar = -1*thetaV*(1./sigmaVsquared)*(etaVstar-kappaV+iPhiRhoSigmaV)*tau;
E2 = lambda*tau*(((1+uJ).^(iPhi)).*exp(iPhi*0.5.*(iPhi-1)*sigmaJ*sigmaJ)-1);
%sum(E2)
Gstar = (iPhi).*(iPhi-1).*(1-expEtaVstar).*(1./(2*etaVstar-(etaVstar-
kappaV+iPhiRhoSigmaV).*(1-expEtaVstar)))*V;
26


f2 = exp(A+Bstar+Cstar+D+E2+F+Gstar);

P1 = 0.5+(1/pi)*sum(real(exp(-iPhi*log(K)).*f1./(iPhi))*dphi);
P2 = 0.5+(1/pi)*sum(real(exp(-iPhi*log(K)).*f2./(iPhi))*dphi);

callPrice = spot*P1 -K*discountFactor*P2;

II) SVJcalibration_15Day
function x = SVJcalibration_15Day(Year, FullDateStart, FullDateEnd)
tic
if(Year<2006)
marketData = csvread('RawData1.csv', 1, 0);
else
if(Year<2009)
marketData = csvread('RawData2.csv', 1, 0);
else
marketData = csvread('RawData3.csv', 1, 0);
end
end

T = marketData(1:end, 2)/365;
Strike = marketData(1:end, 4)/1000;
Volume = marketData(1:end, 7);
IV = marketData(1:end, 8);
Date = marketData(1:end, 1);
isCall = marketData(1:end, 3);
r = 0.01;

marketData = csvread('RawDataSPX.csv', 1, 0);
dateSPX = marketData(1:end, 1);
s0SPX = marketData(1:end, 7);

toc

x = SVJcalibration_15DayCubic( Date, T, Strike, IV, Volume, isCall, r, dateSPX, s0SPX,
FullDateStart, FullDateEnd )

end

%*************************************************************************%
function [x] = SVJcalibration_15DayCubic( Date1, mats1, strike1, impvol1, Volume1, isCall1,
r, dateSPX1, s0SPX1, FullDateStart, FullDateEnd )

global impvol; global moneyness; global T; global F0; global r;

%88888888888888888888888888888888888888888888
% load and prepare the data
%88888888888888888888888888888888888888888888

matsAll = [];
moneynessAll = [];
impvolAll = [];
DateAll = [];
VolumeAll = [];
isCallAll = [];

for j=FullDateStart: FullDateEnd
Date = Date1;
mats = mats1;
strike =strike1;
impvol = impvol1;
Volume = Volume1;
isCall = isCall1;
dateSPX = dateSPX1;
s0SPX = s0SPX1;

% narraw down to the date we want
index = (Date~=j);
mats(index) = [];
strike(index) = [];
Volume(index) = [];
27

impvol(index) = [];
isCall(index) = [];
Date(index) = [];

% delete zero impliedVol
index = (impvol==0);
mats(index) = [];
strike(index) = [];
Volume(index) = [];
impvol(index) = [];
isCall(index) = [];
Date(index) = [];

% delete puts
index = (isCall==0);
mats(index) = [];
strike(index) = [];
Volume(index) = [];
impvol(index) = [];
isCall(index) = [];
Date(index) = [];

% delete T>2
index = (mats>1.6);
mats(index) = [];
strike(index) = [];
Volume(index) = [];
impvol(index) = [];
isCall(index) = [];
Date(index) = [];

% delete T<0.1
index = (mats<0.1);
mats(index) = [];
strike(index) = [];
Volume(index) = [];
impvol(index) = [];
isCall(index) = [];
Date(index) = [];

% find the s0
index = (dateSPX~=j);
s0 = s0SPX;
s0(index) = [];

% delete moneyness>1.2
index = (strike>1.6*s0);
mats(index) = [];
strike(index) = [];
Volume(index) = [];
impvol(index) = [];
isCall(index) = [];
Date(index) = [];

matsAll = [matsAll; mats];
moneynessAll = [moneynessAll; strike/s0];
impvolAll = [impvolAll; impvol];
DateAll = [DateAll;Date];
VolumeAll = [VolumeAll;Volume];
isCallAll = [isCallAll;isCall];

end

T = matsAll;
impvol = impvolAll;
moneyness = moneynessAll;

%88888888888888888888888888888888888888888888
% cubic interpolation
%88888888888888888888888888888888888888888888

resolution = 12;

% allocate variables to to interpolate the marketdata.xls data into a
28

% uniformly spaced grid
BSmats = linspace(min(T), max(T), resolution);
BSmoneyness = linspace(min(moneyness), max(moneyness), resolution);
BSIV = nan(resolution, resolution);
Mcubic = nan(resolution*resolution);
IVcubic = nan(resolution*resolution);
Tcubic = nan(resolution*resolution);

% interpolate the data from marketdata.xls unto the uniformly spaced grid
for i = 1:resolution
for j = 1:resolution

BSIV(i,j) = griddata(T,moneyness,impvol,BSmats(j),BSmoneyness(i), 'cubic');
Mcubic(30*(i-1)+j)=BSmoneyness(i);
IVcubic(30*(i-1)+j)= BSIV(i,j);
Tcubic(30*(i-1)+j)= BSmats(j);
end
disp(sprintf('Cubic interpolation on marketDataIV %d of %d', i, resolution ))
end

T = Tcubic;
impvol = IVcubic;
moneyness = Mcubic;

h = figure;
[BSmats BSmoneyness] = meshgrid(BSmats, BSmoneyness);
surf(BSmoneyness, BSmats,BSIV)
view(10,60)
title(sprintf('IV on %d to %d',FullDateStart,FullDateEnd
),'Fontsize',16,'FontWeight','Bold','interpreter','latex');
ylabel('Time $T$','Fontsize',14,'FontWeight','Bold','interpreter','latex');
xlabel('Moneyness $M=\frac{K}{S}$','Fontsize',14,'FontWeight','Bold','interpreter','latex');
zlabel('Implied Volatility
$\sigma(T,M)$','Fontsize',14,'FontWeight','Bold','interpreter','latex');

index = isnan(impvol);
T(index) = [];
impvol(index) = [];
moneyness(index) = [];

% remove negative data
index = (impvol<=0);
T(index) = [];
impvol(index) = [];
moneyness(index) = [];

%88888888888888888888888888888888888888888888
% calibration section
%88888888888888888888888888888888888888888888

% initial guess
x0=[0.08, 5, 0.02, 0.5, -0.2,-0.2,0.2, 0.5];
% limits
lb = [0.05, 3, 0.01, 0, -0.9, -1, 0, 0];
ub = [3, 500, 3, 3, 0.9, 1, 1, 5];

%optimization
tic
x = lsqnonlin(@SVJandBScostCubic,x0,lb,ub);
x
toc

%88888888888888888888888888888888888888888888
% plot SVJ section
%88888888888888888888888888888888888888888888
resolution = 20;
strike = moneyness;
mats = T;
BSmats = linspace(min(mats), max(mats), resolution);
BSstrike = linspace(min(strike), max(strike), resolution);
BSIV = nan(resolution, resolution);

V = x(1);
kappaV = x(2);
29

thetaV = x(3);
sigmaV = x(4);
rho = x(5);
NuJ = x(6);
NsigmaJ = x(7);
lambda =x(8);

%calculate IV
for i = 1:resolution
for j = 1:resolution

price(i,j) = SVJcall(1,BSstrike(i), r, BSmats(j),V,kappaV,thetaV,sigmaV,rho,NuJ,
NsigmaJ, lambda);
price(price<0) = 0 ;
BSIV(i,j) = blsimpv(1, BSstrike(i), r ,BSmats(j), price(i,j));

end
disp(sprintf('Cubic interpolation on marketDataIV %d of %d', i, resolution ))
end

[BSstrike BSmats ] = meshgrid(BSstrike, BSmats);
hold on
surf(BSstrike,BSmats,BSIV),xlabel('Maturity(years)'),ylabel('Strike'),zlabel('Implied
Volatility');
view(10,60)
axis tight;
grid on;
title(sprintf('IV on %d to %d',FullDateStart,FullDateEnd
),'Fontsize',16,'FontWeight','Bold','interpreter','latex');
ylabel('Time $T$','Fontsize',14,'FontWeight','Bold','interpreter','latex');
xlabel('Moneyness $M=\frac{K}{S}$','Fontsize',14,'FontWeight','Bold','interpreter','latex');
zlabel('Implied Volatility
$\sigma(T,M)$','Fontsize',14,'FontWeight','Bold','interpreter','latex');
set(gca,'Fontsize',12,'FontWeight','Bold','LineWidth',2);
set(0, 'defaultfigureunits', 'centimeters')
set(0, 'defaultfigureposition', [0 0 45 20])
set(0, 'defaultaxesposition', [0.15 0.14 0.76 0.75])
colorbar
set(gcf, 'paperpositionmode', 'auto')
saveas(h,sprintf('IV_%d_SVJ 15day calib',FullDateStart),'fig')
saveas(h,sprintf('IV_%d_SVJ 15day calib',FullDateStart),'jpg')
end
%88888888888888888888888888888888888888888888888888888888888888888888888888888888
function [cost]=SVJandBScostCubic(x)
global impvol; global moneyness; global T; global F0; global r;
disp(sprintf('Currently: using SVJandBScost' ))
for i=1:length(T)
BSprice = blsprice(1,moneyness(i),r,T(i),impvol(i));
VSJprice = SVJcall(1,moneyness(i),r,T(i),x(1),x(2),x(3),x(4),x(5),x(6),x(7),x(8));
cost(i)=abs(BSprice-VSJprice);
end
end
%88888888888888888888888888888888888888888888888888888888888888888888888888888888

You might also like