02 - Stochastic Differential Equation - Part II

Some more examples of ito integrals.
Author

Francois de Ryckel

Published

July 22, 2023

Modified

August 12, 2023

V(S) when S is a SDE - Itô III

Let V be a function of S where S satisfies the stochastic differential equation dS=μS dt+σS dX(t) Note how in this case μ and σ are constants. In more elaborate models, both can be time-dependent variables and be stochastic themselves.

Using a one-dimension Taylor Series expansion, we can write V(S+dS)V(S)+dVdS dS+12d2VdS2 dS2

To express dS2? dS2=(dS)2=μ2S2 dt2+2μσS2 dtdX(t)+σ2S2 dX(t)2

(1)dS2=σ2S2 dX(t)2=σ2S2 dt

Tip

We could generalize this a bit further Let’s have a function dGt=A(t,Xt) dt+B(t,Xt) dWt

Then E[dGt]=E[A dt]+E[B dWt]=A E[dt]+B E[dWt]

Recall that E[dWt]=0, hence E[dGt]=A E[dt] Considering the variance, we can write Var[dGt]=Var[A dt]+Var[B dWt]=A2 Var[dt]+B2 Var[dWt]=B2 dt Recall that Var[dt]=0, hence Var[dGt]=B2 Var[dWt]

Going back to our expansion and considering dV=V(S+dS)V(S): dV=dVdS (μS dt+σS dX(t))+12d2VdS2 (σ2S2 dt) (2)dV=(μSdVdS+12σ2S2d2VdS2)dt+(σSdVdS)dX(t)

Example

Let V(S)=log(S) with S satisfies the usual SDE: dS=μSdt+σSdXt. We can then use the above SDE form.

dVdS=1S d2VdS2=1S2

Using above : dV=(μS1S+12σ2S21S2)dt+(σS1S)dX(t) dV=(μ12σ2)dt+σdX(t) Using the integral form:

0td(log S)=0tμ12σ2 dτ+0tσ dX(τ) log(St)log(S0)=μt12σ2t+σ(XtX0) log(StS0)=μt12σ2t+σ(XtX0) St=S0eμt12σ2t+σ(XtX0)

Using X0=0 and Xt=ϕt: St=S0eμt12σ2t+σϕt

Another example with interest rate

Vasicek model

This model developed in 1978 by Vasicek is about interest rate.

The basic SDE takes this form (3)dr=(ηγr)dt+σdX In this model, η, γ and σ are all constant.

  • γ is the speed of reversion to the (long term) mean rate. It’s the rate of reversion.
  • we demote r¯ the mean interest rate such that r¯=ηγ

(4)dr=γ(r¯r) dt+σ dX

If we let u=rr¯, then du=dr because we consider r¯ as a constant. Hence du=γu dt+σdX du+γudt=σdX
eγtdu+γueγtdt=eγtσdX d(ueγt)=σeγtdX 0td(useγs)=σ0teγsdXs u(t)eγtu(0)=σ0teγsdXs u(t)=u(0)eγt+σ0teγ(st)dXs

V(t,S) when S is a SDE - Itô IV

This time V is a function of both time t and S which satisfies the usual SDE: dS=μSdt+σSdXt

We can also do a Taylor Series expansion on this. And recall when dealing with dS2

V(S+dS,t+dt)V(S,t)+VSdS+Vtdt+122VS2dS2 V(S+dS,t+dt)V(S,t)VSdS+Vtdt+122VS2σ2S2dt

dV=(Vt+122VS2σ2S2)dt+VSdS

dV=(Vt+122VS2σ2S2)dt+VS(μSdt+σSdXt) (5)dV=(Vt+122VS2σ2S2+μSVS)dt+σSVSdXt

Transition probabilty function as ODE

For background on the transition probability function, check this post

Recall from the above linked post that y,t are current state and y,t are future values.
The transition probabilty function was expressed as a partial differential equation of the form Pt=C22Py2 which was the FKE.

In the case of our usual Stochastic Differential Equation, which we write under a more general form like dY=A(y,t) dt+B(y,t) dWt We can find that the transition probability function satisfies the following Partial differential equation: (6)Pt=122(B(y,t)2p)y2(A(y,t)p)y

In our financial model, we’ll apply with the usual SDE dS=μS dt+σS dWt. Remember that μ and σ are constant here.

Pt=122(σ2S2p)S2(μSp)S

The solution to this partial differential equation has been developed in the trinomial post:

(7)p(S,t;S,t)=1σS2π(tt)elog(SS)+(μ+12σ2)2σ2(tt)

Steady-state

In some case, there are situation (random-walk) with a long term mean reversal - we say that they have a steady state distribution. This means that in the long run, the p(y,t;y,t) doesn’t depend of the starting point y,t; the probability becomes time independent. Think of situations such as interest rate and volatility.

In the case of a steady state situation, Pt=0 since the process becomes time independent in the long run. And the probability (now written $p_{} (y’) )satisfiestheordinarydifferentialequation:12d(B(y)2p)dy2d(A(y)p)dy=0$ {#eq-FKE2} It isn’t anymore a partial differential equation as the time component vanishes (aka steady-state, long-term reversal)

Vasicek revisited

Recall from above the Vasicek model dr=γ(r¯r) dt+σ dWt Using ?@eq-FKE2, we can write the steady state distribution pr following ordinary differential equation. 12σ2d2pdr2γd((r¯r)p)dr=0 Integrating both sides, we get: 12σ2dpdr+γ(rr¯)p=K K being a constant. 12σ2dpdr=γ(rr¯)p+K Letting the constant be 0 (need explanation here) Letting the just for convenience purposes.

1pdp=2γσ2(rr¯) dr Integrating both sides, 1pdp=2γσ2(rr¯) dr log(p)=2γσ212(rr¯)2+K Using a normalizing constant, as we inverse the log (8)p(r)=Aeγσ2(rr¯)2

We know that Rp(r)dr=1, hence Aeγσ2(rr¯)2dr=1 We can integrate this using substitution u=γ (rr¯)σ with dudr=γσ Aeu2σγdu=1 Aσγeu2du=1 Aσγπ=1 A=γσπ=1σγπ

Putting it all back together in : p(r)=Aeγσ2(rr¯)2=1σγπeγσ2(rr¯)2 This means: in our case of a steady state stochastic process, the variable r follows a normal distribution with mean \bar{r}} and standard deviation σ2γ

V(t,S1,S2) Modeling correlated random walks

We have now 2 assets

{dS1=μ1S1 dt+σ1S1 dX1dS2=μ2S2 dt+σ2S2 dX2

Using a Taylor series expansion V(t+dt,S1+dS1,S2+dS2)V(t,S1,S2)+Vtdt+VS1dS1+VS2dS2+122VS12dS12+122VS22dS22+2VS1S2dS1dS2 (9)dV=Vtdt+VS1dS1+VS2dS2+122VS12dS12+122VS22dS22+2VS1S2dS1dS2

Now we can write down some results we’ll plug into that expansion

  • dSi=μiSi dt+σiSi dXi
  • Using , we write dSi2=σi2Si2dt
  • Letting E[ϕ1ϕ2]=ρ, we write E[dX1dX2]=E[ϕ1dtϕ2dt]=ρ dt
  • Recall that all terms less than dt = 0. Hence in the product dS1dS2=(μ1S1 dt+σ1S1 dX1)(μ2S2 dt+σ2S2 dX2), the only term that we are considering is the outter product σ1S1 dX1σ2S2 dX2. Finally, re-using above result, dS1dS2=ρσ1σ2S1S2dt.

Re-writing by substituting dS1 and dS2, and factoring the terms in dt and those in dXt, we get: dV=(Vt+μ1S1VS1+μ2S2VS2+σ12S122VS12+σ22S222VS22+ρσ1σ2S1S22VS1S2)dt+(σ1S1VS1dX1+σ2S2VS2dX2)

Itô