Thursday, February 22, 2018

programming - Finite Difference method in Matlab for SABR volatility model fails to provide correct option values



Currently, I'm trying to implement a Finite Difference (FD) method in Matlab for my thesis (Quantitative Finance). I implemented the FD method for Black-Scholes already and got correct results. However, I want to extend it to work for the SABR volatility model. Although some information on this model can be found on the internet, this mainly regards Hagan's approximate formula for EU options. I am particularly interested in the numerical solution (FD).


I have taken the following steps already:


Substitute the derivatives in the SABR PDE with their finite difference approximations. I used the so-called implicit method (https://en.wikipedia.org/wiki/Finite_difference_method#Implicit_method) for this. Possibility for variable transformation from F to x and α to y is incorporated in PDE discretization, but not applied yet (hence, xF=yα=1 and 2xF2=2yα2=0 in formulas below). Substituting forward difference in time and central differences in space dimensions and rewriting, gives me the following equation: Vi,j,k=Vi1,j1,k+1[c]+Vi,j1,k+1[d+e+g]+Vi+1,j1,k+1[c]+Vi1,j,k+1[a+b+f]+Vi,j,k+1[2a+2d+(1h)]+Vi+1,j,k+1[abf]+Vi1,j+1,k+1[c]+Vi,j+1,k+1[deg]+Vi+1,j+1,k+1[c],(1)

where


a=0.5σ2x1dx2(xF)2dτ


b=0.5σ2x12dx2xF2dτ


c=ρσxσyxFyα12dxdydτ


d=0.5σ2y1dy2(yα)2dτ


e=0.5σ2y12dy2yα2dτ


f=μxxF12dxdτ


g=μyyα12dydτ



h=rdt


Writing in matrix notation,


Vk+1=A1(VkCk+1)


Note that vector C contains the values that cannot be incorporated via the A matrix, as they depend on boundary grid points.


Edit June 19: Since my other post is focused on the upper boundary in F dimension, lets discuss upper bound in vol direction here, since @Yian_Pap provided an answer below regarding this. Note that I corrected the cross derivative, to be: 2VFα=Vi+1,j+1Vi+1,j1Vi1,j+1+Vi1,j12ΔFΔα, not containing Vi,j.


Now, as vol bound I set Vα=0.


Substituting second order accurate backward FD approximation,


1Δα(Vi,MVi,M1)=0,


since the term in front is not zero, it should hold that,


Vi,MVi,M1=0,



hence,


Vi,M=Vi,M1 (2),


This can be implemented in the coefficient matrix A. Given (1),


Vi,j,k=z1Vi1,j1,k+1+z2Vi,j1,k+1+z3Vi+1,j1,k+1+z4Vi1,j,k+1+z5Vi,j,k+1+z6Vi+1,j,k+1+z7Vi1,j+1,k+1+z8Vi,j+1,k+1+z9Vi+1,j+1,k+1,


Impose the condition (2) as follows:


Vi,M,k=z1Vi1,M1,k+1+z2Vi,M1,k+1+z3Vi+1,M1,k+1+(z4+z7)Vi1,M,k+1+(z5+z8)Vi,M,k+1+(z6+z9)Vi+1,M,k+1,


Main question: Am I implementing this bound correctly?


Side question: When setting ν=0 and β=1, z7, z8 and z9 are equal to zero, correct? So, in this case, boundary condition for vol will not affect FD results?


Best,


Pim





No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...