30 PriceError(
const PricingEngine& engine,
41 PriceError::PriceError(
const PricingEngine& engine,
46 dynamic_cast<const Instrument::results*
>(
engine_.getResults());
50 Real PriceError::operator()(Volatility x)
const {
74 PriceError
f(engine, volQuote, targetValue);
83 ext::shared_ptr<GeneralizedBlackScholesProcess>
84 ImpliedVolatilityHelper::clone(
85 const ext::shared_ptr<GeneralizedBlackScholesProcess>& process,
86 const ext::shared_ptr<SimpleQuote>& volQuote) {
94 ext::shared_ptr<BlackVolTermStructure>(
98 blackVol->dayCounter())));
100 return ext::make_shared<GeneralizedBlackScholesProcess>(
101 stateVariable, dividendYield,
102 riskFreeRate, volatility);
Black constant volatility, no time dependence, no strike dependence.
ext::shared_ptr< SimpleQuote > vol_
ext::shared_ptr< PricingEngine > engine_
const Instrument::results * results_
Constant Black volatility, no time-strike dependence.
Shared handle to an observable.
Abstract instrument class.
virtual void setupArguments(PricingEngine::arguments *) const
virtual void validate() const =0
interface for pricing engines
virtual arguments * getArguments() const =0
market element returning a stored value
void setMaxEvaluations(Size evaluations)
Real solve(const F &f, Real accuracy, Real guess, Real step) const
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
unsigned QL_INTEGER Natural
positive integer
Real Volatility
volatility
const PricingEngine & engine_
const Instrument::results * results_
Utilities for implied-volatility calculation.