Skip to content

Commit

Permalink
Update hestonModel.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
lyndskg committed Jan 7, 2024
1 parent 4816267 commit 7fc4fa3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/hestonModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ using namespace std;
// Include the declaration of the fast_io function
extern void fast_io();

// ----------------------------------------------------------------------------

// ------------------------------------------------------------------------------------------------
// "hestonModel" Class Member Function Implementations
// ----------------------------------------------------------------------------
/*------------------------------ CONSTRUCTORS ------------------------------*/
// ------------------------------------------------------------------------------------------------
/*---------------------------------------- CONSTRUCTORS ----------------------------------------*/
// Default constructor.
hestonModel::hestonModel() : blackScholesModel() {
// Call fast_io to optimize I/O speed
Expand All @@ -45,7 +46,7 @@ hestonModel::hestonModel(double underlyingPrice, double strikePrice, double risk
}


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

// Calculates the option price using the Heston model with stochastic volatility.
double hestonModel::calculateOptionPrice() {
Expand Down Expand Up @@ -93,7 +94,7 @@ double hestonModel::random_normal() {
} // random_normal()


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

// Setter method for V0.
void hestonModel::setV0(double value) const {
Expand Down Expand Up @@ -125,7 +126,7 @@ void hestonModel::setRho(double value) const {
} // setRho()


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


// Getter method for V0.
Expand Down Expand Up @@ -161,6 +162,7 @@ const double& hestonModel::getRho() const {


// TODO: FIX THIS SHIT

//// Function to generate a random number from a standard normal distribution
//double hestonModel::random_normal() {
// static VSLStreamStatePtr stream;
Expand Down

0 comments on commit 7fc4fa3

Please sign in to comment.