G2++ calibration with normal vols

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

G2++ calibration with normal vols

vegastar314159

Hi,
I’m trying to use QuantLib 1.6 to calibrate G2++ with european  swaptions in the current market condition where we have negative swap rates.
 I wrote my code like the one for Bermudan Swaptions example and  I provide ATM bp vols. When the calibration starts, it fails as the strikes are negative.
 If fails as it uses the blackformula object where the function checkParameters is called in the function blackFormula. 
QL_REQUIRE(strike + displacement >= 0.0,
                   "strike + displacement (" << strike << " + " << displacement
                                             << ") must be non-negative");
The value of the strike is negative, and the displacement = 0. I saw that we have in the same class, a function named bachelierBlackFormula that does not require any special condition on the strike.
Question : how can I make quantlib call this function instead of blackFormula when creating swaption engines?
 
Many thanks in advance for your answer and suggestions.  
 Kind regards,
MG

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: G2++ calibration with normal vols

Luigi Ballabio
Hello,
    a Bachelier swaption engine will be available in next release. In the meantime, you can check the current master out of GitHub if you want to use it.

Luigi


On Fri, Mar 4, 2016 at 2:20 PM <[hidden email]> wrote:

Hi,
I’m trying to use QuantLib 1.6 to calibrate G2++ with european  swaptions in the current market condition where we have negative swap rates.
 I wrote my code like the one for Bermudan Swaptions example and  I provide ATM bp vols. When the calibration starts, it fails as the strikes are negative.
 If fails as it uses the blackformula object where the function checkParameters is called in the function blackFormula. 
QL_REQUIRE(strike + displacement >= 0.0,
                   "strike + displacement (" << strike << " + " << displacement
                                             << ") must be non-negative");
The value of the strike is negative, and the displacement = 0. I saw that we have in the same class, a function named bachelierBlackFormula that does not require any special condition on the strike.
Question : how can I make quantlib call this function instead of blackFormula when creating swaption engines?
 
Many thanks in advance for your answer and suggestions.  
 Kind regards,
MG
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users