Logo Search packages:      
Sourcecode: quantlib version File versions  Download package

QuantLib::Option Class Reference

#include <option.hpp>

Inheritance diagram for QuantLib::Option:

QuantLib::Instrument QuantLib::LazyObject QuantLib::Observable QuantLib::Observer QuantLib::CdsOption QuantLib::MultiAssetOption QuantLib::OneAssetOption QuantLib::Swaption QuantLib::BasketOption QuantLib::HimalayaOption QuantLib::PagodaOption QuantLib::BarrierOption QuantLib::CliquetOption QuantLib::CompoundOption QuantLib::ContinuousAveragingAsianOption QuantLib::ContinuousFixedLookbackOption QuantLib::ContinuousFloatingLookbackOption QuantLib::DiscreteAveragingAsianOption QuantLib::DividendVanillaOption QuantLib::ForwardVanillaOption QuantLib::QuantoVanillaOption QuantLib::VanillaOption

List of all members.

Detailed Description

base option class

Definition at line 35 of file option.hpp.

Public Types

enum  Type { Put = -1, Call = 1 }

Public Member Functions

boost::shared_ptr< Exerciseexercise ()
virtual void fetchResults (const PricingEngine::results *) const
void notifyObservers ()
 Option (const boost::shared_ptr< Payoff > &payoff, const boost::shared_ptr< Exercise > &exercise)
boost::shared_ptr< Payoffpayoff ()
void registerWith (const boost::shared_ptr< Observable > &)
void setupArguments (PricingEngine::arguments *) const
void unregisterWith (const boost::shared_ptr< Observable > &)
const std::map< std::string,
boost::any > & 
additionalResults () const
 returns all additional result returned by the pricing engine.
Real errorEstimate () const
 returns the error estimate on the NPV when available.
virtual bool isExpired () const =0
 returns whether the instrument might have value greater than zero.
Real NPV () const
 returns the net present value of the instrument.
template<typename T>
result (const std::string &tag) const
 returns any additional result returned by the pricing engine.
const DatevaluationDate () const
 returns the date the net present value refers to.
These methods do not modify the structure of the object and are therefore declared as const. Data members which will be calculated on demand need to be declared as mutable.

void freeze ()
void recalculate ()
void unfreeze ()
void setPricingEngine (const boost::shared_ptr< PricingEngine > &)
 set the pricing engine to be used.
Observer interface
void update ()

Protected Member Functions

void calculate () const
virtual void performCalculations () const
virtual void setupExpired () const

Protected Attributes

bool calculated_
boost::shared_ptr< PricingEngineengine_
boost::shared_ptr< Exerciseexercise_
bool frozen_
boost::shared_ptr< Payoffpayoff_
The value of this attribute and any other that derived classes might declare must be set during calculation.

std::map< std::string, boost::any > additionalResults_
Real errorEstimate_
Real NPV_
Date valuationDate_

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &, Option::Type)


class  arguments
 basic option arguments More...

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

Generated by  Doxygen 1.6.0   Back to index