Style change and limit number of simulation results sent

This commit is contained in:
Kevin Keogh
2018-01-15 20:34:56 -05:00
parent e628db236b
commit 687a6d9b18
3 changed files with 122 additions and 0 deletions

View File

@@ -30,6 +30,10 @@ func index(w http.ResponseWriter, r *http.Request) {
mcOpt.PriceMonteCarlo()
bsOpt.PriceClosedForm()
// Only send the first 10000 levels, as the data going over
// the wire would otherwise be very significant
mcOpt.Levels = mcOpt.Levels[:1000]
options := make(map[string]Option)
options["MonteCarlo"] = mcOpt
options["ClosedForm"] = bsOpt