Max
2007-10-03 15:33:45 UTC
Hi,
I am using QuantLib-0.8.1 on cygwin platform.
I have written a simple C++ program to construct volatility surface using
Bilinear (default method) and Bicubic interpolation.
However, the result from Bicubic method is unsatisfactory, while Bilinear
method works fine.
Here is the way how I set up BlackVarianceSurface class:
boost::shared_ptr<BlackVarianceSurface> bVarSurface(
new BlackVarianceSurface(settlementDate, dates,
strikes, vols, dayCounter));
// change interpolation method to Bicubic
bVarSurface->setInterpolation<Bicubic>();
Handle<BlackVolTermStructure> blackSurface(bVarSurface);
Say, for the following simple data set:
strike 1M 3M
90 0.29 0.27
95 0.26 0.25
For Bilinear, blackSurface->blackVol(1/12, 90, true) returns 0.29, which is
correct.
However, for Bicubic, blackSurface->blackVol(1/12, 90, true) returns 0,
which is definitely wrong.
Does this suggest that Bicubic interpolation is broken for volatility
surface? Or any mistake in my coding?
Thanks in advance!
Best regards,
Max
I am using QuantLib-0.8.1 on cygwin platform.
I have written a simple C++ program to construct volatility surface using
Bilinear (default method) and Bicubic interpolation.
However, the result from Bicubic method is unsatisfactory, while Bilinear
method works fine.
Here is the way how I set up BlackVarianceSurface class:
boost::shared_ptr<BlackVarianceSurface> bVarSurface(
new BlackVarianceSurface(settlementDate, dates,
strikes, vols, dayCounter));
// change interpolation method to Bicubic
bVarSurface->setInterpolation<Bicubic>();
Handle<BlackVolTermStructure> blackSurface(bVarSurface);
Say, for the following simple data set:
strike 1M 3M
90 0.29 0.27
95 0.26 0.25
For Bilinear, blackSurface->blackVol(1/12, 90, true) returns 0.29, which is
correct.
However, for Bicubic, blackSurface->blackVol(1/12, 90, true) returns 0,
which is definitely wrong.
Does this suggest that Bicubic interpolation is broken for volatility
surface? Or any mistake in my coding?
Thanks in advance!
Best regards,
Max