30 const Date& optionDate,
32 const std::vector<Rate>& strikes,
33 bool hasFloatingStrikes,
45 ext::shared_ptr<EndCriteria> endCriteria,
46 ext::shared_ptr<OptimizationMethod> method,
50 atmVolatility_(
std::move(atmVolatility)), volHandles_(volHandles), strikes_(strikes),
51 actualStrikes_(strikes), hasFloatingStrikes_(hasFloatingStrikes), vols_(volHandles.size()),
53 isBetaFixed_(isBetaFixed), isNuFixed_(isNuFixed), isRhoFixed_(isRhoFixed),
54 vegaWeighted_(vegaWeighted), endCriteria_(
std::move(endCriteria)), method_(
std::move(method)),
55 evaluationDate_(
Settings::instance().evaluationDate()) {
64 const Date& optionDate,
66 const std::vector<Rate>& strikes,
67 bool hasFloatingStrikes,
69 const std::vector<Volatility>& volHandles,
79 ext::shared_ptr<EndCriteria> endCriteria,
80 ext::shared_ptr<OptimizationMethod> method,
86 volHandles_(volHandles.size()), strikes_(strikes), actualStrikes_(strikes),
87 hasFloatingStrikes_(hasFloatingStrikes), vols_(volHandles.size()), alpha_(
alpha), beta_(
beta),
88 nu_(
nu), rho_(
rho), isAlphaFixed_(isAlphaFixed), isBetaFixed_(isBetaFixed),
89 isNuFixed_(isNuFixed), isRhoFixed_(isRhoFixed), vegaWeighted_(vegaWeighted),
90 endCriteria_(
std::move(endCriteria)), method_(
std::move(method)),
91 evaluationDate_(
Settings::instance().evaluationDate()) {
131 Real v = (*sabrInterpolation_)(strike,
true);
Shared handle to an observable.
virtual void calculate() const
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
purely virtual base class for market observables
SABR smile interpolation between discrete volatility points.
const Handle< Quote > forward_
Market data.
void performCalculations() const override
SabrInterpolatedSmileSection(const Date &optionDate, Handle< Quote > forward, const std::vector< Rate > &strikes, bool hasFloatingStrikes, Handle< Quote > atmVolatility, const std::vector< Handle< Quote > > &volHandles, Real alpha, Real beta, Real nu, Real rho, bool isAlphaFixed=false, bool isBetaFixed=false, bool isNuFixed=false, bool isRhoFixed=false, bool vegaWeighted=true, ext::shared_ptr< EndCriteria > endCriteria=ext::shared_ptr< EndCriteria >(), ext::shared_ptr< OptimizationMethod > method=ext::shared_ptr< OptimizationMethod >(), const DayCounter &dc=Actual365Fixed(), Real shift=0.0)
all market data are quotes
const ext::shared_ptr< EndCriteria > endCriteria_
bool isAlphaFixed_
Sabr interpolation settings.
ext::shared_ptr< SABRInterpolation > sabrInterpolation_
void createInterpolation() const
Creates the mutable SABRInterpolation.
std::vector< Rate > actualStrikes_
Only strikes corresponding to valid market data.
const ext::shared_ptr< OptimizationMethod > method_
Real varianceImpl(Rate strike) const override
Real alpha_
Sabr parameters.
std::vector< Volatility > vols_
std::vector< Rate > strikes_
const Handle< Quote > atmVolatility_
std::vector< Handle< Quote > > volHandles_
global repository for run-time library settings
market element returning a stored value
interest rate volatility smile section
virtual Time exerciseTime() const
virtual Rate shift() const
Real Volatility
volatility
std::size_t Size
size of a container
void swap(Array &v, Array &w) noexcept
ext::shared_ptr< BlackVolTermStructure > v
Interpolated smile section class.
global repository for run-time library settings