28 const Date& optionDate,
30 const std::vector<Rate>& strikes,
31 bool hasFloatingStrikes,
45 ext::shared_ptr<EndCriteria> endCriteria,
46 ext::shared_ptr<OptimizationMethod> method,
49 atmVolatility_(
std::move(atmVolatility)), volHandles_(volHandles), strikes_(strikes),
50 actualStrikes_(strikes), hasFloatingStrikes_(hasFloatingStrikes), vols_(volHandles.size()),
52 isSigmaFixed_(isSigmaFixed), isRhoFixed_(isRhoFixed), isMFixed_(isMFixed),
53 vegaWeighted_(vegaWeighted), endCriteria_(
std::move(endCriteria)),
54 method_(
std::move(method)) {
63 const Date& optionDate,
65 const std::vector<Rate>& strikes,
66 bool hasFloatingStrikes,
68 const std::vector<Volatility>& volHandles,
80 ext::shared_ptr<EndCriteria> endCriteria,
81 ext::shared_ptr<OptimizationMethod> method,
86 volHandles_(volHandles.size()), strikes_(strikes), actualStrikes_(strikes),
87 hasFloatingStrikes_(hasFloatingStrikes), vols_(volHandles.size()),
a_(a),
b_(
b),
89 isSigmaFixed_(isSigmaFixed), isRhoFixed_(isRhoFixed), isMFixed_(isMFixed),
90 vegaWeighted_(vegaWeighted), endCriteria_(
std::move(endCriteria)),
91 method_(
std::move(method)) {
131 Real v = (*sviInterpolation_)(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
market element returning a stored value
interest rate volatility smile section
virtual Time exerciseTime() const
const Handle< Quote > forward_
Market data.
void performCalculations() const override
ext::shared_ptr< SviInterpolation > sviInterpolation_
const ext::shared_ptr< EndCriteria > endCriteria_
SviInterpolatedSmileSection(const Date &optionDate, Handle< Quote > forward, const std::vector< Rate > &strikes, bool hasFloatingStrikes, Handle< Quote > atmVolatility, const std::vector< Handle< Quote > > &volHandles, Real a, Real b, Real sigma, Real rho, Real m, bool aIsFixed, bool bIsFixed, bool sigmaIsFixed, bool rhoIsFixed, bool mIsFixed, 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
void createInterpolation() const
Creates the mutable SviInterpolation.
std::vector< Rate > actualStrikes_
Only strikes corresponding to valid market data.
const ext::shared_ptr< OptimizationMethod > method_
Real varianceImpl(Rate strike) const override
std::vector< Volatility > vols_
bool isAFixed_
Svi interpolation settings.
std::vector< Rate > strikes_
const Handle< Quote > atmVolatility_
std::vector< Handle< Quote > > volHandles_
Svi smile interpolation between discrete volatility points.
ext::function< Real(Real)> b
Real Volatility
volatility
std::size_t Size
size of a container
void swap(Array &v, Array &w) noexcept
ext::shared_ptr< BlackVolTermStructure > v
global repository for run-time library settings
svi interpolating smile section