#include <qle/termstructures/eqcommoptionsurfacestripper.hpp>
|
| CommodityOptionSurfaceStripper (const QuantLib::Handle< QuantExt::PriceTermStructure > &priceCurve, const QuantLib::Handle< QuantLib::YieldTermStructure > &discountCurve, const QuantLib::ext::shared_ptr< OptionInterpolatorBase > &callSurface, const QuantLib::ext::shared_ptr< OptionInterpolatorBase > &putSurface, const QuantLib::Calendar &calendar, const QuantLib::DayCounter &dayCounter, QuantLib::Exercise::Type type=QuantLib::Exercise::European, bool lowerStrikeConstExtrap=true, bool upperStrikeConstExtrap=true, bool timeFlatExtrapolation=false, bool preferOutOfTheMoney=false, Solver1DOptions solverOptions={}) |
|
| OptionSurfaceStripper (const QuantLib::ext::shared_ptr< OptionInterpolatorBase > &callSurface, const QuantLib::ext::shared_ptr< OptionInterpolatorBase > &putSurface, const QuantLib::Calendar &calendar, const QuantLib::DayCounter &dayCounter, QuantLib::Exercise::Type type=QuantLib::Exercise::European, bool lowerStrikeConstExtrap=true, bool upperStrikeConstExtrap=true, bool timeFlatExtrapolation=false, bool preferOutOfTheMoney=false, Solver1DOptions solverOptions={}) |
|
void | performCalculations () const override |
|
QuantLib::ext::shared_ptr< QuantLib::BlackVolTermStructure > | volSurface () |
| Return the stripped volatility structure. More...
|
|
|
QuantLib::Handle< QuantExt::PriceTermStructure > | priceCurve_ |
|
QuantLib::Handle< QuantLib::YieldTermStructure > | discountCurve_ |
|
QuantLib::ext::shared_ptr< QuantLib::GeneralizedBlackScholesProcess > | process (const QuantLib::ext::shared_ptr< QuantLib::SimpleQuote > &volatilityQuote) const override |
| Generate the relevant Black Scholes process for the underlying. More...
|
|
QuantLib::Real | forward (const QuantLib::Date &date) const override |
| Return the forward price at a given date. More...
|
|
◆ CommodityOptionSurfaceStripper()
CommodityOptionSurfaceStripper |
( |
const QuantLib::Handle< QuantExt::PriceTermStructure > & |
priceCurve, |
|
|
const QuantLib::Handle< QuantLib::YieldTermStructure > & |
discountCurve, |
|
|
const QuantLib::ext::shared_ptr< OptionInterpolatorBase > & |
callSurface, |
|
|
const QuantLib::ext::shared_ptr< OptionInterpolatorBase > & |
putSurface, |
|
|
const QuantLib::Calendar & |
calendar, |
|
|
const QuantLib::DayCounter & |
dayCounter, |
|
|
QuantLib::Exercise::Type |
type = QuantLib::Exercise::European , |
|
|
bool |
lowerStrikeConstExtrap = true , |
|
|
bool |
upperStrikeConstExtrap = true , |
|
|
bool |
timeFlatExtrapolation = false , |
|
|
bool |
preferOutOfTheMoney = false , |
|
|
Solver1DOptions |
solverOptions = {} |
|
) |
| |
Definition at line 343 of file eqcommoptionsurfacestripper.cpp.
357 upperStrikeConstExtrap, timeFlatExtrapolation, preferOutOfTheMoney, solverOptions),
361}
QuantLib::Handle< QuantExt::PriceTermStructure > priceCurve_
QuantLib::Handle< QuantLib::YieldTermStructure > discountCurve_
OptionSurfaceStripper(const QuantLib::ext::shared_ptr< OptionInterpolatorBase > &callSurface, const QuantLib::ext::shared_ptr< OptionInterpolatorBase > &putSurface, const QuantLib::Calendar &calendar, const QuantLib::DayCounter &dayCounter, QuantLib::Exercise::Type type=QuantLib::Exercise::European, bool lowerStrikeConstExtrap=true, bool upperStrikeConstExtrap=true, bool timeFlatExtrapolation=false, bool preferOutOfTheMoney=false, Solver1DOptions solverOptions={})
◆ process()
QuantLib::ext::shared_ptr< GeneralizedBlackScholesProcess > process |
( |
const QuantLib::ext::shared_ptr< QuantLib::SimpleQuote > & |
volatilityQuote | ) |
const |
|
overrideprotectedvirtual |
Generate the relevant Black Scholes process for the underlying.
Implements OptionSurfaceStripper.
Definition at line 363 of file eqcommoptionsurfacestripper.cpp.
364 {
365
366 QL_REQUIRE(!
priceCurve_.empty(),
"CommodityOptionSurfaceStripper: price curve is empty");
367 QL_REQUIRE(!
discountCurve_.empty(),
"CommodityOptionSurfaceStripper: discount curve is empty");
368
369
370 Handle<BlackVolTermStructure> vts(QuantLib::ext::make_shared<BlackConstantVol>(
372
373
374 Handle<Quote> spot(QuantLib::ext::make_shared<DerivedPriceQuote>(
priceCurve_));
376 yield->enableExtrapolation();
377
378 return QuantLib::ext::make_shared<QuantLib::GeneralizedBlackScholesProcess>(spot, yield,
discountCurve_, vts);
379}
const QuantLib::DayCounter & dayCounter_
const QuantLib::Calendar & calendar_
QuantLib::ext::shared_ptr< OptionInterpolatorBase > callSurface_
◆ forward()
Real forward |
( |
const QuantLib::Date & |
date | ) |
const |
|
overrideprotectedvirtual |
◆ priceCurve_
◆ discountCurve_
QuantLib::Handle<QuantLib::YieldTermStructure> discountCurve_ |
|
private |