Monte Carlo Simulations of Bitcoin Options

Based on this Python / Julia comparison, I wanted to see how the same code would work on JavaScript.

This is just an attempt to show how JavaScript handles the numeric computations. On Chrome, it does pretty well.

On a MacBook Air, I am seeing times of about 1.1 second for the 100,000 iteration case from the original blog post (in Chrome).

Click run to run the simulation. The simulation will do 10 repeats, each with 100,000 iterations. Every repeat will return its time, and the C0 value. At the end, it reports the mean of the C0's.