Class implements Black Scholes model. More...

#include <BlackScholesModel.hpp>

Inheritance diagram for julian::BlackScholesModel:
julian::DeeplyCopyableMarketModel< BlackScholesModel > julian::MarketModel

Public Member Functions

 BlackScholesModel ()
 Default Constructor. More...
 
 BlackScholesModel (const Date &date, const double &asset_prize, const SmartPointer< ir::Curve > &discounting_curve, const SmartPointer< ir::Curve > &dividend_curve, const SmartPointer< Volatility > &volatility)
 Constructor. More...
 
virtual Date getDate () const override
 returns the date on which market data are actual More...
 
virtual double getAssetPrize () const override
 returns the prize of asset More...
 
virtual SmartPointer< ir::CurvegetDiscountingCurve () const override
 returns discounting curve More...
 
virtual SmartPointer< ir::CurvegetDividendCurve () const override
 returns dividend curve More...
 
virtual void setDate (Date &) override
 sets the market date More...
 
virtual void setAssetPrize (double) override
 sets asset prize More...
 
virtual void bumpAssetPrize (double) override
 bump asset prize additively More...
 
virtual void bumpVolatility (double) override
 bump volatility additively More...
 
double prizeAnalytically (const EuropeanOpt &) const override
 method calculates the prize of European vanilla option More...
 
- Public Member Functions inherited from julian::DeeplyCopyableMarketModel< BlackScholesModel >
virtual MarketModelclone () const
 virtual copy constructor More...
 
- Public Member Functions inherited from julian::MarketModel
virtual ~MarketModel ()
 destructor More...
 

Private Member Functions

double calculateDrift (Date) const
 basing on discounting and dividend curve exponential drift is calculated More...
 

Private Attributes

Date date_
 Market date. More...
 
double asset_prize_
 Underlying asset prize. More...
 
SmartPointer< ir::Curvediscounting_curve_
 Curve used to discount CFs. More...
 
SmartPointer< ir::Curvedividend_curve_
 Curve used to estimate continuous dividend. More...
 
SmartPointer< Volatilityvolatility_
 Volatility of the asset prize. More...
 

Detailed Description

Class implements Black Scholes model.

PDE

\[{\frac {\partial V}{\partial t}}+{\frac {1}{2}}\sigma ^{2}S^{2}{\frac {\partial ^{2}V}{\partial S^{2}}}+rS{\frac {\partial V}{\partial S}}-rV=0\]

SDE

\[dS_t = (r-q) S_t dt + \sigma S_t dW_t^Q\]

For more information see: [14] [15] [20] [18]

and links

Examples:
optionPricingExample.cpp.

Constructor & Destructor Documentation

julian::BlackScholesModel::BlackScholesModel ( )
inline

Default Constructor.

julian::BlackScholesModel::BlackScholesModel ( const Date date,
const double &  asset_prize,
const SmartPointer< ir::Curve > &  discounting_curve,
const SmartPointer< ir::Curve > &  dividend_curve,
const SmartPointer< Volatility > &  volatility 
)
inline

Constructor.

Member Function Documentation

void julian::BlackScholesModel::bumpAssetPrize ( double  h)
overridevirtual

bump asset prize additively

Parameters
hbump size

Implements julian::MarketModel.

void julian::BlackScholesModel::bumpVolatility ( double  h)
overridevirtual

bump volatility additively

Parameters
hbump size
Note
Depending on the implementation of volatility bumping may have different mechanism

Implements julian::MarketModel.

double julian::BlackScholesModel::calculateDrift ( Date  date) const
private

basing on discounting and dividend curve exponential drift is calculated

double julian::BlackScholesModel::getAssetPrize ( ) const
overridevirtual

returns the prize of asset

Implements julian::MarketModel.

Date julian::BlackScholesModel::getDate ( ) const
overridevirtual

returns the date on which market data are actual

Implements julian::MarketModel.

SmartPointer< ir::Curve > julian::BlackScholesModel::getDiscountingCurve ( ) const
overridevirtual

returns discounting curve

Implements julian::MarketModel.

SmartPointer< ir::Curve > julian::BlackScholesModel::getDividendCurve ( ) const
overridevirtual

returns dividend curve

Implements julian::MarketModel.

double julian::BlackScholesModel::prizeAnalytically ( const EuropeanOpt opt) const
overridevirtual

method calculates the prize of European vanilla option

\[ \begin{aligned} C & = i_{cp} (S e^{-q T_{today,maturity} }N(i_{cp} d_{1}) - K e^{-r T_{today,maturity}} N(i_{cp}d_{2})) \\ d_{1} & = \frac{ln(\frac{S}{K}) + (r - q) T_{today,maturity} + \frac{var}{2} }{\sqrt{var}} \\ d_{2} & = \frac{ln(\frac{S}{K}) + (r - q) T_{today,maturity} - \frac{var}{2} }{\sqrt{var}} \\ var & = \sigma^2(K, expiry) T_{today, expiry} \end{aligned}\]

where:

  • $S$ asset prize
  • $K$ strike
  • $\sigma$ volatility
  • $r,q$ discounting rate, return on asset
  • $i_{cp}$ 1 for Call option; -1 for put option
  • $N()$ standard normal distribution

Implements julian::MarketModel.

void julian::BlackScholesModel::setAssetPrize ( double  input)
overridevirtual

sets asset prize

Parameters
inputnew asset prize

Implements julian::MarketModel.

Examples:
optionPricingExample.cpp.
void julian::BlackScholesModel::setDate ( Date date)
overridevirtual

sets the market date

Parameters
dateNew market date

Implements julian::MarketModel.

Member Data Documentation

double julian::BlackScholesModel::asset_prize_
private

Underlying asset prize.

Date julian::BlackScholesModel::date_
private

Market date.

SmartPointer<ir::Curve> julian::BlackScholesModel::discounting_curve_
private

Curve used to discount CFs.

SmartPointer<ir::Curve> julian::BlackScholesModel::dividend_curve_
private

Curve used to estimate continuous dividend.

SmartPointer<Volatility> julian::BlackScholesModel::volatility_
private

Volatility of the asset prize.


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