OneAssetOption Class Reference

#include <ql/Instruments/oneassetoption.hpp>

Inheritance diagram for OneAssetOption:

Inheritance graph
[legend]
List of all members.

Detailed Description

Base class for options on a single asset.


Public Member Functions

 OneAssetOption (const boost::shared_ptr< BlackScholesProcess > &, const boost::shared_ptr< Payoff > &payoff, const boost::shared_ptr< Exercise > &exercise, const boost::shared_ptr< PricingEngine > &engine=boost::shared_ptr< PricingEngine >())
Volatility impliedVolatility (Real price, Real accuracy=1.0e-4, Size maxEvaluations=100, Volatility minVol=QL_MIN_VOLATILITY, Volatility maxVol=QL_MAX_VOLATILITY) const
void setupArguments (Arguments *) const
Instrument interface
bool isExpired () const
 returns whether the instrument is still tradable.

greeks
Real delta () const
Real deltaForward () const
Real elasticity () const
Real gamma () const
Real theta () const
Real thetaPerDay () const
Real vega () const
Real rho () const
Real dividendRho () const
Real itmCashProbability () const

Protected Member Functions

void setupExpired () const
void performCalculations () const

Protected Attributes

Real delta_
Real deltaForward_
Real elasticity_
Real gamma_
Real theta_
Real thetaPerDay_
Real vega_
Real rho_
Real dividendRho_
Real itmCashProbability_
boost::shared_ptr< BlackScholesProcessblackScholesProcess_


Member Function Documentation

Volatility impliedVolatility Real  price,
Real  accuracy = 1.0e-4,
Size  maxEvaluations = 100,
Volatility  minVol = QL_MIN_VOLATILITY,
Volatility  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.

void setupArguments Arguments  )  const [virtual]
 

When a derived argument structure is defined for an instrument, this method should be overridden to fill it. This is mandatory in case a pricing engine is used.

Reimplemented from Instrument.

Reimplemented in ContinuousAveragingAsianOption, DiscreteAveragingAsianOption, BarrierOption, CliquetOption, DividendVanillaOption, ForwardVanillaOption, OneAssetStrikedOption, QuantoForwardVanillaOption, and QuantoVanillaOption.

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]
 

In case a pricing engine is not used, this method must be overridden to perform the actual calculations and set any needed results. In case a pricing engine is used, the default implementation can be used.

Reimplemented from Instrument.

Reimplemented in BarrierOption, ForwardVanillaOption, OneAssetStrikedOption, and QuantoVanillaOption.


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