Financial Risk Forecasting Chapter 7 Simulation methods for VaR for options and bonds

Similar documents
Financial Risk Forecasting Chapter 6 Analytical value-at-risk for options and bonds

ELEMENTS OF MONTE CARLO SIMULATION

IEOR E4703: Monte-Carlo Simulation

2.1 Mathematical Basis: Risk-Neutral Pricing

Introduction Dickey-Fuller Test Option Pricing Bootstrapping. Simulation Methods. Chapter 13 of Chris Brook s Book.

King s College London

Monte Carlo and Empirical Methods for Stochastic Inference (MASM11/FMSN50)

Computational Finance

Chapter 2 Uncertainty Analysis and Sampling Techniques

King s College London

Monte Carlo Methods in Structuring and Derivatives Pricing

Math Option pricing using Quasi Monte Carlo simulation

Math Computational Finance Option pricing using Brownian bridge and Stratified samlping

Monte Carlo Simulations

10. Monte Carlo Methods

Math Computational Finance Double barrier option pricing using Quasi Monte Carlo and Brownian Bridge methods

Week 7 Quantitative Analysis of Financial Markets Simulation Methods

Computational Finance Improving Monte Carlo

Market Risk: FROM VALUE AT RISK TO STRESS TESTING. Agenda. Agenda (Cont.) Traditional Measures of Market Risk

Financial Risk Forecasting Chapter 5 Implementing Risk Forecasts

History of Monte Carlo Method

The Use of Importance Sampling to Speed Up Stochastic Volatility Simulations

Computer Exercise 2 Simulation

Gamma. The finite-difference formula for gamma is

Monte Carlo Methods in Financial Engineering

Rapid computation of prices and deltas of nth to default swaps in the Li Model

1.1 Basic Financial Derivatives: Forward Contracts and Options

- 1 - **** d(lns) = (µ (1/2)σ 2 )dt + σdw t

The Black-Scholes Model

Binomial model: numerical algorithm

Monte Carlo Methods for Uncertainty Quantification

Advanced Topics in Derivative Pricing Models. Topic 4 - Variance products and volatility derivatives

Hedging Credit Derivatives in Intensity Based Models

The Black-Scholes Model

EFFICIENT MONTE CARLO ALGORITHM FOR PRICING BARRIER OPTIONS

Asian Option Pricing: Monte Carlo Control Variate. A discrete arithmetic Asian call option has the payoff. S T i N N + 1

Financial Risk Management

Module 10:Application of stochastic processes in areas like finance Lecture 36:Black-Scholes Model. Stochastic Differential Equation.

Lecture Note 8 of Bus 41202, Spring 2017: Stochastic Diffusion Equation & Option Pricing

Math 416/516: Stochastic Simulation

Optimized Least-squares Monte Carlo (OLSM) for Measuring Counterparty Credit Exposure of American-style Options

Monte Carlo Methods. Matt Davison May University of Verona Italy

Option Pricing. Chapter Discrete Time

NEWCASTLE UNIVERSITY SCHOOL OF MATHEMATICS, STATISTICS & PHYSICS SEMESTER 1 SPECIMEN 2 MAS3904. Stochastic Financial Modelling. Time allowed: 2 hours

Assicurazioni Generali: An Option Pricing Case with NAGARCH

Numerical schemes for SDEs

Write legibly. Unreadable answers are worthless.

BROWNIAN MOTION Antonella Basso, Martina Nardon

Computational Finance. Computational Finance p. 1

Calculating VaR. There are several approaches for calculating the Value at Risk figure. The most popular are the

Statistical Methods in Financial Risk Management

Hedging Under Jump Diffusions with Transaction Costs. Peter Forsyth, Shannon Kennedy, Ken Vetzal University of Waterloo

2 f. f t S 2. Delta measures the sensitivityof the portfolio value to changes in the price of the underlying

Quasi-Monte Carlo for Finance

MSc in Financial Engineering

Value at Risk Ch.12. PAK Study Manual

Optimal Search for Parameters in Monte Carlo Simulation for Derivative Pricing

Proxy Function Fitting: Some Implementation Topics

Walter S.A. Schwaiger. Finance. A{6020 Innsbruck, Universitatsstrae 15. phone: fax:

IEOR E4602: Quantitative Risk Management

Mathematics of Finance Final Preparation December 19. To be thoroughly prepared for the final exam, you should

Module 4: Monte Carlo path simulation

SYSM 6304: Risk and Decision Analysis Lecture 6: Pricing and Hedging Financial Derivatives

The Pennsylvania State University. The Graduate School. Department of Industrial Engineering AMERICAN-ASIAN OPTION PRICING BASED ON MONTE CARLO

Slides for Risk Management

FINANCIAL OPTION ANALYSIS HANDOUTS

The University of Chicago, Booth School of Business Business 41202, Spring Quarter 2011, Mr. Ruey S. Tsay. Solutions to Final Exam.

Probability and distributions

Department of Mathematics. Mathematics of Financial Derivatives

[D7] PROBABILITY DISTRIBUTION OF OUTSTANDING LIABILITY FROM INDIVIDUAL PAYMENTS DATA Contributed by T S Wright

MONTE CARLO EXTENSIONS

Business Statistics 41000: Probability 3

Valuation of Asian Option. Qi An Jingjing Guo

Project Trainee : Abhinav Yellanki 5 th year Integrated M.Sc. Student Mathematics and Computing Indian Institute of Technology, Kharagpur

Practical Hedging: From Theory to Practice. OSU Financial Mathematics Seminar May 5, 2008

Gamma Distribution Fitting

MÄLARDALENS HÖGSKOLA

Jaime Frade Dr. Niu Interest rate modeling

The Black-Scholes Model

Monte Carlo Methods. Prof. Mike Giles. Oxford University Mathematical Institute. Lecture 1 p. 1.

Volatility of Asset Returns

IEOR E4703: Monte-Carlo Simulation

Stochastic Differential Equations in Finance and Monte Carlo Simulations

Importance Sampling for Option Pricing. Steven R. Dunbar. Put Options. Monte Carlo Method. Importance. Sampling. Examples.

Lecture outline. Monte Carlo Methods for Uncertainty Quantification. Importance Sampling. Importance Sampling

6. Numerical methods for option pricing

How Much Should You Pay For a Financial Derivative?

Market Volatility and Risk Proxies

Evaluating the Black-Scholes option pricing model using hedging simulations

Risk Neutral Valuation

IEOR 3106: Introduction to OR: Stochastic Models. Fall 2013, Professor Whitt. Class Lecture Notes: Tuesday, September 10.

Energy Price Processes

1 The continuous time limit

Definition Pricing Risk management Second generation barrier options. Barrier Options. Arfima Financial Solutions

IEOR E4703: Monte-Carlo Simulation

ROM SIMULATION Exact Moment Simulation using Random Orthogonal Matrices

Lecture 17. The model is parametrized by the time period, δt, and three fixed constant parameters, v, σ and the riskless rate r.

Credit Modeling and Credit Derivatives

1.1 Interest rates Time value of money

From Discrete Time to Continuous Time Modeling

Transcription:

Financial Risk Forecasting Chapter 7 Simulation methods for VaR for options and bonds Jon Danielsson 2017 London School of Economics To accompany Financial Risk Forecasting www.financialriskforecasting.com Published by Wiley 2011 Version 3.1, November 2017 Financial Risk Forecasting 2011,2017 Jon Danielsson, page 1 of 122

Financial Risk Forecasting 2011,2017 Jon Danielsson, page 2 of 122

The focus of this chapter Chapter 6 demonstrates limitations of analytical VaR methods for options and bonds The focus in this chapter is on simulation methods, sometimes called Monte Carlo (MC) simulation 1. Pseudo random number generators (RNG) 2. Simulation pricing of options and bonds 3. Simulation VaR for one asset and portfolios 4. Issues in Monte Carlo estimation Financial Risk Forecasting 2011,2017 Jon Danielsson, page 3 of 122

Idea Replicate a part of the world in computer software For example market outcomes, based on some model of market evolution Sufficient number of simulations (replications) ideall yield a large and representative sample of market outcomes Use that to calculate quantities of interest (e.g. VaR) Financial Risk Forecasting 2011,2017 Jon Danielsson, page 4 of 122

Calendar time and trading time We use two different measures of time Calendar time (365/6 days) used for interest rate calculations Trading time ( 250 days) used for risk calculations This is because we earn interest every day But calculate volatilities only from days (trading days) when stock exchanges open (Mondays to Fridays, excluding holidays) R will allow precise date calculations and has a database of dates when various exchanges are open Financial Risk Forecasting 2011,2017 Jon Danielsson, page 5 of 122

Notation F Futures price g Derivative price S Number of simulations Portfolio holdings (basic assets) Portfolio holdings (derivatives) x b x o Financial Risk Forecasting 2011,2017 Jon Danielsson, page 6 of 122

Random numbers and Monte Carlo simulations Financial Risk Forecasting 2011,2017 Jon Danielsson, page 7 of 122

Obtaining random numbers The fundamental input in MC analysis is a long sequence of random numbers (RNs) Creating a large sample of high-quality RNs is difficult It is impossible to obtain pure random numbers there is no natural phenomena that is purely random computers are deterministic by definition Computer algorithm known as pseudo random number generator (RNG), which creates outcomes that appear to be random even if they are deterministic Financial Risk Forecasting 2011,2017 Jon Danielsson, page 8 of 122

Pseudo random number generators A particular of RN is generated by a function of a previous RN u i+1 = h(u i ) where u i is the i th RN and h( ) is the RNG If RNs are truly random, it is essential that their unconditional distribution is IID uniform Financial Risk Forecasting 2011,2017 Jon Danielsson, page 9 of 122

Period of a random number generator Definition Random number generators can only provide a fixed number of different random numbers, after which they repeat themselves. This fixed number is called a period Symptoms of low-quality RNGs include: Low period (RNG repeats itself quickly) Serial dependence Deviations from uniform distribution Financial Risk Forecasting 2011,2017 Jon Danielsson, page 10 of 122

Linear congruential generators No numerical algorithm generates truly random numbers The best known RNGs are so-called linear congruential generators (LCGs), which link i th and i +1 th integer in the sequence of RNs by u i+1 = (a u i +c) mod m where a is multiplier; c is increment; m is integer modulus and mod is the modulus function (remainder after division) The first RN in a sequence is called seed and is usually chosen by the user Financial Risk Forecasting 2011,2017 Jon Danielsson, page 11 of 122

Illustration RNGs, seed, size and period Think of the RNG as an ellipse where each point represents a RN and the number of RNs is finite Financial Risk Forecasting 2011,2017 Jon Danielsson, page 12 of 122

Illustration RNGs, seed, size and period The seed determines the starting point of the sequence of RNs and is set by the user Financial Risk Forecasting 2011,2017 Jon Danielsson, page 13 of 122

Illustration RNGs, seed, size and period The seed determines the starting point of the sequence of RNs and is set by the user Financial Risk Forecasting 2011,2017 Jon Danielsson, page 14 of 122

Illustration RNGs, seed, size and period The seed determines the starting point of the sequence of RNs and is set by the user Financial Risk Forecasting 2011,2017 Jon Danielsson, page 15 of 122

Illustration RNGs, seed, size and period The seed determines the starting point of the sequence of RNs and is set by the user Financial Risk Forecasting 2011,2017 Jon Danielsson, page 16 of 122

Illustration RNGs, seed, size and period The seed determines the starting point of the sequence of RNs and is set by the user Financial Risk Forecasting 2011,2017 Jon Danielsson, page 17 of 122

Illustration RNGs, seed, size and period Think of the sequence generated as a specific arc of the ellipse which depends on the chosen seed Financial Risk Forecasting 2011,2017 Jon Danielsson, page 18 of 122

Illustration RNGs, seed, size and period The size of the simulation determines the length of the sequence Financial Risk Forecasting 2011,2017 Jon Danielsson, page 19 of 122

Illustration RNGs, seed, size and period The size of the simulation determines the length of the sequence Financial Risk Forecasting 2011,2017 Jon Danielsson, page 20 of 122

Illustration RNGs, seed, size and period The period of the simulation is the number of RNs that the RNG is able to generate without repeating itself Financial Risk Forecasting 2011,2017 Jon Danielsson, page 21 of 122

Linear congruential generators Main flaw of LCGs is serial correlation, which cannot be easily eliminated More complicated RNGs which introduce nonlinearities are generally preferred The default RNG in R and Matlab is the Mersenne twister, which has a period of 2 19,937 1 (a Mersenne prime number) Financial Risk Forecasting 2011,2017 Jon Danielsson, page 22 of 122

Nonuniform RNGs Most RNGs generate uniform random numbers, usually scaled so that (u) [0,1] However, most practical applications require RNs from a different distribution To obtain such RNs we use transformation methods which convert uniform numbers into RNs from the distribution of interest The inverse distribution is obvious candidate, but often slow and inaccurate Financial Risk Forecasting 2011,2017 Jon Danielsson, page 23 of 122

Normal inverse distribution Uniform random number 0.0 0.2 0.4 0.6 0.8 1.0 3 2 1 0 1 2 3 Non uniform random number Financial Risk Forecasting 2011,2017 Jon Danielsson, page 24 of 122

The Box-Muller method The most common method for generating normal RNs is the Box-Muller method, which is more computationally efficient than using the inverse distribution If we generate two uniforms (u 1,u 2 ), we can transform the pair into a pair of IID normals (n 1,n 2 ) by: n 1 = 2logu 1 sin(2πu 2 ) n 2 = 2logu 1 cos(2πu 2 ) The Box-Muller method is fine for casual computations May not be the best method as in some circumstance the two normals are not fully independent Range of transformation methods in R and Matlab Financial Risk Forecasting 2011,2017 Jon Danielsson, page 25 of 122

Random numbers in R runif (1) 0.704862 runif (1) 0.2267493 runif (1) 0.9921351 set. seed (999); runif (1) 0.3890714 set. seed (999); runif (1) 0.3890714 x=rnorm( n=5) 0.2817402 1.3125596 0. 7951840 0. 2700705 0.2773064 x=rt (n=5,df=3) 0.34910572 0.34198996 0. 39319432 0. 07968276 0. 46555150 plot (rnorm(n=1000),type= l ) plot ( rt (n=1000,df=2),type= l ) Financial Risk Forecasting 2011,2017 Jon Danielsson, page 26 of 122

Random numbers in Matlab rand (1,1) 0.0639 rand (1,1) 0.8074 rand (1,1) 0.6784 rng (999); rand(1,1) 0.8034 rng (999); rand(1,1) 0.8034 x=randn (1,5) 0. 2011 0.7825 0. 2060 0.7940 0.2121 x=trnd (3,1,5) 0.3981 0. 1021 0. 4853 0. 5690 1. 5536 plot (randn (1,1000)) plot (trnd (2,1,1000)) Financial Risk Forecasting 2011,2017 Jon Danielsson, page 27 of 122

Simulation pricing of bonds Financial Risk Forecasting 2011,2017 Jon Danielsson, page 28 of 122

Bond pricing Price and risk of fixed income assets (e.g. bonds) is based on market interest rates Using a model of the distribution of interest rates, we can simulate random yield curves and obtain the distribution of bond prices We map distribution of interest rates to the distribution of bond prices Financial Risk Forecasting 2011,2017 Jon Danielsson, page 29 of 122

Analytical bond pricing Denote r t the annual interest rate at time t The present value of a bond is the present discounted value of its cash flows: P = T t=1 τ t (1+r t ) t Where P is bond price and τ t is cash flow at time t Financial Risk Forecasting 2011,2017 Jon Danielsson, page 30 of 122

Analytical bond pricing Suppose we have a bond with 10 years to expiration, 7% annual interest, $10 par value, and current market rates: {r t } 10 t=1 =(5.00,5.69,6.09,6.38,6.61, 6.79,7.07,7.19,7.30) 0.01 The bond has a current value of $9.91 Financial Risk Forecasting 2011,2017 Jon Danielsson, page 31 of 122

Simulated bond pricing Assume here that the yield curve can only shift up and down, not change shape Shocks to yields, ǫ i ǫ i N ( 0,σ 2) For the sake of demonstration we set the number of simulations as S = 8, but note that accurate estimates require much more simulations Financial Risk Forecasting 2011,2017 Jon Danielsson, page 32 of 122

Eight yield curve simulations 9 % 8 % Yield 7 % 6 % 5 % 4 % True Simulated 2 4 6 8 10 Time Financial Risk Forecasting 2011,2017 Jon Danielsson, page 33 of 122

Eight yield curve simulations 9 % 8 % Yield 7 % 6 % 5 % 4 % True Simulated 2 4 6 8 10 Time Financial Risk Forecasting 2011,2017 Jon Danielsson, page 34 of 122

Eight yield curve simulations 9 % 8 % Yield 7 % 6 % 5 % 4 % True Simulated 2 4 6 8 10 Time Financial Risk Forecasting 2011,2017 Jon Danielsson, page 35 of 122

Eight yield curve simulations 9 % 8 % Yield 7 % 6 % 5 % 4 % True Simulated 2 4 6 8 10 Time Financial Risk Forecasting 2011,2017 Jon Danielsson, page 36 of 122

Eight yield curve simulations 9 % 8 % Yield 7 % 6 % 5 % 4 % True Simulated 2 4 6 8 10 Time Financial Risk Forecasting 2011,2017 Jon Danielsson, page 37 of 122

Simulated bond pricing The equation for the i th simulated price, P i, now becomes P i = T t=1 τ t (1+r t +ǫ i ) t where r t +ǫ i is the i th simulated interest rate at time t Compare the eight bond prices obtained with S = 8 yield curve simulations with the distribution of bond prices when S = 50,000 Financial Risk Forecasting 2011,2017 Jon Danielsson, page 38 of 122

$ 10 Eight bond price simulations True price Simulated price $ 8 $ 6 $ 4 $ 2 $ 0 1 2 3 4 5 6 7 8 Simulation Financial Risk Forecasting 2011,2017 Jon Danielsson, page 39 of 122

0.4 Density of simulated bond prices Normal distribution superimposed, S = 50, 000 0.3 VaR 99% VaR 95% Density 0.2 0.1 0.0 7 8 9 10 11 12 13 Bond prices Financial Risk Forecasting 2011,2017 Jon Danielsson, page 40 of 122

Allowing yield curve to change shape Key assumptions: Yield curve only shifts up and down Distribution of interest rate changes is normal The assumptions may be unrealistic in practice but it is relatively straightforward to relax them in practice it rotates and twists can use principal components (PCA) Financial Risk Forecasting 2011,2017 Jon Danielsson, page 41 of 122

Simulation pricing of options Financial Risk Forecasting 2011,2017 Jon Danielsson, page 42 of 122

Simulation approach The price of an asset be the expectation of its final payoff under risk neutrality Depends on the price movements of its underlying asset If sufficient number of price paths are simulated Obtain an estimate of the true price Financial Risk Forecasting 2011,2017 Jon Danielsson, page 43 of 122

Option pricing Get price of European options on non-dividend-paying stock where all Black-Scholes (BS) assumptions hold Two primitive assets in BS pricing model: risk-free asset with instantaneous rate r Underlying stock, follows normally distributed random walk with drift r (geometric Brownian motion in continuous time) The no-arbitrage futures price of stock for delivery at time T is given by: F = Pe rt Financial Risk Forecasting 2011,2017 Jon Danielsson, page 44 of 122

Analytical option pricing Suppose we have a European call option with 1. current stock price $50 2. 20% annual volatility 3. 5% annual risk-free rate 4. 6 months to expiration 5. $40 strike price The price is $11.0873 Financial Risk Forecasting 2011,2017 Jon Danielsson, page 45 of 122

Simulated option pricing We simulate returns until expiration and use these values to calculate simulated futures prices With sufficient sample of futures prices we can compute the set of payoffs of the option The MC price is then given by the mean of these payoffs Financial Risk Forecasting 2011,2017 Jon Danielsson, page 46 of 122

Simulated option pricing The only complexity is due to expectation of a log-normal RN, i.e. if O N ( µ,σ 2) then: E[exp(O)] = exp (µ+ 12 ) σ2 We apply a log-normal correction (subtract 1 2 σ2 from simulated stock return) to ensure that expectation of simulated returns is the same as theoretical value See density of S = 10 6 futures prices and option payoffs using same values as in the example before Financial Risk Forecasting 2011,2017 Jon Danielsson, page 47 of 122

Density of simulated futures prices S = 10 6, normal distribution superimposed 0.06 Strike price 0.05 0.04 Density 0.03 0.02 0.01 0.00 30 40 50 60 70 80 Futures prices Financial Risk Forecasting 2011,2017 Jon Danielsson, page 48 of 122

Density of simulated option prices 0.12 0.10 0.08 Based on simulated futures prices with S = 10 6 Black Scholes price Density 0.06 0.04 0.02 0.00 0 5 10 15 20 25 30 35 Option prices Financial Risk Forecasting 2011,2017 Jon Danielsson, page 49 of 122

Simulated option pricing Numerical example Mean of simulated option prices is the MC price In this case R gives $11.08709, close enough to the Black-Scholes price of $11.0873 Note the asymmetry in the density of simulated futures prices (result of log-normal distribution of prices) The VaR can be read off the previous graph, e.g. 1% smallest value of distribution gives 99% VaR Financial Risk Forecasting 2011,2017 Jon Danielsson, page 50 of 122

Black-Scholes in R source ( bs. r ) S0 = 50 sigma = 0.2 r = 0.05 Maturity = 0.5 X = 40 f = bs(x,s0, r, sigma, Maturity ) f = bs(x,s0=s0, r=r, sigma=sigma, Maturity=Maturity ) Call Put 11. 08728 0. 09967718 Financial Risk Forecasting 2011,2017 Jon Danielsson, page 51 of 122

R option simulation S = 1e6 set. seed (12) F = S0 exp(r Maturity ) ysim = rnorm(s, 0.5 sigma sigma Maturity, sigma sqrt (Maturity )) Fsim = F exp(ysim) Psim = Fsim X OPsim[Psim<0] = 0 OPsim = OPsim exp( r Maturity ) hist (Fsim, probability=true, ylim=c (0,0.06)) x = seq(min(fsim),max(fsim), length =100) lines (x, dnorm(x, mean = mean(fsim), sd = sd(fsim ))) hist (OPsim, nclass =100, probability=true) Financial Risk Forecasting 2011,2017 Jon Danielsson, page 52 of 122

Black-Scholes in Matlab S0 = 50; sigma = 0.2; r = 0.05; Maturity = 0.5; X = 40; f = bs(x,s0, r, sigma, Maturity ); f = Call : 11.0873 Put : 0.0997 Financial Risk Forecasting 2011,2017 Jon Danielsson, page 53 of 122

Matlab option simulation randn ( state,0); S = 1e6 ; Fsim = S0 exp(r Maturity ); ysim = randn (S,1) sigma sqrt (Maturity ) 0.5 Maturity sigma ˆ2; Fsim=Fsim exp(ysim ); Psim = Fsim X; OPsim( find (OPsim < 0)) = 0; OPsim =OPsim exp( r Maturity ) ; histfit (Psim) hist (OPsim,100) Financial Risk Forecasting 2011,2017 Jon Danielsson, page 54 of 122

Simulation of VaR Financial Risk Forecasting 2011,2017 Jon Danielsson, page 55 of 122

Simulation of VaR for one asset Simulate one-day return of an asset Apply analytical pricing formulas to simulated future price Obtain simulated profits/losses (P/L) as difference between tomorrow s simulated future values and today s known value Calculate MC VaR from simulated P/L Financial Risk Forecasting 2011,2017 Jon Danielsson, page 56 of 122

Setup Consider asset with price P t and IID normal returns, with one-day volatility σ and risk-free rate r (in continuous time) Number of units of basic asset held in a portfolio is denoted by x b, while x o indicates number of options held Note that it is the t +1 price that will be simulated Financial Risk Forecasting 2011,2017 Jon Danielsson, page 57 of 122

We will go through a series of ever more complicated examples 1. Simulation of VaR for one asset (no option) 2. Simulation of VaR for one option 3. Simulation of VaR for a portfolio of one option and one stock Financial Risk Forecasting 2011,2017 Jon Danielsson, page 58 of 122

1. VaR with one basic asset Six-step procedure for obtaining MC VaR 1 Compute initial portfolio value: ϑ t = x b P t Financial Risk Forecasting 2011,2017 Jon Danielsson, page 59 of 122

1. VaR with one basic asset Six-step procedure for obtaining MC VaR 1 Compute initial portfolio value: 2 Simulate S one-day returns ϑ t = x b P t y t+1,i N ( 0,σ 2), i = 1,...,S Financial Risk Forecasting 2011,2017 Jon Danielsson, page 60 of 122

1. VaR with one basic asset Six-step procedure for obtaining MC VaR 3 Calculate one-day future price: P t+1,i = P t e } r(1/365) {{} future price e y t+1,i }{{} exp. of sim. return e 0.5σ2 }{{} log-normal correction 1. multiplying the future price with the exponential of the simulated return 2. and the log-normal correction Financial Risk Forecasting 2011,2017 Jon Danielsson, page 61 of 122

1. VaR with one basic asset Six-step procedure for obtaining MC VaR 4 Calculate the simulated futures value of the portfolio: ϑ t+1,i = x b P t+1,i Financial Risk Forecasting 2011,2017 Jon Danielsson, page 62 of 122

1. VaR with one basic asset Six-step procedure for obtaining MC VaR 4 Calculate the simulated futures value of the portfolio: ϑ t+1,i = x b P t+1,i 5 The i th simulated P/L is then: q t+1,i = ϑ t+1,i ϑ t Financial Risk Forecasting 2011,2017 Jon Danielsson, page 63 of 122

1. VaR with one basic asset Six-step procedure for obtaining MC VaR 4 Calculate the simulated futures value of the portfolio: ϑ t+1,i = x b P t+1,i 5 The i th simulated P/L is then: q t+1,i = ϑ t+1,i ϑ t 6 VaR can be obtained directly from the vector of simulated P/L, {q t+1,i } S i=1, e.g. VaR(0.01) is the 1% smallest value Financial Risk Forecasting 2011,2017 Jon Danielsson, page 64 of 122

1. MC VaR with one basic asset Numerical example One stock with price P t = 100 and daily volatility σ = 0.01 Annual risk-free rate is r = 5% Use S = 10 7 simulations to calculate VaR(0.01) R and Matlab give $2.285 and $2.291, respectively More simulations should give more equal answers Financial Risk Forecasting 2011,2017 Jon Danielsson, page 65 of 122

2. VaR with an option Modified six-step procedure For options we need to modify the procedure Let g( ) denote the Black-Scholes equation and suppose we have x o options We replace steps 1 and 4 and come up with the following procedure Financial Risk Forecasting 2011,2017 Jon Danielsson, page 66 of 122

2. VaR with an option Modified six-step procedure 1 Initial portfolio is ϑ t = x o g ( P t,x,t, ) 250σ,r Financial Risk Forecasting 2011,2017 Jon Danielsson, page 67 of 122

2. VaR with an option Modified six-step procedure 1 Initial portfolio is ϑ t = x o g 2 Simulate S one-day returns ( P t,x,t, ) 250σ,r y t+1,i N ( 0,σ 2), i = 1,...,S Financial Risk Forecasting 2011,2017 Jon Danielsson, page 68 of 122

2. VaR with an option Modified six-step procedure 3 Calculate one-day future price: P t+1,i = P t e } r(1/365) {{} future price e y t+1,i }{{} exp. of sim. return e 0.5σ2 }{{} log-normal correction Financial Risk Forecasting 2011,2017 Jon Danielsson, page 69 of 122

2. VaR with an option Modified six-step procedure 3 Calculate one-day future price: P t+1,i = P t e } r(1/365) {{} future price e y t+1,i }{{} exp. of sim. return e 0.5σ2 }{{} log-normal correction 4 The i th simulated future value of the portfolio is ( ϑ t+1,i = x o g P t+1,i,x,t 1 ) 365, 250σ,r Financial Risk Forecasting 2011,2017 Jon Danielsson, page 70 of 122

2. VaR with an option Modified six-step procedure 5 The i th simulated P/L is then: q t+1,i = ϑ t+1,i ϑ t Financial Risk Forecasting 2011,2017 Jon Danielsson, page 71 of 122

2. VaR with an option Modified six-step procedure 5 The i th simulated P/L is then: q t+1,i = ϑ t+1,i ϑ t 6 VaR can be obtained directly from vector of simulated P/L, {q t+1,i } S i=1, e.g. VaR(0.01) is 1% smallest value Financial Risk Forecasting 2011,2017 Jon Danielsson, page 72 of 122

2. MC VaR of option One call option with strike price X = 100 and 3 months to expiry R and Matlab both give VaR(0.01) of $1.21 Financial Risk Forecasting 2011,2017 Jon Danielsson, page 73 of 122

0.8 0.6 2. Density of simulated P/L Normal distribution superimposed VaR 95% Density 0.4 0.2 0.0 2 1 0 1 2 Profit/Loss Financial Risk Forecasting 2011,2017 Jon Danielsson, page 74 of 122

3. VaR with an options and a stock Modified six-step procedure Now consider the case of a portfolio with both a stock and option(s) on the same stock Suppose we only have one type of option As in the case where we only had one option on a basic asset, we replace steps 1 and 4 Financial Risk Forecasting 2011,2017 Jon Danielsson, page 75 of 122

3. VaR with an options and a stock Modified six-step procedure 1 Initial portfolio is ϑ t = x b P t +x o g ( P t,x,t, ) 250σ,r Financial Risk Forecasting 2011,2017 Jon Danielsson, page 76 of 122

3. VaR with an options and a stock Modified six-step procedure 1 Initial portfolio is ϑ t = x b P t +x o g 2 Simulate S one-day returns ( P t,x,t, ) 250σ,r y t+1,i N ( 0,σ 2), i = 1,...,S Financial Risk Forecasting 2011,2017 Jon Danielsson, page 77 of 122

3. VaR with an options and a stock Modified six-step procedure 3 Calculate one-day future price: P t+1,i = P t e } r(1/365) {{} future price e y t+1,i }{{} exp. of sim. return e 0.5σ2 }{{} log-normal correction Financial Risk Forecasting 2011,2017 Jon Danielsson, page 78 of 122

3. VaR with an options and a stock Modified six-step procedure 3 Calculate one-day future price: P t+1,i = P t e } r(1/365) {{} future price e y t+1,i }{{} exp. of sim. return e 0.5σ2 }{{} log-normal correction 4 The i th simulated future value of the portfolio is ( ϑ t+1,i = x b P t+1,i +x o g P t+1,i,x,t 1 ) 365, 250σ,r Financial Risk Forecasting 2011,2017 Jon Danielsson, page 79 of 122

3. VaR with an options and a stock Modified six-step procedure 5 The i th simulated P/L is then: q t+1,i = ϑ t+1,i ϑ t Financial Risk Forecasting 2011,2017 Jon Danielsson, page 80 of 122

3. VaR with an options and a stock Modified six-step procedure 5 The i th simulated P/L is then: q t+1,i = ϑ t+1,i ϑ t 6 VaR can be obtained directly from vector of simulated P/L, {q t+1,i } S i=1, e.g. VaR(0.01) is 1% smallest value Financial Risk Forecasting 2011,2017 Jon Danielsson, page 81 of 122

3. MC VaR of options and a stock Numerical example One call option with strike price X 1 = 100 and one put option with strike X 2 = 110 along with underlying stock Assume that the options expire in 3 months R and Matlab both give a VaR(0.01) of $1.50 Financial Risk Forecasting 2011,2017 Jon Danielsson, page 82 of 122

R and Matlab code Financial Risk Forecasting 2011,2017 Jon Danielsson, page 83 of 122

set. seed (2) sigma2 = 0.01ˆ2 probability = 0.01 r = 0.05 Price = 100 R VaR with option Maturity = 0.25; X = 100; f = bs(x, Price, r, sqrt (sigma2 250,Maturity ) Call Put 3. 793687 2. 551467 S = 1e6 ysim = rnorm(s,mean=r/365 0.5 sigma2, sd=sqrt (sigma2 )) Psim = Price exp(ysim) q = sort (Psim Price ) VaR1 = q[ probability S] 2. 294032 fsim = bs(x,psim, r, sqrt (sigma2 250,Maturity (1/365)) q = sort ( fsim[,1] f [,1]) VaR2 = q[ probability S] 1. 216569 Financial Risk Forecasting 2011,2017 Jon Danielsson, page 84 of 122

randn ( state,0); sigma2 = 0.01ˆ2; probability = 0.01; r = 0.05; Price = 100; Maturity = 0.25; X = 100; Matlab VaR with option f = bs(x, Price, r, sqrt (sigma2 250), Maturity ) Call : 3.7937 Put: 2.5515 S=1e6 ysim = randn (S,1) sqrt (sigma2)+r/365 0.5 sigma2 ; Psim = Price exp(ysim ); q = sort (Psim Price ); VaR1 = q(s probability ) 2. 2930 fsim=bs(x,psim, r, sqrt (sigma2 250),Maturity (1/365)); q = sort ( fsim. Call f. Call ); VaR2 = q( probability S); 1. 2161 Financial Risk Forecasting 2011,2017 Jon Danielsson, page 85 of 122

j S MA VaR1 MA VaR 2 R VaR1 R VaR 2 1 1e3 2.2707 1.2058 2.240173 1.19168 2 1e3 2.4058 1.2677 2.228544 1.186287 3 1e3 2.5767 1.3447 2.350268 1.242397 4 1e3 2.4762 1.2997 2.129596 1.140111 1 1e4 2.2592 1.2005 2.397793 1.264096 2 1e4 2.3507 1.2426 2.347318 1.241046 3 1e4 2.2930 1.2161 2.324661 1.230656 4 1e4 2.2902 1.2148 2.208264 1.176864 1 1e5 2.3097 1.2238 2.289294 1.214386 2 1e5 2.2667 1.2039 2.280243 1.210211 3 1e5 2.2845 1.2122 2.292542 1.215883 4 1e5 2.2932 1.2162 2.289084 1.214289 1 1e6 2.2930 1.2161 2.294032 1.216569 2 1e6 2.2894 1.2144 2.293091 1.216135 3 1e6 2.2934 1.2163 2.289913 1.214671 4 1e6 2.2902 1.2148 2.289533 1.214496 1 1e7 2.2911 1.2152 2.291071 1.215205 2 1e7 2.2920 1.2156 2.292068 1.215664 3 1e7 2.2934 1.2163 2.292396 1.215816 4 1e7 2.2912 1.2153 2.291006 1.215175 1 1e8 2.2912 1.2153 2.290599 1.214987 2 1e8 2.2912 1.2153 2.291051 1.215196 3 1e8 2.2908 1.2151 2.291521 1.215412 4 1e8 2.2913 1.2153 2.290906 1.215129 Financial Risk Forecasting 2011,2017 Jon Danielsson, page 86 of 122

Simulation pricing of a portfolio Financial Risk Forecasting 2011,2017 Jon Danielsson, page 87 of 122

Simulation of portfolio VaR Consider the multivariate case, i.e. the case of more than one underlying assets Main difference: We need to simulate correlated returns for all assets Simulated future prices calculated as before and portfolio value obtained by summing up individual simulated asset holdings Financial Risk Forecasting 2011,2017 Jon Danielsson, page 88 of 122

Simulation of portfolio VaR Suppose we have two non-derivative assets with daily return distribution ( ( ) ( )) 0.05/365 0.01 0.0005 N µ =,Σ = 0.05/365 0.0005 0.02 Let x b be a vector of holdings Financial Risk Forecasting 2011,2017 Jon Danielsson, page 89 of 122

Notation The notation becomes cluttered for the multivariate case Now we have to denote variables by time period, asset and simulation We let P t,k,i denote the i th simulated price of asset k at time t, that is: P time,asset,simulation = P t,k,i Financial Risk Forecasting 2011,2017 Jon Danielsson, page 90 of 122

Portfolio VaR for basic assets Six-step procedure for obtaining MC portfolio VaR 1 Compute initial portfolio value: ϑ t = K xkp b t,k k=1 Financial Risk Forecasting 2011,2017 Jon Danielsson, page 91 of 122

Portfolio VaR for basic assets Six-step procedure for obtaining MC portfolio VaR 1 Compute initial portfolio value: ϑ t = K xk b P t,k k=1 2 Simulate a vector of one-day returns from today to tomorrow y t+1,i N (µ 12 ) DiagΣ,Σ DiagΣ extracts the diagonal elements of Σ (because of log-normal correction) Financial Risk Forecasting 2011,2017 Jon Danielsson, page 92 of 122

Portfolio VaR for basic assets Six-step procedure for obtaining MC portfolio VaR 3 The i th simulated future price of asset k is: P t+1,k,i = P t,k exp(y t+1,k,i ) Financial Risk Forecasting 2011,2017 Jon Danielsson, page 93 of 122

Portfolio VaR for basic assets Six-step procedure for obtaining MC portfolio VaR 3 The i th simulated future price of asset k is: P t+1,k,i = P t,k exp(y t+1,k,i ) 4 The i th simulated futures value of the portfolio is: ϑ t+1,i = K xk b P t+1,k,i k=1 Financial Risk Forecasting 2011,2017 Jon Danielsson, page 94 of 122

Portfolio VaR for basic assets Six-step procedure for obtaining MC portfolio VaR 5 The i th simulated P/L is then: q t+1,i = ϑ t+1,i ϑ t Financial Risk Forecasting 2011,2017 Jon Danielsson, page 95 of 122

Portfolio VaR for basic assets Six-step procedure for obtaining MC portfolio VaR 5 The i th simulated P/L is then: q t+1,i = ϑ t+1,i ϑ t 6 VaR can be obtained directly from vector of simulated P/L, {q t+1,i } S i=1, as before Financial Risk Forecasting 2011,2017 Jon Danielsson, page 96 of 122

Portfolio VaR for options Modified six-step procedure For options we need to modify steps 1 and 4 from the procedure outlined above Similar to modifications for the univariate case before For simplicity suppose the portfolio has only one type of option type per stock Financial Risk Forecasting 2011,2017 Jon Danielsson, page 97 of 122

Portfolio VaR for options Modified six-step procedure 1 Initial portfolio is ϑ t = K k=1 ( ( xkp b t,k +xkg o P t,k,x k,t, )) 250σ k,r Financial Risk Forecasting 2011,2017 Jon Danielsson, page 98 of 122

Portfolio VaR for options 1 Initial portfolio is Modified six-step procedure ϑ t = K k=1 ( (x bk P t,k +x ok g P t,k,x k,t, )) 250σ k,r 2 Simulate a vector of one-day returns from today to tomorrow y t+1,i N (µ 12 ) DiagΣ,Σ DiagΣ extracts the diagonal elements of Σ (because of the log-normal correction) Financial Risk Forecasting 2011,2017 Jon Danielsson, page 99 of 122

Portfolio VaR for options Modified six-step procedure 3 The i th simulated future price of asset k is: P t+1,k,i = P t,k exp(y t+1,k,i ) Financial Risk Forecasting 2011,2017 Jon Danielsson, page 100 of 122

Portfolio VaR for options Modified six-step procedure 3 The i th simulated future price of asset k is: P t+1,k,i = P t,k exp(y t+1,k,i ) 4 The i th simulated future value of the portfolio is ϑ t+1,i = K ( x b P t+1,i k=1 +x o g ( P t+1,k,i,x k,t 1 )) 365, 250σ k,r Financial Risk Forecasting 2011,2017 Jon Danielsson, page 101 of 122

Portfolio VaR for options Modified six-step procedure 5 The i th simulated P/L is then: q t+1,i = ϑ t+1,i ϑ t Financial Risk Forecasting 2011,2017 Jon Danielsson, page 102 of 122

Portfolio VaR for options Modified six-step procedure 5 The i th simulated P/L is then: q t+1,i = ϑ t+1,i ϑ t 6 VaR can be obtained directly from vector of simulated P/L, {q t+1,i } S i=1, as before Financial Risk Forecasting 2011,2017 Jon Danielsson, page 103 of 122

Richer versions We used simple examples to avoid cluttered notation, straightforward to allow for more complicated portfolios Number of stocks and multiple options on each stock American (or more exotic) options Combination of fixed income assets with stocks and options Also, we could use other distributions (e.g. Student-t or even historical simulation) Financial Risk Forecasting 2011,2017 Jon Danielsson, page 104 of 122

Issues in simulation estimation Financial Risk Forecasting 2011,2017 Jon Danielsson, page 105 of 122

Simulation issues Several issues need to be addressed in all MC exercises, of which two are most important: 1. Quality of RNG and transformation method 2. Number of simulations Financial Risk Forecasting 2011,2017 Jon Danielsson, page 106 of 122

Quality of RNG MC simulation is not only dependent on quality of the underlying stochastic model, also depends on quality of the RNG used Low-quality generators give biased or inaccurate results E.g. a simulation size of 100 with period of 10 will repeat same calculation 10 times Complicated portfolios may demand large number of RNs and therefore high-quality RNGs Financial Risk Forecasting 2011,2017 Jon Danielsson, page 107 of 122

Quality of RNG Many transformation methods are only optimally tuned for the center of the distribution This becomes particularly problematic when simulating extreme events Some transformation methods use linear approximations for extreme tails, which leads to extreme uniforms being incorrectly transformed Financial Risk Forecasting 2011,2017 Jon Danielsson, page 108 of 122

Choosing number of simulations Choosing appropriate number of simulations is important Too few give inaccurate answers Too many waste time and computer resources In special cases formal statistical tests provide guidance, but usually informal methods have to be relied upon It is sometimes stated that accuracy of simulations is related to inverse simulation size This is based on assumption of linearity, which is not correct for the problems in this chapter Financial Risk Forecasting 2011,2017 Jon Danielsson, page 109 of 122

Choosing number of simulations Best way is to simply increase number of simulations and see how MC estimate converges Rule of thumb: Sufficient simulation size when numbers have stopped changing up to three significant digits We can also compare convergence of MC estimate to the true (analytical) price Financial Risk Forecasting 2011,2017 Jon Danielsson, page 110 of 122

Convergence of MC estimate Comparison with analytical Black-Scholes price In a example on slide 31 we computed analytical call price of $11.0873 for a European option Now calculate MC estimates for different simulation sizes and compare the results with the true (analytical) price Financial Risk Forecasting 2011,2017 Jon Danielsson, page 111 of 122

Cumulative MC estimates Comparison with analytical Black-Scholes price Average 11.1 Black Scholes price 11.0 10.9 10.8 10.7 10 2 10 3 10 4 10 5 10 6 Simulations Financial Risk Forecasting 2011,2017 Jon Danielsson, page 112 of 122

Cumulative MC estimates Comparison with analytical Black-Scholes price Average 11.1 Black Scholes price 11.0 10.9 10.8 10.7 10 2 10 3 10 4 10 5 10 6 Simulations Financial Risk Forecasting 2011,2017 Jon Danielsson, page 113 of 122

Cumulative MC estimates Comparison with analytical Black-Scholes price Average 11.1 Black Scholes price 11.0 10.9 10.8 10.7 10 2 10 3 10 4 10 5 10 6 Simulations Financial Risk Forecasting 2011,2017 Jon Danielsson, page 114 of 122

Cumulative MC estimates Comparison with analytical Black-Scholes price Average 11.1 Black Scholes price 11.0 10.9 10.8 10.7 10 2 10 3 10 4 10 5 10 6 Simulations Financial Risk Forecasting 2011,2017 Jon Danielsson, page 115 of 122

Cumulative MC estimates Comparison with analytical Black-Scholes price Average 11.1 Black Scholes price 11.0 10.9 10.8 10.7 10 2 10 3 10 4 10 5 10 6 Simulations Financial Risk Forecasting 2011,2017 Jon Danielsson, page 116 of 122

Convergence of MC estimate Comparison with analytical Black-Scholes price Based on graph on previous slide, it seems to take about 5000 simulations to get three significant digits correct However, there are still fluctuations in the estimate for 5 million simulations Financial Risk Forecasting 2011,2017 Jon Danielsson, page 117 of 122

Convergence of MC VaR estimate Look at the convergence of MC VaR estimates as the simulation size increases Graph MC VaR for a stock with daily volatility 1% along with ±99% confidence intervals Financial Risk Forecasting 2011,2017 Jon Danielsson, page 118 of 122

Convergence of MC VaR estimates With ±99% confidence intervals 115 110 105 VaR 100 95 90 85 10 2 50 2 50 3 50 4 Simulations Financial Risk Forecasting 2011,2017 Jon Danielsson, page 119 of 122

Convergence of MC VaR estimates With ±99% confidence intervals 115 110 105 VaR 100 95 90 85 10 2 50 2 50 3 50 4 Simulations Financial Risk Forecasting 2011,2017 Jon Danielsson, page 120 of 122

Convergence of MC VaR estimates With ±99% confidence intervals 115 110 105 VaR 100 95 90 85 10 2 50 2 50 3 50 4 Simulations Financial Risk Forecasting 2011,2017 Jon Danielsson, page 121 of 122

Convergence of MC VaR estimates With ±99% confidence intervals 115 110 105 VaR 100 95 90 85 10 2 50 2 50 3 50 4 Simulations Financial Risk Forecasting 2011,2017 Jon Danielsson, page 122 of 122