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 1df384b commit 8fa5f65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testthat/test-Binomial_American_Greeks.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ test_that("Binomial_American_Greeks fair_value is correct", {
american_option_value[i, j] <-
max(
(american_option_value[i, j+1] * p + american_option_value[i+1, j+1] * (1-p)),
exp(-(r-dividend_yield)*(j-1)*dt) * payoff(underlying[i, j], exercise_price))
exp(-r*(j-1)*dt) * payoff(underlying[i, j], exercise_price))
european_option_value[i, j] <-
(european_option_value[i, j+1] * p + european_option_value[i+1, j+1] * (1-p)) * exp(-r*dt)
}
Expand Down

0 comments on commit 8fa5f65

Please sign in to comment.