Skip to content

Commit

Permalink
Update random_price.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
84ds84d8s authored Apr 18, 2024
1 parent 93c8b59 commit b5f1a55
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions random_price.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,10 @@ float init_stock_price(int price_profile) {
return abs(distribution(gen));
}

float init_sd(int price_profile) {
float init_sd() {
std::random_device rd;
std::mt19937 gen(rd());
std::normal_distribution<float> distribution(0.5, 0.5);
if (price_profile == 2) {
distribution.param(std::normal_distribution<float>::param_type(3.0, 1.5));
}
if (price_profile == 3) {
distribution.param(std::normal_distribution<float>::param_type(10.0, 3.0));
}
return abs(distribution(gen));
}

Expand Down

0 comments on commit b5f1a55

Please sign in to comment.