SingleAssetOption Class Reference

#include <ql/Pricers/singleassetoption.hpp>

Inheritance diagram for SingleAssetOption:

Inheritance graph
[legend]
List of all members.

Detailed Description

Black-Scholes-Merton option.


Public Member Functions

 SingleAssetOption (Option::Type type, Real underlying, Real strike, Spread dividendYield, Rate riskFreeRate, Time residualTime, Volatility volatility)
virtual void setVolatility (Volatility newVolatility)
virtual void setRiskFreeRate (Rate newRate)
virtual void setDividendYield (Rate newDividendYield)
virtual Real value () const =0
virtual Real delta () const =0
virtual Real gamma () const =0
virtual Real theta () const
virtual Real vega () const
virtual Real rho () const
virtual Real dividendRho () const
Volatility impliedVolatility (Real targetValue, Real accuracy=1e-4, Size maxEvaluations=100, Volatility minVol=QL_MIN_VOLATILITY, Volatility maxVol=QL_MAX_VOLATILITY) const
Spread impliedDivYield (Real targetValue, Real accuracy=1e-4, Size maxEvaluations=100, Spread minYield=QL_MIN_DIVYIELD, Spread maxYield=QL_MAX_DIVYIELD) const
virtual boost::shared_ptr<
SingleAssetOption
clone () const =0

Protected Attributes

Real underlying_
PlainVanillaPayoff payoff_
Spread dividendYield_
Rate riskFreeRate_
Time residualTime_
Volatility volatility_
bool hasBeenCalculated_
Real rho_
Real dividendRho_
Real vega_
Real theta_
bool rhoComputed_
bool dividendRhoComputed_
bool vegaComputed_
bool thetaComputed_

Static Protected Attributes

const Real dVolMultiplier_
const Real dRMultiplier_


Member Function Documentation

Volatility impliedVolatility Real  targetValue,
Real  accuracy = 1e-4,
Size  maxEvaluations = 100,
Volatility  minVol = QL_MIN_VOLATILITY,
Volatility  maxVol = QL_MAX_VOLATILITY
const
 

Warning:
Options with a gamma that changes sign have values that are not monotonic in the volatility, e.g binary options. In these cases impliedVolatility can fail and in any case is meaningless. Another possible source of failure is to have a targetValue that is not attainable with any volatility, e.g. a targetValue lower than the intrinsic value in the case of American options.


QuantLib.org
QuantLib
Hosted by
SourceForge.net Logo
Documentation generated by
doxygen