Skip to content

Commit

Permalink
Update optionGreeks.h
Browse files Browse the repository at this point in the history
  • Loading branch information
lyndskg authored Jan 7, 2024
1 parent 7623d13 commit 438be88
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions include/black-scholes-cpp/optionGreeks.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@

#include "blackScholesModel.h"

// ----------------------------------------------------------------------------
// "optionGreeks" Class Declarations
// ----------------------------------------------------------------------------
// -----------------------------------------------------------------------------------
// "optionGreeks" Class Declarations
// -----------------------------------------------------------------------------------

/* DERIVED CLASS */
class optionGreeks : public virtual blackScholesModel {
public:
/*------------------------------ CONSTRUCTORS ------------------------------*/
/*----------------------------------- CONSTRUCTORS --------------------------------*/
// Default constructor.
optionGreeks();

// Custom constructor.
optionGreeks(double underlyingPrice, double strikePrice, double timeToExpiration,
double riskFreeRate, double volatility);

/*-------------------------- KEY MEMBER FUNCTIONS --------------------------*/
/*-------------------------------- KEY MEMBER FUNCTIONS ----------------------------*/

// Delta measures the change in option price for a unit change in
// the underlying asset price.
Expand Down Expand Up @@ -70,7 +70,8 @@ class optionGreeks : public virtual blackScholesModel {
// TODO: Implement more member functions for calculating/accessing option Greeks


/*-------------------------- SETTER METHODS --------------------------*/

/*--------------------------------- SETTER METHODS ---------------------------------*/

// Setter method for the Delta value of option Greeks.
//
Expand Down Expand Up @@ -107,7 +108,8 @@ class optionGreeks : public virtual blackScholesModel {
void setRho(const double& value) const;


/*------------------------------ GETTER METHODS ------------------------------*/

/*---------------------------------- GETTER METHODS -----------------------------------*/

// Getter method for the Delta value of option Greeks.
//
Expand Down Expand Up @@ -143,10 +145,11 @@ class optionGreeks : public virtual blackScholesModel {
// Space complexity: O(1)
const double& getRho() const;


protected:
// ----------------------------------------------------------------------------
// "optionGreeks" Member Variables
// ----------------------------------------------------------------------------
// -------------------------------------------------------------------------------------
// "optionGreeks" Member Variables
// -------------------------------------------------------------------------------------
mutable double delta_;
mutable double gamma_;
mutable double vega_;
Expand Down

0 comments on commit 438be88

Please sign in to comment.