Skip to content

Commit

Permalink
Update blackScholesModel.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
lyndskg committed Jan 7, 2024
1 parent 8aa390b commit 2f578d1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/blackScholesModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
using namespace std;


// ----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------
// "blackScholesModel" Class Member Function Implementations
// ----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------


/*------------------------------ CONSTRUCTORS ------------------------------*/
/*---------------------------------------- CONSTRUCTORS ------------------------------------------------*/
// Default constructor.
blackScholesModel::blackScholesModel() {
// Initialize member variables directly.
Expand Down Expand Up @@ -63,8 +63,8 @@ blackScholesModel::blackScholesModel(double underlyingPrice, double strikePrice,
K_ = calculateK(d1_);
}

/*------------------------------ KEY MEMBER FUNCTIONS ------------------------------*/
/*------------------------------ { math } ------------------------------*/
/*----------------------------------------- KEY MEMBER FUNCTIONS -----------------------------------------*/
/*----------------------------------------- { math } -----------------------------------------*/


// Defines the option pricing function and calculates the option price using the Black-Scholes formula.
Expand Down Expand Up @@ -166,7 +166,7 @@ double blackScholesModel::calculateK(double d) const {
} // calculateK()


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

// Setter method for the underlying price of the Black-Scholes model.
void blackScholesModel::setUnderlyingPrice(const double& value) {
Expand Down Expand Up @@ -222,7 +222,7 @@ void blackScholesModel::setK(const double& value) const {
} // setK()


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

// Getter method for the underlying price of the Black-Scholes model.
const double& blackScholesModel::getUnderlyingPrice() const {
Expand Down

0 comments on commit 2f578d1

Please sign in to comment.