Rs
Module 11GBM SimulationLesson 2 of 724 min

Simulate Terminal Spots

MC estimate of E[S_T] vs theory.

Estimator

Average many terminal spots; should approach S0 e^{rT}.

Reduce N if timeout

Playground may be slow for huge N.

Challenge

Multi-step path with 50 steps stored in Vec.

Tips
  • Compare to theory
  • Seed reproducibility
  • Increase N for accuracy

Try it live

Simulate Terminal SpotsRust 2021
Loading editor…
Output
Press Run to compile and execute.