SingleAssetOption Class Reference

#include <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, double underlying, double strike, Spread dividendYield, Rate riskFreeRate, Time residualTime, double volatility)
virtual void setVolatility (double newVolatility)
virtual void setRiskFreeRate (Rate newRate)
virtual void setDividendYield (Rate newDividendYield)
virtual double value () const=0
virtual double delta () const=0
virtual double gamma () const=0
virtual double theta () const
virtual double vega () const
virtual double rho () const
virtual double dividendRho () const
double impliedVolatility (double targetValue, double accuracy=1e-4, Size maxEvaluations=100, double minVol=1.0e-4, double maxVol=4.0) const
double impliedDivYield (double targetValue, double accuracy=1e-4, Size maxEvaluations=100, double minVol=1.0e-7, double maxVol=4.0) const
virtual Handle< SingleAssetOptionclone () const=0

Protected Attributes

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

Static Protected Attributes

const double dVolMultiplier_ = 0.0001
const double dRMultiplier_ = 0.0001

Friends

class VolatilityFunction
class DivYieldFunction


Member Function Documentation

double impliedVolatility double  targetValue,
double  accuracy = 1e-4,
Size  maxEvaluations = 100,
double  minVol = 1.0e-4,
double  maxVol = 4.0
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.


The documentation for this class was generated from the following files:

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