Free lesson · Stochastic calc
Start with one random step before continuous noise
Open interactive lessonPractice calculationsExplore labs
Start with the idea
- A random variable has several possible values.
- Calculate its average and spread before introducing a random path.
Symbols, units & horizon
- Z: dimensionless toy shock, equally likely −1 or +1
- a: a fixed multiplier in the scaling rule
- h: positive elapsed time in days
- σ: shock scale in units per square root of day
- ΔX: random change in units
- E: probability-weighted mean
- Var: mean squared deviation from the mean
When and why to use this
Use this scaling as preparation for simulation increments. The next lesson replaces the toy shock with the Gaussian increments of Brownian motion.
- Toy shock Z: either −1 or +1, each with probability one half.
- Mean : positive and negative outcomes balance.
- Variance : squared deviations are both 1.
- Multiplying a shock by a scales its standard deviation by .
- This two-outcome model teaches scaling. It is not a Gaussian Brownian increment.
Start with one random step before continuous noise
- The two changes are and . Equal probabilities give mean zero.
- Square each deviation: both give . Their weighted average is therefore .
- Standard deviation is the square root of variance: for nonnegative σ.
With σ=2 units/√day and h=.25 day, the change is −1 or +1 unit. Mean=0, variance=1 unit², standard deviation=1 unit.
Use the rule
- Name the inputs and units.
- Work the small example by hand.
- Check the result before continuing to the next lesson.
Before moving on
Explain the core rule in one sentence, reproduce the worked calculation and solve both practice variations.
Research sources, review dates and limitations
Python implementation
Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.
from math import sqrt
def toy_shock(scale, elapsed, sign):
if scale < 0 or elapsed <= 0 or sign not in (-1,1):
raise ValueError("Nonnegative scale, positive time and sign +/-1 required")
return scale*sqrt(elapsed)*sign
print(toy_shock(2,.25,-1), toy_shock(2,.25,1))Continue learning
Stochastic Calculus — all lessons- Start with one random step before continuous noise
- Before Itô: random walks, Brownian motion and information
- Itô integration and quadratic variation
- SDEs, Euler–Maruyama and an Ornstein–Uhlenbeck example
- Geometric Brownian motion: the model under Black–Scholes
- Itô's lemma: why gamma exists
- Black–Scholes and delta hedging in production
- Put–call parity and a full Greek P&L budget
Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations