VanillaOption Class Reference#include <vanillaoption.hpp>
Inheritance diagram for VanillaOption:
[legend]List of all members.
Detailed Description
Vanilla option (no discrete dividends, no barriers) on a single asset.
|
Public Member Functions |
| VanillaOption (Option::Type type, const RelinkableHandle< MarketElement > &underlying, double strike, const RelinkableHandle< TermStructure > ÷ndTS, const RelinkableHandle< TermStructure > &riskFreeTS, const Exercise &exercise, const RelinkableHandle< BlackVolTermStructure > &volTS, const Handle< PricingEngine > &engine=Handle< PricingEngine >(), const std::string &isinCode="", const std::string &description="") |
double | impliedVolatility (double targetValue, double accuracy=1.0e-4, Size maxEvaluations=100, double minVol=1.0e-4, double maxVol=4.0) const |
|
double | delta () const |
double | gamma () const |
double | theta () const |
double | vega () const |
double | rho () const |
double | dividendRho () const |
double | strikeSensitivity () const |
Protected Member Functions |
void | setupEngine () const |
void | performCalculations () const |
Protected Attributes |
double | delta_ |
double | gamma_ |
double | theta_ |
double | vega_ |
double | rho_ |
double | dividendRho_ |
double | strikeSensitivity_ |
Option::Type | type_ |
RelinkableHandle< MarketElement > | underlying_ |
double | strike_ |
Exercise | exercise_ |
RelinkableHandle< TermStructure > | riskFreeTS_ |
RelinkableHandle< TermStructure > | dividendTS_ |
RelinkableHandle< BlackVolTermStructure > | volTS_ |
Member Function Documentation
double impliedVolatility |
( |
double |
targetValue, |
|
|
double |
accuracy = 1.0e-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 it is almost 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.
|
void performCalculations |
( |
|
) |
const [protected, virtual] |
|
|
- Warning:
- this method simply launches the engine and copies the returned value into NPV_. It does not set isExpired_. This should be taken care of by redefining this method in derived classes and calling this implementation after checking for validity and only if the check succeeded.
Reimplemented from Option.
Reimplemented in ForwardVanillaOption, and QuantoVanillaOption. |
The documentation for this class was generated from the following files:
|