Fix Gamma and cap the number of simulations at 10M

This commit is contained in:
Kevin
2017-09-17 22:42:34 -04:00
parent a80e891037
commit 6b56699280
2 changed files with 14 additions and 7 deletions

View File

@@ -21,6 +21,12 @@ func index(w http.ResponseWriter, r *http.Request) {
json.Unmarshal(body, &bsOpt)
json.Unmarshal(body, &mcOpt)
// Cap the number of simulations at 10M
if bsOpt.Sims > 1e7 || mcOpt.Sims > 1e7 {
bsOpt.Sims = 1e7
mcOpt.Sims = 1e7
}
mcOpt.PriceMonteCarlo()
bsOpt.PriceClosedForm()