Abstract base class for the option stripper. More...
#include <qle/termstructures/eqcommoptionsurfacestripper.hpp>
Classes | |
class | PriceError |
Function object used in solving. More... | |
Public Member Functions | |
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={}) | |
LazyObject interface | |
QuantLib::ext::shared_ptr< OptionInterpolatorBase > | callSurface_ |
QuantLib::ext::shared_ptr< OptionInterpolatorBase > | putSurface_ |
const QuantLib::Calendar & | calendar_ |
const QuantLib::DayCounter & | dayCounter_ |
QuantLib::Exercise::Type | type_ |
bool | lowerStrikeConstExtrap_ |
bool | upperStrikeConstExtrap_ |
bool | timeFlatExtrapolation_ |
bool | preferOutOfTheMoney_ |
QuantLib::ext::shared_ptr< QuantLib::BlackVolTermStructure > | volSurface_ |
Brent | brent_ |
Solver used when implying volatility from price. More... | |
Solver1DOptions | solverOptions_ |
bool | havePrices_ |
Set to true if we must strip volatilities from prices. More... | |
std::function< Real(const PriceError &)> | solver_ |
Store the function that will be called each time to solve for volatility. More... | |
void | performCalculations () const override |
QuantLib::ext::shared_ptr< QuantLib::BlackVolTermStructure > | volSurface () |
Return the stripped volatility structure. More... | |
virtual QuantLib::ext::shared_ptr< QuantLib::GeneralizedBlackScholesProcess > | process (const QuantLib::ext::shared_ptr< QuantLib::SimpleQuote > &volatilityQuote) const =0 |
Generate the relevant Black Scholes process for the underlying. More... | |
virtual QuantLib::Real | forward (const QuantLib::Date &date) const =0 |
Return the forward price at a given date. More... | |
std::vector< QuantLib::Real > | strikes (const QuantLib::Date &expiry, bool isCall) const |
Retrieve the vector of strikes at a given expiry date. More... | |
QuantLib::Real | implyVol (QuantLib::Date expiry, QuantLib::Real strike, QuantLib::Option::Type type, QuantLib::ext::shared_ptr< QuantLib::PricingEngine > engine, QuantLib::SimpleQuote &volQuote) const |
void | setUpSolver () |
Abstract base class for the option stripper.
Definition at line 64 of file eqcommoptionsurfacestripper.hpp.
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 = {} |
||
) |
Definition at line 84 of file eqcommoptionsurfacestripper.cpp.
|
override |
Definition at line 141 of file eqcommoptionsurfacestripper.cpp.
QuantLib::ext::shared_ptr< BlackVolTermStructure > volSurface | ( | ) |
Return the stripped volatility structure.
Definition at line 307 of file eqcommoptionsurfacestripper.cpp.
|
protectedpure virtual |
Generate the relevant Black Scholes process for the underlying.
Implemented in EquityOptionSurfaceStripper, and CommodityOptionSurfaceStripper.
|
protectedpure virtual |
Return the forward price at a given date.
Implemented in EquityOptionSurfaceStripper, and CommodityOptionSurfaceStripper.
|
private |
Retrieve the vector of strikes at a given expiry date.
Definition at line 219 of file eqcommoptionsurfacestripper.cpp.
|
private |
Imply the volatility at a given expiry
and strike
for the given option type
. The exercise type is indicated by the member variable type_
and the target price is read off the relevant price surface i.e. either callSurface_
or putSurface_
.
If the root finding fails, a Null<Real>()
is returned.
Definition at line 233 of file eqcommoptionsurfacestripper.cpp.
|
private |
Definition at line 264 of file eqcommoptionsurfacestripper.cpp.
|
protected |
Definition at line 94 of file eqcommoptionsurfacestripper.hpp.
|
protected |
Definition at line 95 of file eqcommoptionsurfacestripper.hpp.
|
protected |
Definition at line 96 of file eqcommoptionsurfacestripper.hpp.
|
protected |
Definition at line 97 of file eqcommoptionsurfacestripper.hpp.
|
protected |
Definition at line 98 of file eqcommoptionsurfacestripper.hpp.
|
protected |
Definition at line 99 of file eqcommoptionsurfacestripper.hpp.
|
protected |
Definition at line 100 of file eqcommoptionsurfacestripper.hpp.
|
protected |
Definition at line 101 of file eqcommoptionsurfacestripper.hpp.
|
protected |
Definition at line 102 of file eqcommoptionsurfacestripper.hpp.
|
mutableprivate |
Definition at line 137 of file eqcommoptionsurfacestripper.hpp.
|
private |
Solver used when implying volatility from price.
Definition at line 140 of file eqcommoptionsurfacestripper.hpp.
|
private |
Definition at line 141 of file eqcommoptionsurfacestripper.hpp.
|
private |
Set to true
if we must strip volatilities from prices.
Definition at line 144 of file eqcommoptionsurfacestripper.hpp.
|
private |
Store the function that will be called each time to solve for volatility.
Definition at line 147 of file eqcommoptionsurfacestripper.hpp.