coding and equity pricing

19
Giulio Laudani #19 Cod. 20247 APPLIED NUMERICAL FINANCE Discrete time framework:................................................ 1 How to compute Excepted value:.........................................1 American Option:.......................................................2 Lattice approach:......................................................3 Continuous time Framework:.............................................. 3 A brief review of Original Black’s:....................................3 Modeling more than one security:.......................................4 American Option:.......................................................5 Jump diffusion process:................................................6 Monte Carlo............................................................. 8 What is about?.........................................................8 A passage through Bias and Efficiency:.................................8 Discretization procedure:..............................................9 Variance reduction technique:.........................................10 Discrete time framework: This section is basically the Ortu's part. We spend few words only on new, or remarkable part. How to compute excepted value: The first cornerstone of finance is the equivalence in value between the price of an asset and the replicating portfolio V x ( t )=V θ (t) , where the replicating strategy is a self-financing one (European case) ∆V ( t) =θ 1 ∆S 1 ( t ) + θ 0 ∆B ( t), while the discounted one is ˘ V ( t) =θ 1 ˘ S 1 ( t ). The replicating strategy θ 1 θ 0 can be computed by a backward recursion that involves the conditional covariance of the option value with the underlying S1: θ 1 = cov ( ∆V ( t) ;∆S ( t ) ) V ( ∆S ( t ) ) , which is also called the delta of the portfolio and it also the regression coefficient between ˘ V ( t) ;∆ ˘ S ( t) Cov ( ˘ V ( t +1) ;∆ ˘ S ( t ) )=¿ Cov ( ˘ V ( t ) ;∆ ˘ S ( t) ) =Cov ( θ 1 ˘ S 1 ( t ) ;∆ ˘ S 1 ( t ) ) =θ 1 Cov ( ˘ S 1 ( t) ;∆ ˘ S 1 ( t) ) 1

Upload: giulio-laudani

Post on 22-Nov-2014

351 views

Category:

Economy & Finance


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Coding and Equity pricing

Giulio Laudani #14 Cod. 20247

APPLIED NUMERICAL FINANCEDiscrete time framework:...................................................................................................................................1

How to compute Excepted value:...................................................................................................................1

American Option:...........................................................................................................................................2

Lattice approach:............................................................................................................................................3

Continuous time Framework:.............................................................................................................................3

A brief review of Original Black’s:...................................................................................................................3

Modeling more than one security:.................................................................................................................4

American Option:...........................................................................................................................................5

Jump diffusion process:..................................................................................................................................6

Monte Carlo.......................................................................................................................................................8

What is about?...............................................................................................................................................8

A passage through Bias and Efficiency:...........................................................................................................8

Discretization procedure:...............................................................................................................................9

Variance reduction technique:.....................................................................................................................10

Discrete time framework:This section is basically the Ortu's part. We spend few words only on new, or remarkable part.

How to compute excepted value:

The first cornerstone of finance is the equivalence in value between the price of an asset and the replicating portfolio

V x( t)=V θ(t ), where the replicating strategy is a self-financing one (European case) ∆V ( t )=θ1∆ S1 ( t )+θ0∆B( t),

while the discounted one is ∆ V ( t )=θ1∆ S1 (t ). The replicating strategy θ1∧θ0 can be computed by a backward

recursion that involves the conditional covariance of the option value with the underlying S1: θ1=cov (∆V (t ); ∆S (t ) )

V (∆ S ( t )),

which is also called the delta of the portfolio and it also the regression coefficient between ∆ V (t ); ∆ S (t )Cov (V (t+1 ); ∆ S (t ) )=¿Cov (∆V ( t ) ;∆ S (t ) )=Cov (θ1∆ S1 ( t ); ∆ S1 ( t ) )=θ1Cov (∆ S1 ( t ) ;∆ S1 (t ))

The second cornerstone if that the conditional expected value under Q of the option payoff is equal to the today price

itself V (0 )=EQ [V (T ) ].

The backward recursion formula exploits (and is equivalent to) the Q-martingality of the discounted value of the

European derivative X. Starting from the terminal value V X (T )=X (T ); we determine by backward induction V X(t)

from the value of V X (t) at the step before, i.e. at t + 1; for t = T -1; …; 0. This approach is precious when dealing with

American options, because it can be generalized to account for the early exercise premium.

1

Page 2: Coding and Equity pricing

Giulio Laudani #14 Cod. 20247

American Option:

The American option pricing is: V ( t )=¿ t<τ ≤T EQ[¿( X (τ )B ( τ ) ){P¿¿ t ]¿where τ is a random variable, representing the

optimal investor time to early exercise the option before maturity, using the info available up to time Pt. This expectation is called Snell envelope and its properties are:

1. V (0 )≥EQ [V (T ) ] hence it must have a decreasing mean, since the early exercise premium will lose value

2. The concept of super-matingality must be associated with the lowest one among all the possible available, this is an important condition from the seller prospective

3. The τ variable is chosen as the minimum time value that ensure that the option value is equal to the immediate payoff, this condition is to state that waiting is equal to lose money

The American option algorithm uses in the binomial model is equivalent to the free boundary solution, basically we will look after the maximum value between the expected present value and the immediate payoff. The consequence of this pricing formula is not to have a self-financing replicating strategy; since the option payoff may have intermediate cash flow (this consideration is important for hedging purpose).

To solve this problem together with the usual replicating strategy we need to introduce a consumption process C(t) which is an increasing (no strictly) function [the writer of the option decide thanks to this process how much he will consume at

the beginning of the period, and this strategy is equivalent to the optimal buyer’s strategy]. ∆ V ( t )=θ1∆ S1 ( t )−∆ C ( t ), hence the consumption variation is equal to the decrease in the expected value of the option (those money represent the value that the writer earn if the buyer do not early exercise when he is supposed to do so).

Markovianity is an useful feature of a price process. It allows to price derivative securities, whose payoff depends only on the current underlying stock price, in a fast way. Hence, instead of computing the entire information structure for a price process S1; we can compute only the tree that describes the evolution of S1, hence T+1 nodes , basically the evolution till

t-1 plus the two new possible evolution(Binomial case) instead of 2T .

EQ [φ (S (t+1 ) {P¿¿ t ) ]=EQ [φ (S (t+1 ) {S¿¿t ) ]

A look back American option payoffx (t )=max0≤ a≤t

S1 (a )−S1 ( t ). It is not a Markovian process (better, we cannot simply use

the simplified tree method seen above), we need to Markovianize the process by proceeding trough the following procedure:

1. Introduce a State vector variable defined as F ( t )=max0≤ a≤t

[S¿¿1 (a )]¿or (to have a better understanding)

F ( t+1 )=max0≤ a≤t

[F (t);S1(t+1)] running maximum

2. Construct the tree for S and F and this will be a Markovian process, so the process

EQ [φ ((S ( t+1 ); F (t+1 ) ) {P¿¿ t )] will depend only to F(t) and S(t), so we can rewrite the process as follow

EQ [φ (S (t+1 ) ;F (t+1 ){S¿¿ t F (t ) ) ]. This method allows to F(t) to not be a recombining function, however

the node to be considered are much more than the simpler one, we have a quadratic function T2

4 (still

manageable).3. To reduce the time required to compute price option has been introduced various approximation.

2

Page 3: Coding and Equity pricing

Giulio Laudani #14 Cod. 20247

a. The first one is called the forward shooting grid approach1, where we are going to introduce an auxiliary vector representing the running maximum.

b. Then we compute the immediate payoff for each nodec. The backward part consist on using the backward pricing formula V ( t )=F ( t )−S ( t ), here we might

consider that the binomial tree features allow as to say that in case of an upper movement (with

probability 1+r−du−d

) the updated running maximum is F (t )=max❑

[F ( t ); S (t )∗u]in case of an upper

movement and F(t) in case of a down movement.d. We will use this state vector to compute the continuation value of the option, however there could be a

mismatch between the updated running maxima different and the F(T+1), so we need to define a selection procedure to proxy the result:

i. Chose the closest F(t+1) to the updated F(t)ii. Chose two F(t+1) which bound the update one and interpolate

e. Check than for immediate payoff value if it is higher than the excepted valueThe price will depend on the algorithm chosen for both the forward and backward part

Lattice approach:

We are going to present a possible framework to develop tree analysis to price path dependent option (J. Cox S.A. Rossand Rubinstein, 1979), where the usual methodology do not provide enough information. Our aim is to add to each node of the tree more information by means of an auxiliary state vector.

The state vector is used to capture the specific path-dependent feature of the option contract. To enhance the accuracy of the lattice methods without burdening the computational cost it is also possible to refine the tree representation of the underlying in option-specific regions (S. Figlewski and B. Gao, 1999).

The Adaptive Mesh Model (AMM) sharply reduces the nonlinearity error. The non-linearity error refers to the fact that when the option value is highly nonlinear with respect to the underlying asset (for instance around the strike at expiration), a uniform refinement of the step size does not efficiently increase accuracy, because much of the computational effort is wasted on unimportant regions. The idea of the AMM is to graft one or more small sections of the fine high-resolution lattice onto a tree with coarser time and price steps to increase the computational accuracy only on those regions where needed. The AMM approach can be adapted to a wide variety of contingent claims. For some common problems, accuracy increases by several orders of magnitude with no increase in execution time.

Discrete barrier options are often approximated with continuous barrier options (i.e. options where the barrier is monitored continuously in time), by using the closed formula that can be derived in the continuous-time framework. Such approximation overprices systematically the knock-in discrete option and underprices the knock-out discrete options. To reduce this error one can apply a suitable correction for option barrier (Broadie, Mark, & Kou, 1997). Basically we will use a suitable higher or lower (depending on the initial position) barrier.

Continuous time Framework:Those models are the most used since the daily trading activity is on a continuous base. The models that will discuss in this section are the base Black and the more advance topic regarding jump diffusion models, mean reverting and tailoring the pricing to fat tails empirical evidence.

A brief review of Original Black’s:

1 This method is suitable for Asian option as well

3

Page 4: Coding and Equity pricing

Giulio Laudani #14 Cod. 20247

First of all this model is based on Gaussian distribution assumption, with continuous payoff evolution and we are assuming that the information comes into the market following a filtration rule. The dynamics used to model the risk free is simply a time depend function, while the securities’ one is assumed to be defined by a deterministic drift plus a stochastic component (diffusion) which is assumed to be a Brownian motion2.

B (t )=e∫r ( s)ds

dS ( t )S (t )

=a ( t )dt+b ( t )dW ( t )

S ( t )=S (0 )+∫S (t )μdt+∫ S (t)σdW (t )=¿>SDEThe presence of the diffusion element made the solving equation depending on a stochastic integral which do not allow using the normal calculus solving methodology. To solve this equation we need to modify the payoff so that to eliminate the dependency to S(t) of the drift and the diffusion; we can do that by applying the Ito Formula:

f (t ; X ( t ) )dt

∗dt+f (t ; X (t ) )

dx∗dX ( t )+

12∗2 f (t ; X ( t ) )

dx2∗b2(t ; X (t))dt

Thanks to this trick we can solve the SDE and obtain the PDE of the security dynamics as following:

S ( t )=S (0 )∗e(μ−12∗σ 2)dt+σdW

Corr ( d S1S1;d S2S2 )= σ1σ2dt

σ1√dt σ2√dt=1

E [S ( t ) ]=S0 eμt∫ e

−12

σ 2t+σ√ t z∗1

√2 πe

−z2

2 dz=∫ 1

√2 πe

−12

( z−σ √ t)2

dz

Modeling more than one security:

In order to describe a given correlation structure among the log-returns of the risky securities, we are going to employ many risk factors. In particular, a k-dimensional Brownian motion on the filtered probability space (W; F; P) is used to represent the riskiness of the market. The classic approach allows only perfect correlated asset, hence we need something more powerful to model non trivial Var-Cov matrix.

The model consists on defining k independent3 Brownian motion (one for each securities) and the related diffusion coefficient that is a vector (in the simple case a constant) representing the sensitivity to each of the k Brownian motion. From this vector we end up with the Var-Cov matrix of the whole market; note that the covariance is the product between the diffusion coefficient and the variance is the sum of the square of the sensitivity coefficient.

cov (S (1 ) , S (2 ) )=Σi , j=σ iT σ j=(σ1,1σ2,1+σ1,2σ2,2 )dt

dSi (t )Si (t )

=μi(S(t ); t)dt+σ iT (S (t ) ; t )dW P(t)

V ar ( dS1 ( t )S 1 ( t ) )=(σ1,1

2 +σ1,22 )dt

2 The property of the motion are: zero mean, a time dependent volatility “t”, a Gaussian distribution (for difference of motion with different time interval) and each interval is independent from the previously one3 We can achieve the same result of modeling the correlation by assuming a correlated Brownian motion

4

Page 5: Coding and Equity pricing

Giulio Laudani #14 Cod. 20247

The next step now is to define the EMM for all the securities involved, basically we need to find the unique vector which defines the risk price. We achieve this result by applying the usual Girsanov’s Theorem and transforming the Brownian motion under probability “P” into the motion under “Q” by the usual drift transformation.

v i=μi−r

σ i

→W P=WQ−vdt

To solve the SDE for each security we can still apply the Ito’s formula with the transformation to add the joint derivatives terms to account the presence of more than one risky factor. The PDE is:

Si( t)=Si (0 ) e(r1−12 σ i

T σi)dt+σ iTW Q (t )

The Ito’s formula in the multi and the change of drift are:

dY (t )=df (t , X (t ) )

dt+∑ df (t , X (t ) )

d xid X i(t)+

12∑ d2 f (t , X (t ) )

d x id x j

bitb jdt

dWQ=dW P+vdt where μi−r=σ iT v

The parameters are the one of “ f ( t , X ( t ) )”. The hedging strategy in this case is similar to the one-dimensional case,

θ0=F (t , S (t ) )−∑ h iSi∧θ i=dF (t , S (t ) )

d Si→it will change depending on the underling.

American Option:

The most common analytic approaches to state and solve the American option problem in the continuous time framework are the variational inequality and the free boundary problem.

As a preliminary step we need to define the concept of super-martingale, in fact in continuous time we cannot use the backward recursive formula. To convert this concept in continuous time we need to formalize the stopping time

{W :r (w )<t }∈ F(r), if this event happens we won’t follow any more the continuous region and we won’t have the

martingale property, but instead we will be in the early exercise region, where the process will be a super martingale. Hence the option is equal to the European option in the continuous region and equal to the immediate payoff elsewhere.

The first procedure consists on having a negative drift under the risk neutral measure for the super-martingale discount payoff and that the terminal value is anchored to the final payoff/underlying value and that there could be only two possible case (2) that the continuous region where the process is q-Martingale or the immediate payoff one

1. F ( t ; S )dt

+F ( t ;S )dS

∗Sr+

12∗F2 ( t ; S )

d2S∗S2σ2−F (t ; S )r ≤0 for any (t ;S )∈ [0 ;T ] X R+¿¿

2.( F (t ; S )

dt+F ( t ; S )dS

∗Sr+

12∗F2 (t ;S )

d2S∗S2σ2−F ( t ;S ) r)(F (t ;S )−f (S))=0 for any (t ; S)∈[0 ;T ]R+¿¿

3. F ( t ;S )≥ f (S ) for any (t ;S)∈[0;T ]R+¿¿

4. F (T ; S)=f (S) for any S∈R+¿ ¿

5

Page 6: Coding and Equity pricing

Giulio Laudani #14 Cod. 20247

The first equation is the Ito’s formula applied to a portfolio short on the derivatives and long on “h” units of the underling,

by imposing to be a risk free portfolio, hence h=dF ( t )dS

.

In the variational inequality problem, as we have seen, the description of the continuation region and the early exercise region is implicit. The variational inequality problem can be tackled with numerical techniques such as finite difference schemes or finite elements techniques.

Another way to address the American option problem is to first describe the continuation region and the early exercise region and then impose the Black-Scholes PDE only on the continuation region. This approach leads to the free boundary problem. The free boundary is the line dividing between the continuation region and the early exercise region. Its features depend on the payoff you are considering, and on the parameters of the model.

1. F ( t ; S )dt

+F ( t ;S )dS

∗Sr+

12∗F2 ( t ; S )

d2S∗S2σ2−F (t ; S )r=0 for any (t ;S )∈ [0 ;T ] , S>S¿ ( t )

2. F ( t ;S )=(K−S )+¿for any t ∈ [0 ;T ] , S=S¿ (t ) ¿

3. dF (t ;S )dS

=−1 for any t∈ [0;T ] , S=S¿ (t ) smooth pasting

4. F (T ; S)=f (S) for any S∈R+¿ ¿

We focus on the case of the put option, where the immediate payoff is f(S) = (K - S)+. It can be proved that the American put option price F(t; S) inherits the convexity with respect to the underlying S and the decreasing monotonicity property with respect to S from the payoff function f. Moreover F is decreasing with respect to t:

Basically we want to find the critical value S(t)* which define the ends of the continuous region and the beginning of the early exercise region for any given time. The value S*(t) is called the critical price of S at t and it can be defined as the threshold under which it is optimal to exercise the option at "t". Unfortunately, no analytical formula4 is available to compute S* as a function of time (and the other parameters of the American option problem). This is why no closed formula is available in the finite maturity case for plain vanilla put options. The critical value evolution across time is an increasing function of time (convex) and at maturity it coincides with the strike level K.

The infinite maturity solution we have that:

F∞ (t )={ A Sa for S>S∞

K−S fo r S≤S∞}

Where the elements in the basket are respectively: a=

(−( r−σ 2)−√r2+σ2 r+ σ4

4 )σ 2

<0 and S∞

¿ =−1−aa

K<Kand

A=S∞

¿ (1−a )

−a. The solution comes from applying the Ito’s formula applied to A Sa for S>S∞ and condition 1, which leads

to the solution “a” and we should take the negative value since we want a decreasing function in mean.

0+A Sa−1∗aSr+ 12A Sa−2 (a−1 )aS2σ 2−A Sa r=0→A Sa[ar+ 12 a

2

σ 2−12aσ2−r ]=0

4 For infinite maturity it exist a closed formula

6

Page 7: Coding and Equity pricing

Giulio Laudani #14 Cod. 20247

a (r−σ 2

2 )+ a2σ 2

2−r=0 two possible solutions, only the negative is possible

Note that the value of this option will always dominate the value of the discrete formula S¿ ( t )>S∞ (t )

Jump diffusion process:

In this section we want to add to our motion jumps at random time with stochastic amplitude to model discontinuity in the option payoff. The base of our study is the original works of Merton (Merton, 1976) later on generalized with the Levy Process or marketed point process (Schonbucher, 2003).

The risk free asset is modeled as the usual Black’s world, the securities are instead model as following:

dS ( t )=S¿

J (t )=∑J=1

N ( t )

(Y j−1 )

P [N (t )=n ]=e− λt ( λt )n

n !withN (0 )=0

where Y is a random variable and N(t) is a Counting process of the number of jump up to t included and right continuous. This last process is distributed according to a Poisson distribution5, with mean and variance equal to λt and marginal probability of occurrence λdt , where λ6 is called intensity of the process. The J process is a compounded Poison process, where the number of jump is still as the standard distribution, but the size is defined by the sequence of i.i.d random variable, i.e. the Y.

Now we need to solve the SDE, first of all we need to have a better insight on the jump dynamics/effect: before the event

the price evolution is equal to the classic Black’s formula at the jump the price will be S (rt )=S¿, so the jump effect will

prevail over all the other time evolution effect. Hence the PDE is:

S ( t )=S (0 ) e(μ−12 σ 2)dt+σW (t )(∏

j=1

N (t )

(Yj ))with∏j=1

0

(Yj )=1∧E [∏j=1N (t )

(Yj )]=eλt ( E (Y 1)−1 )

All the process involved W, J and N are independent we can easily compute the first moment and the variance of the PDE:

E (S ( t ) )=S (0 ) eμt eλt (E (Y1 )−1)

V (S (t ) )=S2 (0 ) (e (2μ+σ 2) t eλt (E [Y2 ]−1 )−e2μt e

2λt (E (Y1 )−1 ))It is easy to see that the variance in this case is higher than the simple lognormal process, this is a good property to better fit the fatter tail of the empirical data. You need to note that E(y)-1=0 only if the probability to do not have any lose in value for any jumps equal 1 (no jump effect). Note that those measures are under P.

This model grants NA, however it is incomplete, in fact there exist many super-martingale measure, from who will choose the lower one. We need to apply Girsanov’s theorem to change the probability measure to the Jump process as following

λQ=ϕλP, where ϕ>0 and jointly we need to change the drift of the Wiener process W tQ=W t

P+θt .

5 We have chosen this distribution since it ensure an independent, stationary increment equal 1, right continuous and non-decreasing6 It is possible to model the intensity as a function of time (inhomogeneous process) or as a stochastic function (Cox process)

7

Page 8: Coding and Equity pricing

Giulio Laudani #14 Cod. 20247

So the SDE under Q of the discounted stock differential will be:

(μ−r )dt+σdW ( t)P+dJ ( t )± (μy−1 ) λQdt=(μ−r−σθ+(μy−1 )λQ )dt+σdWQ ( t )+∆J ( t )−(μy−1 ) λQdt where μy=EP(Y ).

If we compute the expected value we notice that the last term is equivalent to a pure jump martingale under Q

EQ [dJ ( t ) {P¿¿ t ]=E [dJ ( t ) ]∗Q ( Jump prob )=(μy−1 ) λQdt, hence the mean is zero. We end up with

(μ−r−σθ+(μ y−1 ) λQ) and to be drift less (NA requirement) we do not have a unique solution since we have two

parameters.

The two parameters cannot be uniquely define since we have one equation (imposing the drift to be zero), Merton propose to choose as ϕ=1 since in his opinion the jump risk can be perfectly hedged (in his mind), hence investor must

be neutral on it: by substituting the θ=( μ−r+(μ y−1 ) λQ )

σ→(r−(μy−1) λQ−

12σ2) .

The PDE S (t )=S (0 ) e(r−(μ y−1 )λQ−

12σ2) dt+σ WQ ( t )(∏

j=1

N ( t )

(Yj )), note that the drift under q is r−(μ y−1) λQ and that the

volatility is unchanged, so to compute the first and second moment we can simply change the drift, so that we have:

EQ (S ( t ) )=S (0 )ert each traded security must earn the risk free rate under any EMM-Q

To price option we can use an intuitive approach base on the decision to choose a number “n” of jump during the tenor or by applying the Ito’s formula:

The first one will be the intuitive one, besides the trick we assume that Y is log normal(a;b2) which is equivalent to

Y=eX N (a ;b2 ), so the PDE will be S ( t )=S (0 ) e(r−(μ y−1 )λQ−

12σ2) dt+σ WQ ( t )

e∑X i if we modify the equation to use the

standardized distribution: S ( t )=S (0 ) e(rnT−1

2σ 2T)+σ n√t Z. rn=r−m [¿ μy−1 ] λ+ n ln (1+m )

T;σ n

2T=σ2T +nb2

Now we notice that the expected value of the present value option payoff is the product of the probability P [N (θ )=n ] and P ¿ where the last term is the BS formula and λ '=(1+m)λthis last change has been made to change r with rn to fit

the BS formula.

The solution of the SDE with Ito formula is made by a modified version of the standard one, in fact to the usual term will

add the ¿ for the dF(t), if we compute the integral of F ( t )−F (0) it will became ∑ F ¿¿ and all the other term are

expressed as integral, since we are looking for the punctual estimate and not the infinitesimal increment. We choose the usual log transformation we will have our PDE as seen above.

Monte CarloIn this section we will speak about three main topics: what is a MC simulation, how to improve the efficiency and the possible drawback and finally some comments on practical example.

What is about?

MC simulation are used to estimate not solvable equation with analytical solution, basically we are going to use an estimator based on “large number rules7”.7 The conditional distribution is unchanged, the size of the event is unaffected by the change of measure, the number of jump will be changed. There exist other forms of the Girsonov’s theorem which allow changing the size of the jump as well.

8

Page 9: Coding and Equity pricing

Giulio Laudani #14 Cod. 20247

a=1n∑ f (x )where lim

n→∞a=a∧E ( a )=a

|a−a|= σ√n

zαwherethe ¿ side of the signis called radiusof the simulation

Since this is an estimate it is not a number but it carries with itself a distribution and an error, that’s why we have an IC for that estimates that we need to minimize in order to improve our following consideration based on those results. The MC

methods has a rate of convergence equal to 1

√n, which is better than try to solve the integral8 where we are considering

high dimension problem (more than 4 elements).

To perform a simulation we need to know or to model the distribution of the underling random number which we are going to compute, besides the theoretical consideration on what to use here we will speak on how we will use it. The

inverse function method is a sort of statement to allow getting all distribution starting from the Uniform F x−1(U ) X , in

fact all PC application provides a random number generator which is based on the uniform distribution. This is an important property that allows retrying all continuous and discrete distribution:

For the first case no problem , just find the percentile as function of “U” form u=F x(X ) For discrete case we need to define range in which any value of the “U” will be assign to the correct probability

measure, basically we will look for P[q j−1<U ≤q j] the right extreme inclusion is a convention [Generalize]

The proof of this relationship is based on the fact that since: F x−1 (u )≤ x iif u≤Fx (X), which can be proven by checking

that F x−1 (Fx

−1 (u ) )≤ Fx ( x )≤¿u≤ Fx (X ), so P [Fx−1 (u )≤ x ]=P [u≤ Fx (X ) ]=¿ F x

−1(x )

A passage through Bias and Efficiency:

Now after that brief introduction we can describe the twin concept of bias and efficiency. Here we are speaking of bias referring to the discretization problem9, in fact the estimator is by definition un-biased, and we are defining as efficiency a multi-dimensional measure, in fact we are looking to both reduce the radius and the time needed to perform the simulation10. Those two parameters play a contradictory rule, or better they are inversed influenced by the same elements, that’s why we use the mean spare error measure to improve our estimate.

MSE=E [ ( a−a )2 ]=E [E ( a )−a ]2+E [ a−E ( a ) ]2=Bias ( a )2+Variance( a)

Thanks to this mathematical device we can jointly control for the bias and variance contribution to reduce the quality of the estimate. We are usually interested in minimizing the variance, besides in the case of American option. The two cited elements are the size of the discretization interval “h” and the number of sample used “n”, which contributes to the

radius efficiency with the following dumb relationship nh2→∞ for the discrete approximation case. See below

The time efficiency is considered as following: nh=Tr h

and the radius expressed in terms of time per simulation rh is

√V hrh√T

where the variance is the one granted by the procedure by applying “h”.

Discretization procedure:8 On the convergence for big sample of the estimator to the correct value9 That is our original quantity that we want to guess10 This problem arise when we have to find the Greek of option, when we need to estimate the derivatives/marginal variation to given factors

9

Page 10: Coding and Equity pricing

Giulio Laudani #14 Cod. 20247

This is a technique to both estimates path dependent payoff and to compute the option Greeks. We are going to simulate both the payoff evolution and the marginal change for given change in some key factors.

Speaking about the Greeks there are three possible methodologies that can be used: Finite discretization: we will look after the first derivatives respect to the given factor by approximating its limit

definition. This method is function of the size of the marginal increment considered and by the number of simulation performed. This method is a non-consistent approach, since the discretization bias plays a big rule, however it can be minimized by reducing the “h” size, however we need to control the variance explosion problem11. There exist two possible methods:

o Forward Difference: a I (θ )≈ a (θ+h )−a (θ )h

with h→0. The bias in this case is reduced by a linear

function regardless the number of Taylor expansion terms in the proxy used, i.e. constant∗h.

a (θ+h )−a (θ )=a 'h+ 12a ' ' h2+o(h2) hence the E [∆a]=a'+1

2a' 'h+o(h), so the bias

E [∆a ]−a'=12a' ' h+o (h )=¿>h∗constant

a 'h+ 12a ' ' h2+ a' ' ' h31

6+o (h3), still “h” is the higher order

o Central Difference: a I (θ )≈ a (θ+h )−a (θ−h )2h

with h→0. The bias goes to zero faster than the

forward case o (h ), however this procedure is more time demanding since we need to compute two

marginal changes. If we assumed that the function is n-times continuously differentiable the bias is

o (h2 )

a (θ+h )−a (θ )=a 'h+ 12a ' ' h2+ 1

6a ' ' 'h3+o (h3 )−(−a'h+ 1

2a' 'h2−a ' ' '1

6h3+o (h3 )), so

the bias 2a'h+ 2

3a' ' ' h3+o (h3 )

2h−a'=

13a' ' ' h2+o(h2)

o Speaking about the Variance effect we need to consider to possible estimation procedure: Independent sampling

V f (∆a )=h−2V (∑ ∆a

n )=hn−2∑ [V ( y (t+h ) )+V ( y ( t ) )¿]= 2h2n

∗Const ¿

V C (∆a )=h−2

4V (∑ ∆a

n )= 12h2n

∗Const

Same seed for both the sampling

V f (∆a )=h−2V (∑ ∆a

n )=h∗consth2n

= consthn

V C (∆a )=h−2

4V (∑ ∆a

n )=h∗Consth24 n

=Consth4 n

The path wise method consists on determining the sensitivity, by deriving the payoff with respect to the parameter you are interested in, by swapping the expectation with the derivative operator:

11 We have usually time constrain

10

Page 11: Coding and Equity pricing

Giulio Laudani #14 Cod. 20247

ddθ

E [Y (θ ) ]=E[ ddθ Y (θ )]where ddθ

Y (θ )=Y I (θ), basically we will estimate the sample mean of that

quantity 1n∑Y I (θ ).

o This method is unbiased, however can be applied only under given hp, i.e. smoothness of the payoff12.

o For practical use the estimator that we will use ddθ

Y (θ )=

dY (θ )dS (T )

∗dS (T )

where S(T) is the

underlying and θ is the parameter on whom we are computing the derivatives. The first factor is computed by defining the value assumed by the payoff at maturity, in the case

of a European call we have: e−rt I S (T )>K since Y (θ )= (S−K )+¿→S+¿¿ ¿

The second factor is the derivatives of the underlining dynamics, in the case of the European

call with respect to S(0) [delta] is S (T )S (0 )

The European case the

E [e−rt I S (T ) >KS (T )S (0 ) ]= e−rt

S (0 )E (S (T ) ) E ( I S (T )>K )= e−rt

S (0 )∗S (0 ) ertN (d1 ), if we want to

estimate the Vega we need to change just the second factoro This method can be applied to any diffusion process by freezing path wise the coefficient (Euler

Discretization) The likelihood ratio method has been introduced to overcome the limit of the previously method, hence it is a

more general one. It consists on simulating the payoff density, which is far more smooth than the original payoff, hence will use the continuous definition of expected value:

ddθ

E [Y (θ ) ]=∫ ddθ

∗y gθ ( y )dy=∫y∗

d gθ ( y )dθ

gθ ( y )gθ ( y )dy

d gθ ( y )dθgθ ( y )

=Score (Y )=¿> 1n∑Y i∗Score(Y )

Where gθ ( y )= ddx

Q [S>K ] European call is the density function of y for a fixed parameter θ . This estimator is

consistent and unbiased and extendable to the multidimensional case. In concrete this method to be applied: first we need find the risk neutral probability of the derivatives payment occurrence13. Here there is an example for the delta of a call European:

At first compute the density function to respect of the parameter, which is S0, so the density is the

ddx

N (d1[¿ ln( KS (0 ) )−(r−σ2

2 ) tσ √T ]) , so

g ( x )=N (d1 )[¿ϵ ]∗ϵ '[¿

1σ √T

∗1

x]

12 In case of stochastic time needed per simulation (barrier option case) we can use the expected value for simulation13 Given the estimates of the derivatives we need to analyze the Variance, in fact its estimates is reduced by the term n∗h2for FD while n∗h for CD (if the different draw are independent both for the marginal increase that for the original)

11

Page 12: Coding and Equity pricing

Giulio Laudani #14 Cod. 20247

Then we need to compute the derivatives of g(x) to respect to S0:

dd S0

g (x )= dd S0

N

( ϵ (x))∗1σ √T

∗1

x=

1σ √T

∗1

x∗( 1

√2π∗e

−ϵ ( x )2

2 )∗−ϵ( x )∗dϵ ( x )

d S0[¿− 1

σ √T∗1

S0]=g

( x )∗ϵ ( x )S0

∗1

σ √T

The score will be g

(x )∗ϵ (x )S0

∗1

σ √Tg ( x )

=

ϵ ( x )S0

∗1

σ √T

This method can be used in a multidimensional world, as well as in a path dependent option estimation where the

f ( X1…X2 )∧each X i is the vector of one dimensional random variable with the same density g(x).

Variance reduction technique:

The efficiency is an important goal, here we will describe the most important one: Antithetic Variate, it is really easy, it consists on using for each simulation the given percentile and its opposite,

so that they have the same distribution but they are not independent, but negatively correlated.

E [Y AV ]=12

(E [Y ]+E [ Y ] ). The variance is smaller

Control Variate is based on using the error in the estimate of known quantities to reduce the error in the estimate of the unknown one. We will use the combination of the known variable and the unknown one

Y (bi )=Y i−b (X i−E ( X ) ), which it will be used as estimator.

o This estimator is unbiased for n→∞E (Y )−b (E ( X−E (X ) ) )=E (Y )−0o So we need to choose a parameter “b” to minimize the new estimator variance to ensure

V (Y (b ) )<V (Y ). This method allows to reduce the variance if the control variate is correlated to the

unknown, the sign do not matter, only size the higher the better σ y (1−ρ x , y2 ) with the trivial

requirement ρ x , y2 ≠0

o If we joint estimate b and X we will have a bias, in fact those variables will be correlated so E ¿. To solve

this issue we need to run two independent simulation, the first regressing Y on X to obtain “b” (n→∞ it converges to the correct value b) and the second running the simulation for the estimator itself

o The “b” comes from

V (Y i−b (X i−E (X ) ))=V (Y i )+V (b (X i−E ( X ) ))−2bCov (Y i ; X i )=σ y2+b2σ x

2−2bρσ y σ x,

now we can compute the FOC or just notice that it is a parabola so the vertex is the minimum as well.

Note that V (Y i (b ) )=σ y(1−ρ x, y2 )

Matching underling asset: the key idea is to match the moments of the underlying asset to reduce the risk of mispricing derivatives. There are two possibilities, both of them are assuming a Geometric Brownian motion:

o Simple Moment matching: Si (T )=Si (T )E [ S (T ) ]

Si (T ), (explaining Si (T )) this for the first matching (which

grants positive payoff), however it is hard for higher moment. Multiplicative correction.

Si (T )=S i (T )+E [S (T ) ]−S i (T ) Additive correction, however do not preserve positivity. Note that the

12

Page 13: Coding and Equity pricing

Giulio Laudani #14 Cod. 20247

first approach do not grant to the new parameter to be distributed as the original one, while the second does.

o Weighted MC: The paths’ Weighs Si (T) for i = 1; …; n with weights “wi” for i=1 ;…;n such that the

moments of S are matched and then use the same weights to estimate the expected payoff:

YWMC=∑ wiY i. Those weights are chosen to maximize the (negative entropy) distance from the

uniform distribution: ∑ wi ln (w i ) with the constrain ∑ wi=1∧∑ w i x i=μx

Basically we are forcing the estimator to have same ∑ wiS (tm)=S (0 ) er tm

We need to write the Lagrangian and find the FOC [ln wi−v−λ x i+1=0] and the result:

w i=e−1+ v+ λ xi but we can rewrite the risk aversion coefficient v as v=−ln (∑ λ x i) so

w i=1

∑ λ x1eλ x i

, by exploiting 1=∑ e−1+v+ λx i

Importance sampling (Weighted MC): we want to change the paths importance of f (X) that have greater impact on determining the expected value. We proceed to choose the weight as following:

o At first we compute the continuous mean ∫ f ( x ) f x (X )dx

o We apply the Ridon Nikodin derivatives to change the density measure: ∫ f ( x ) f x (X )g ( x )

g (x )dx the new

measure will be g ( x )dx=¿>Eg( f (x))

o The new target is Eg( f ( x ) f x (X )g ( x ) ) ,which is equal ¿ E (f ( x ) ) by the strong law of large numbers,

hence it is unbiased.

o Now we want to find the g(x) that minimize the variance14 we may chose the g ( x )=f ( x ) f x ( x )

a where

“a” is the expected value of f(x). However we cannot do that since we do not know the distribution ex-

ante, but we know that g(x) is proportional to f ( x ) f x (x). We can apply an exponential twisting the

g ( x )¿ f x ( x )eθx−φ (θ ), this rescaling function which depends only on one parameter.

First the function φ (θ ) is a parabola φ ¿ (also first derivatives are equivalent) to simplify the

computation. It is the moment generating function of X ¿ lnE (exθ )and it is distributed

according to a Normal. It is made to allow a decreasing mean before a key time, and increasing after to push the path closer to the significant path.

The new function will be ∫ f ( x ) f x(x )f x (x)e

θx−φ (θ ) g (x )dx=∫ 1eθx−φ (θ ) g ( x )dxnew target function.

Note that the multi-dimensional case is the one used, there will be an g(x) for each period considered

The θ is chosen depending on the underling dynamics and it will change depending on the event matching τ , this parameter is compute by doing the FOC for i<τ∧i>τ

There will two equation one for θ+¿∧θ−¿¿ ¿, and by exploiting the φ (θ )property, and

φ (θ )=(r−σ2

2 )∆ tθ+ σ2

2θ2∆ t we will have:

14 You have to consider the higher order among all the variable

13

Page 14: Coding and Equity pricing

Giulio Laudani #14 Cod. 20247

θ+,−¿=¿ ¿¿

The new variable x will be distrusted(under g measure) as a normal with same variance

∆ t σ2but different mean (r−σ2

2 )∆ t+∆ t σ 2θ

14