35 Interactive HTML Modules
35.1 Purpose
Interactive modules help students see how mathematical finance models respond to parameter changes. The book loads Plotly.js once in _quarto.yml, so chapter pages can include lightweight HTML containers and JavaScript functions.
35.2 Suggested Interactive Modules
| Module | Concept | Controls |
|---|---|---|
| 1 | compound growth | rate, horizon, compounding frequency |
| 2 | binomial tree | \(u\), \(d\), \(r\), number of steps |
| 3 | Brownian motion | path count, time horizon, volatility |
| 4 | GBM | drift, volatility, initial price |
| 5 | Black–Scholes call | strike, maturity, volatility, rate |
| 6 | Greeks | moneyness, volatility, time to maturity |
| 7 | Vasicek short rate | mean reversion, long-run mean, volatility |
| 8 | efficient frontier | covariance and target return |
| 9 | VaR and ES | confidence level and loss distribution |
| 10 | Heston simulation | variance mean reversion and vol-of-vol |
35.3 Example Container
A chapter can add a container such as:
<div id="mf-compound-demo" class="plotly-demo"></div>Then assets/math-finance-interactives.js can populate the figure when the page loads.