Option Class Reference

#include <option.hpp>

Inheritance diagram for Option:

Inheritance graph
[legend]
List of all members.

Detailed Description

base option class
Examples:

DiscreteHedging.cpp.


Public Types

enum  Type { Call, Put, Straddle }

Public Member Functions

 Option (const Handle< PricingEngine > &engine, const std::string &isinCode="", const std::string &description="")
double errorEstimate () const
void setPricingEngine (const Handle< PricingEngine > &)

Protected Member Functions

virtual void setupEngine () const=0
virtual void performCalculations () const

Protected Attributes

double errorEstimate_
Handle< PricingEngineengine_


Member Function Documentation

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.

Implements LazyObject.

Reimplemented in VanillaCapFloor, ForwardVanillaOption, QuantoVanillaOption, Swaption, and VanillaOption.


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

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