28 const Date& optionDate,
30 const std::vector<Rate>& strikes,
31 bool hasFloatingStrikes,
43 ext::shared_ptr<EndCriteria> endCriteria,
44 ext::shared_ptr<OptimizationMethod> method,
47 atmVolatility_(
std::move(atmVolatility)), volHandles_(volHandles), strikes_(strikes),
48 actualStrikes_(strikes), hasFloatingStrikes_(hasFloatingStrikes), vols_(volHandles.size()),
50 isBetaFixed_(isBetaFixed), isNuFixed_(isNuFixed), isRhoFixed_(isRhoFixed),
51 vegaWeighted_(vegaWeighted), endCriteria_(
std::move(endCriteria)),
52 method_(
std::move(method)) {
61 const Date& optionDate,
63 const std::vector<Rate>& strikes,
64 bool hasFloatingStrikes,
66 const std::vector<Volatility>& volHandles,
76 ext::shared_ptr<EndCriteria> endCriteria,
77 ext::shared_ptr<OptimizationMethod> method,
82 volHandles_(volHandles.size()), strikes_(strikes), actualStrikes_(strikes),
83 hasFloatingStrikes_(hasFloatingStrikes), vols_(volHandles.size()), alpha_(
alpha), beta_(
beta),
84 nu_(
nu), rho_(
rho), isAlphaFixed_(isAlphaFixed), isBetaFixed_(isBetaFixed),
85 isNuFixed_(isNuFixed), isRhoFixed_(isRhoFixed), vegaWeighted_(vegaWeighted),
86 endCriteria_(
std::move(endCriteria)), method_(
std::move(method)) {
126 Real v = (*noArbSabrInterpolation_)(strike,
true);
Shared handle to an observable.
virtual void calculate() const
const Handle< Quote > forward_
Market data.
void performCalculations() const override
const ext::shared_ptr< EndCriteria > endCriteria_
bool isAlphaFixed_
Sabr interpolation settings.
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_
NoArbSabrInterpolatedSmileSection(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())
all market data are quotes
ext::shared_ptr< NoArbSabrInterpolation > noArbSabrInterpolation_
std::vector< Rate > strikes_
const Handle< Quote > atmVolatility_
std::vector< Handle< Quote > > volHandles_
no arbitrage sabr smile interpolation between discrete volatility points.
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
purely virtual base class for market observables
market element returning a stored value
interest rate volatility smile section
virtual Time exerciseTime() const
Real Volatility
volatility
std::size_t Size
size of a container
void swap(Array &v, Array &w) noexcept
noarb sabr interpolating smile section
ext::shared_ptr< BlackVolTermStructure > v
global repository for run-time library settings