paper19

Playing around with visualizations of Monte Carlo simulations.

Okay, so this totally serves as a bit of a demo, playing around with d3, but also learning a bit about monte-carlo simulations and kernel density estimation, so I'm publishing this as-is for now since I want to play with other things, I kinda want to apply this to some parametric or non-parametric data just to showcase how monte-carlo modelling works, I'm trying to get inspiration for an example that's not basic financial or ecological/population modelling. Alas I'll revisit this though and maybe see if I can write something up about basket option valuation but there's more research on my end to do for sure.

This chart below shows a Monte Carlo simulation sampling from a normal distribution with the following parameters:

  • Starting value: 1.01.0
  • Number of simulations run: 8080
  • Number of data points per simulation: 200200
  • Standard deviation: 0.150.15
  • Rate of change: 0.05sin(4πx)+sin(4πx)forx{n199n=0,1,2,,199}0.05 \cdot \sin(4 \pi \cdot x) + \sin(4 \pi \cdot x) \quad \text{for} \quad x \in \{ \frac{n}{199} \mid n = 0, 1, 2, \dots, 199 \}

Also the KDE (purple distribution line thingy) uses Scott's rule of thumb.

Note: The purple line on the chart represents the computed median result.

Monte-Carlo simulation with kernel denisity estimation