FxEq Option Helper.
More...
#include <qle/models/fxeqoptionhelper.hpp>
|
| FxEqOptionHelper (const Period &maturity, const Calendar &calendar, const Real strike, const Handle< Quote > spot, const Handle< Quote > volatility, const Handle< YieldTermStructure > &domesticYield, const Handle< YieldTermStructure > &foreignYield, BlackCalibrationHelper::CalibrationErrorType errorType=BlackCalibrationHelper::RelativePriceError) |
|
| FxEqOptionHelper (const Date &exerciseDate, const Real strike, const Handle< Quote > spot, const Handle< Quote > volatility, const Handle< YieldTermStructure > &domesticYield, const Handle< YieldTermStructure > &foreignYield, BlackCalibrationHelper::CalibrationErrorType errorType=BlackCalibrationHelper::RelativePriceError) |
|
void | addTimesTo (std::list< Time > &) const override |
|
void | performCalculations () const override |
|
Real | modelValue () const override |
|
Real | blackPrice (Real volatility) const override |
|
QuantLib::ext::shared_ptr< VanillaOption > | option () const |
|
Real | strike () const |
|
FxEq Option Helper.
Definition at line 36 of file fxeqoptionhelper.hpp.
◆ FxEqOptionHelper() [1/2]
FxEqOptionHelper |
( |
const Period & |
maturity, |
|
|
const Calendar & |
calendar, |
|
|
const Real |
strike, |
|
|
const Handle< Quote > |
spot, |
|
|
const Handle< Quote > |
volatility, |
|
|
const Handle< YieldTermStructure > & |
domesticYield, |
|
|
const Handle< YieldTermStructure > & |
foreignYield, |
|
|
BlackCalibrationHelper::CalibrationErrorType |
errorType = BlackCalibrationHelper::RelativePriceError |
|
) |
| |
the spot is interpreted as of today (or discounted spot) if strike is null, an (fwd-) atm option is constructed, a slight approximation is introduced because there is no settlement lag, however this applies consistently to the black and the model pricing
Definition at line 28 of file fxeqoptionhelper.cpp.
37}
const Handle< Quote > spot_
const Handle< YieldTermStructure > foreignYield_
Handle< YieldTermStructure > termStructure_
◆ FxEqOptionHelper() [2/2]
FxEqOptionHelper |
( |
const Date & |
exerciseDate, |
|
|
const Real |
strike, |
|
|
const Handle< Quote > |
spot, |
|
|
const Handle< Quote > |
volatility, |
|
|
const Handle< YieldTermStructure > & |
domesticYield, |
|
|
const Handle< YieldTermStructure > & |
foreignYield, |
|
|
BlackCalibrationHelper::CalibrationErrorType |
errorType = BlackCalibrationHelper::RelativePriceError |
|
) |
| |
◆ addTimesTo()
void addTimesTo |
( |
std::list< Time > & |
| ) |
const |
|
override |
◆ performCalculations()
void performCalculations |
( |
| ) |
const |
|
override |
Definition at line 49 of file fxeqoptionhelper.cpp.
49 {
58 QuantLib::ext::shared_ptr<StrikedTypePayoff> payoff(
new PlainVanillaPayoff(
type_,
effStrike_));
59 QuantLib::ext::shared_ptr<Exercise> exercise = QuantLib::ext::make_shared<EuropeanExercise>(
exerciseDate_);
60 option_ = QuantLib::ext::shared_ptr<VanillaOption>(
new VanillaOption(payoff, exercise));
61 BlackCalibrationHelper::performCalculations();
62}
QuantLib::ext::shared_ptr< VanillaOption > option_
◆ modelValue()
Real modelValue |
( |
| ) |
const |
|
override |
Definition at line 64 of file fxeqoptionhelper.cpp.
64 {
65 calculate();
68}
QuantLib::ext::shared_ptr< PricingEngine > engine_
◆ blackPrice()
Real blackPrice |
( |
Real |
volatility | ) |
const |
|
override |
◆ option()
QuantLib::ext::shared_ptr< VanillaOption > option |
( |
| ) |
const |
◆ strike()
◆ termStructure_
Handle<YieldTermStructure> termStructure_ |
|
private |
◆ hasMaturity_
◆ maturity_
◆ exerciseDate_
◆ calendar_
◆ strike_
◆ spot_
const Handle<Quote> spot_ |
|
private |
◆ foreignYield_
const Handle<YieldTermStructure> foreignYield_ |
|
private |
◆ tau_
◆ atm_
◆ type_
◆ option_
QuantLib::ext::shared_ptr<VanillaOption> option_ |
|
mutableprivate |
◆ effStrike_