QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
BlackScholesCalculator Class Reference

Black-Scholes 1973 calculator class. More...

#include <ql/pricingengines/blackscholescalculator.hpp>

+ Inheritance diagram for BlackScholesCalculator:
+ Collaboration diagram for BlackScholesCalculator:

Public Member Functions

 BlackScholesCalculator (const ext::shared_ptr< StrikedTypePayoff > &payoff, Real spot, DiscountFactor growth, Real stdDev, DiscountFactor discount)
 
 BlackScholesCalculator (Option::Type optionType, Real strike, Real spot, DiscountFactor growth, Real stdDev, DiscountFactor discount)
 
 ~BlackScholesCalculator () override=default
 
Real delta () const
 
Real elasticity () const
 
Real gamma () const
 
Real theta (Time maturity) const
 
Real thetaPerDay (Time maturity) const
 
virtual Real delta (Real spot) const
 
virtual Real elasticity (Real spot) const
 
virtual Real gamma (Real spot) const
 
virtual Real theta (Real spot, Time maturity) const
 
virtual Real thetaPerDay (Real spot, Time maturity) const
 
- Public Member Functions inherited from BlackCalculator
 BlackCalculator (const ext::shared_ptr< StrikedTypePayoff > &payoff, Real forward, Real stdDev, Real discount=1.0)
 
 BlackCalculator (Option::Type optionType, Real strike, Real forward, Real stdDev, Real discount=1.0)
 
virtual ~BlackCalculator ()=default
 
Real value () const
 
Real deltaForward () const
 
virtual Real delta (Real spot) const
 
Real elasticityForward () const
 
virtual Real elasticity (Real spot) const
 
Real gammaForward () const
 
virtual Real gamma (Real spot) const
 
virtual Real theta (Real spot, Time maturity) const
 
virtual Real thetaPerDay (Real spot, Time maturity) const
 
Real vega (Time maturity) const
 
Real rho (Time maturity) const
 
Real dividendRho (Time maturity) const
 
Real itmCashProbability () const
 
Real itmAssetProbability () const
 
Real strikeSensitivity () const
 
Real strikeGamma () const
 
Real alpha () const
 
Real beta () const
 

Protected Attributes

Real spot_
 
DiscountFactor growth_
 
- Protected Attributes inherited from BlackCalculator
Real strike_
 
Real forward_
 
Real stdDev_
 
Real discount_
 
Real variance_
 
Real d1_
 
Real d2_
 
Real alpha_
 
Real beta_
 
Real DalphaDd1_
 
Real DbetaDd2_
 
Real n_d1_
 
Real cum_d1_
 
Real n_d2_
 
Real cum_d2_
 
Real x_
 
Real DxDs_
 
Real DxDstrike_
 

Additional Inherited Members

- Protected Member Functions inherited from BlackCalculator
void initialize (const ext::shared_ptr< StrikedTypePayoff > &p)
 

Detailed Description

Black-Scholes 1973 calculator class.

Definition at line 32 of file blackscholescalculator.hpp.

Constructor & Destructor Documentation

◆ BlackScholesCalculator() [1/2]

BlackScholesCalculator ( const ext::shared_ptr< StrikedTypePayoff > &  payoff,
Real  spot,
DiscountFactor  growth,
Real  stdDev,
DiscountFactor  discount 
)

Definition at line 24 of file blackscholescalculator.cpp.

◆ BlackScholesCalculator() [2/2]

BlackScholesCalculator ( Option::Type  optionType,
Real  strike,
Real  spot,
DiscountFactor  growth,
Real  stdDev,
DiscountFactor  discount 
)

Definition at line 39 of file blackscholescalculator.cpp.

◆ ~BlackScholesCalculator()

~BlackScholesCalculator ( )
overridedefault
+ Here is the call graph for this function:

Member Function Documentation

◆ delta() [1/2]

Real delta ( ) const

Sensitivity to change in the underlying spot price.

Definition at line 72 of file blackscholescalculator.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elasticity() [1/2]

Real elasticity ( ) const

Sensitivity in percent to a percent change in the underlying spot price.

Definition at line 76 of file blackscholescalculator.hpp.

+ Here is the call graph for this function:

◆ gamma() [1/2]

Real gamma ( ) const

Second order derivative with respect to change in the underlying spot price.

Definition at line 80 of file blackscholescalculator.hpp.

+ Here is the call graph for this function:

◆ theta() [1/2]

Real theta ( Time  maturity) const

Sensitivity to time to maturity.

Definition at line 84 of file blackscholescalculator.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ thetaPerDay() [1/2]

Real thetaPerDay ( Time  maturity) const

Sensitivity to time to maturity per day (assuming 365 day in a year).

Definition at line 88 of file blackscholescalculator.hpp.

+ Here is the call graph for this function:

◆ delta() [2/2]

Real delta ( Real  spot) const
virtual

Sensitivity to change in the underlying spot price.

Reimplemented from BlackCalculator.

Definition at line 57 of file blackcalculator.cpp.

+ Here is the call graph for this function:

◆ elasticity() [2/2]

Real elasticity ( Real  spot) const
virtual

Sensitivity in percent to a percent change in the underlying spot price.

Reimplemented from BlackCalculator.

Definition at line 64 of file blackcalculator.cpp.

◆ gamma() [2/2]

Real gamma ( Real  spot) const
virtual

Second order derivative with respect to change in the underlying spot price.

Reimplemented from BlackCalculator.

Definition at line 71 of file blackcalculator.cpp.

◆ theta() [2/2]

Real theta ( Real  spot,
Time  maturity 
) const
virtual

Sensitivity to time to maturity.

Reimplemented from BlackCalculator.

Definition at line 74 of file blackcalculator.cpp.

◆ thetaPerDay() [2/2]

Real thetaPerDay ( Real  spot,
Time  maturity 
) const
virtual

Sensitivity to time to maturity per day, assuming 365 day per year.

Reimplemented from BlackCalculator.

Definition at line 78 of file blackcalculator.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ spot_

Real spot_
protected

Definition at line 67 of file blackscholescalculator.hpp.

◆ growth_

DiscountFactor growth_
protected

Definition at line 68 of file blackscholescalculator.hpp.