1
$\begingroup$

I am testing spline interpolation for volatility surface with Matlab griddedInterpolant function with spline as interpolation and extrapolation method.

Here is the original data I used to do interpolation.

enter image description here

I used tenor = 147 to test.Most of interpolated data are good. But there are still outliers such as the points at 70 and 85. And It seems the extrapolation result from matlab is not quite right.

something I did is not correct?

Here is my matlab code

data = xlsread('researchData.xlsx');
tenors = data(2:end,1);
strikes = data(1,2:end);
[tenors,strikes]=ndgrid(tenors,strikes);
F = griddedInterpolant(tenors,strikes,data(2:end,2:end),'spline','spline');

targetStrike = [60,70,85,90,91,100,103,105,110,115,125,170]';
targettenor = ones(length(targetStrike),1) * 147;
interpVol = F(targettenor,targetStrike);
interpVol = interpVol';

enter image description here

$\endgroup$
6
  • $\begingroup$ This doesn't look good, no. How did you create the plot? $\endgroup$
    – Bob Jansen
    Mar 28, 2019 at 14:46
  • $\begingroup$ @BobJansen I generated interpolated data in Matlab and scatter plot in Excel $\endgroup$
    – Jason Chen
    Mar 28, 2019 at 14:56
  • $\begingroup$ Aha, I think it would be helpful if you show how you interpolated the data in MATLAB. $\endgroup$
    – Bob Jansen
    Mar 28, 2019 at 15:09
  • 1
    $\begingroup$ @BobJansen I just added my MATLAB code. $\endgroup$
    – Jason Chen
    Mar 28, 2019 at 15:19
  • $\begingroup$ What else should your plot look like? Given your input data, which is matched by the spline, that is exactly what you would expect. So I guess you did nothing wrong with the interpolation. Maybe you should take another look at your input data especially the orange points at 170 and 70 look somewhat "wrong". And an extrapolation with splines is always problematic since it tends to show weird behavior like exploding values or even negative ones and offers posibilities for arbitrage. Maybe you could think about clamped splines. $\endgroup$
    – JohnDoe
    Mar 29, 2019 at 11:18

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.