Class implements Plain Vanilla European Option. More...

#include <europeanOpt.hpp>

Inheritance diagram for julian::EuropeanOpt:
julian::Option

Public Member Functions

 EuropeanOpt ()
 default constructor More...
 
 EuropeanOpt (Date trade_date, Date start_date, Date expiry_date, Date delivery_date, double notional, double strike, CallPut icp)
 Constructor. More...
 
double prizeAnalytically (const SmartPointer< MarketModel > &) const override
 calculates the price of option using market model provided More...
 
double prizePaths (std::vector< Path >, double) const override
 calculates the option value basing on the paths provided by Monte Carlo Pricer More...
 
Date getExpiry () const override
 returns expiry date More...
 
Date getMaturity () const override
 returns maturity date More...
 
double getStrike () const override
 returns strike More...
 
void recordFixing (Date, double) override
 Empty method. More...
 
CallPut getType () const
 returns option type More...
 
double payoff (double) const override
 Calculates payoff at expiry. More...
 
std::tuple< Date, Date, double, double, CallPutgetSettings () const
 returns the tuple of option's parameters More...
 
virtual EuropeanOptclone () const override
 Virtual copy constructor. More...
 
virtual ~EuropeanOpt ()
 destructor More...
 
- Public Member Functions inherited from julian::Option
virtual ~Option ()
 destructor More...
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int)
 interface used by Boost serialization library More...
 

Private Attributes

Date trade_date_
 date of trade More...
 
Date start_date_
 date on which payoff is discounted More...
 
Date expiry_date_
 Date of establishing the pay off amount. More...
 
Date delivery_date_
 Date when option is settled. More...
 
double notional_
 notional of trade More...
 
double strike_
 options strike More...
 
CallPut icp_
 options type More...
 

Friends

class boost::serialization::access
 
std::ostream & operator<< (std::ostream &, EuropeanOpt &)
 Overloads stream operator. More...
 

Detailed Description

Class implements Plain Vanilla European Option.

Plain European Option can be only exercise at expiry date.

Pay-off:

  • In case of Call

    \[max(Spot_{T}-K,0)\]

  • In case of Put

    \[max(K-Spot_{T},0)\]

Examples:
optionPricingExample.cpp.

Constructor & Destructor Documentation

julian::EuropeanOpt::EuropeanOpt ( )
inline

default constructor

julian::EuropeanOpt::EuropeanOpt ( Date  trade_date,
Date  start_date,
Date  expiry_date,
Date  delivery_date,
double  notional,
double  strike,
CallPut  icp 
)

Constructor.

virtual julian::EuropeanOpt::~EuropeanOpt ( )
inlinevirtual

destructor

Member Function Documentation

EuropeanOpt * julian::EuropeanOpt::clone ( ) const
overridevirtual

Virtual copy constructor.

Implements julian::Option.

Date julian::EuropeanOpt::getExpiry ( ) const
overridevirtual

returns expiry date

Implements julian::Option.

Date julian::EuropeanOpt::getMaturity ( ) const
overridevirtual

returns maturity date

Implements julian::Option.

std::tuple< Date, Date, double, double, CallPut > julian::EuropeanOpt::getSettings ( ) const

returns the tuple of option's parameters

Method is used by analytical prizing engine

double julian::EuropeanOpt::getStrike ( ) const
overridevirtual

returns strike

Implements julian::Option.

CallPut julian::EuropeanOpt::getType ( ) const

returns option type

double julian::EuropeanOpt::payoff ( double  S) const
overridevirtual

Calculates payoff at expiry.

Pay-off:

  • In case of Call

    \[max(Spot_{T}-K,0)\]

  • In case of Call

    \[max(K-Spot_{T},0)\]

Implements julian::Option.

double julian::EuropeanOpt::prizeAnalytically ( const SmartPointer< MarketModel > &  model) const
overridevirtual

calculates the price of option using market model provided

Implements julian::Option.

double julian::EuropeanOpt::prizePaths ( std::vector< Path paths,
double  df 
) const
overridevirtual

calculates the option value basing on the paths provided by Monte Carlo Pricer

\[Prize = DF \frac{1}{\#paths} \sum^{n=\#paths}_{n=1} Payoff(S_{n}(T_{expiry}))\]

Implements julian::Option.

void julian::EuropeanOpt::recordFixing ( Date  ,
double   
)
overridevirtual

Empty method.

Reimplemented from julian::Option.

template<class Archive >
void julian::EuropeanOpt::serialize ( Archive &  ar,
const unsigned  int 
)
inlineprivate

interface used by Boost serialization library

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
EuropeanOpt opt 
)
friend

Overloads stream operator.

This overloaded operator enables to print the curve on the console.

Member Data Documentation

Date julian::EuropeanOpt::delivery_date_
private

Date when option is settled.

Date julian::EuropeanOpt::expiry_date_
private

Date of establishing the pay off amount.

CallPut julian::EuropeanOpt::icp_
private

options type

double julian::EuropeanOpt::notional_
private

notional of trade

Date julian::EuropeanOpt::start_date_
private

date on which payoff is discounted

double julian::EuropeanOpt::strike_
private

options strike

Date julian::EuropeanOpt::trade_date_
private

date of trade


The documentation for this class was generated from the following files:
  • C:/Unix/home/OEM/jULIAN/src/instruments/options/europeanOpt.hpp
  • C:/Unix/home/OEM/jULIAN/src/instruments/options/europeanOpt.cpp