Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
hudde committed Feb 21, 2024
1 parent 58fd614 commit 1df384b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Binomial_American_Greeks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ NumericVector Binomial_American_Greeks_cpp(double initial_price = 100,
european_value(i) = p * european_value(i) + q * european_value(i+1);
american_value(i) = p * american_value(i) + q * american_value(i+1);
american_value(i) = max(
exp(-(r-dividend_yield)*j*dt) *
exp(-r*j*dt) *
payoff_function(price(2*steps - 2*i + j - steps), exercise_price),
american_value(i));
}
Expand Down

0 comments on commit 1df384b

Please sign in to comment.