BicubicSpline default constructor

Posted by Lapin on
URL: http://quantlib.414.s1.nabble.com/BicubicSpline-default-constructor-tp1344.html

Hi,

I am trying to use the local vol surface object of quantlib.
It turns that there is some issues during the calibration mainly because the second derivative of the variance with respect to the log moneyness is highly negative.
This comes from my data and also from the fact we use by default the Bilinear interpolator for the variance surface.

I am trying to change the interpolator into BicubicSpline, but the compiler tells me the default constructor is missing.

error C2512: 'QuantLib::BicubicSpline::BicubicSpline' : no appropriate default constructor available

I have included my code. If someone has an idea, please be my guest.

//Create a Black Variance Surface
boost::shared_ptr<BlackVarianceSurface>        BSSurface( new BlackVarianceSurface( today ,
                                                                        option_maturities ,
                                                                        option_strikes ,
                                                                        volatilities ,
                                                                        dayCounter) ) ;
               
//Set the interpolation in order to avoid the local volatility calibration to fail
//Otherwise the second order derivative might be big and negative

BSSurface->setInterpolation<BicubicSpline>() ;

Thanks in advance