QuantLib 0.3.6
User manual
Introduction to QuantLib
QuantLib components
Reference manual
|
OneAssetOption Class Reference#include <ql/Instruments/oneassetoption.hpp>
Inheritance diagram for OneAssetOption:
[legend]List of all members.
Detailed Description
Base class for options on a single asset.
|
Public Member Functions |
| OneAssetOption (const Handle< BlackScholesStochasticProcess > &stochProc, const Handle< Payoff > &payoff, const Handle< Exercise > &exercise, const Handle< PricingEngine > &engine=Handle< PricingEngine >()) |
double | impliedVolatility (double price, double accuracy=1.0e-4, Size maxEvaluations=100, double minVol=QL_MIN_VOLATILITY, double maxVol=QL_MAX_VOLATILITY) const |
void | setupArguments (Arguments *) const |
|
bool | isExpired () const |
| returns whether the instrument is still tradable.
|
|
double | delta () const |
double | deltaForward () const |
double | elasticity () const |
double | gamma () const |
double | theta () const |
double | thetaPerDay () const |
double | vega () const |
double | rho () const |
double | dividendRho () const |
double | itmCashProbability () const |
Protected Member Functions |
void | setupExpired () const |
void | performCalculations () const |
Protected Attributes |
double | delta_ |
double | deltaForward_ |
double | elasticity_ |
double | gamma_ |
double | theta_ |
double | thetaPerDay_ |
double | vega_ |
double | rho_ |
double | dividendRho_ |
double | itmCashProbability_ |
Handle< BlackScholesStochasticProcess > | blackScholesProcess_ |
Member Function Documentation
double impliedVolatility |
( |
double |
price, |
|
|
double |
accuracy = 1.0e-4, |
|
|
Size |
maxEvaluations = 100, |
|
|
double |
minVol = QL_MIN_VOLATILITY, |
|
|
double |
maxVol = QL_MAX_VOLATILITY |
|
) |
const |
|
|
- Warning:
- currently, this method returns the Black-Scholes implied volatility. It will give unconsistent results if the pricing was performed with any other methods (such as jump-diffusion models.)
options with a gamma that changes sign have values that are not monotonic in the volatility, e.g binary options. In these cases the calculation can fail and the result (if any) is almost meaningless. Another possible source of failure is to have a target value that is not attainable with any volatility, e.g., a target value lower than the intrinsic value in the case of American options.
- Bug:
- run-time crashes are possible with the Borland compiler
|
void setupArguments |
( |
Arguments * |
|
) |
const [virtual] |
|
void setupExpired |
( |
|
) |
const [protected, virtual] |
|
|
This method must leave the instrument in a consistent state when the expiration condition is met.
Reimplemented from Instrument.
Reimplemented in QuantoVanillaOption. |
void performCalculations |
( |
|
) |
const [protected, virtual] |
|
|