Trading Dev AcademyFree quant education

Free lesson · Stochastic calc

Itô integration and quadratic variation

Open interactive lessonPractice calculationsExplore labs

Start with the idea

  • For Brownian motion, squared changes add up to a nonzero limit. A second-order term that disappears in ordinary smooth-path calculus therefore remains in Itô calculus.
Symbols, units & horizon
  • ∫ H_t dW_t: Itô integral of exposure H against Brownian motion
  • H_t: adapted square-integrable integrand
  • W_T: terminal Brownian value with W₀=0
  • T: elapsed time
  • E: expectation
  • Σ(ΔW)²: realised squared-increment sum
  • Quadratic variation: limiting accumulated squared increments
  • The second identity: Itô isometry, under its integrability assumptions
  • Integral units: H-units multiplied by square-root-time units
  • t: integration time variable
  • dt: ordinary time increment
  • dW_t: stochastic integrator, not an ordinary velocity

When and why to use this

Use the discrete telescoping identity to understand why ordinary chain rules miss a term, and use the isometry for variance reasoning when its assumptions apply.

Start here · the same idea in everyday words

Technical termEveryday meaningConcrete example
IntegrandThe quantity being accumulated inside an integral.In a trading analogy, an exposure is multiplied by the next increment.
Quadratic variationThe limit of the sum of squared increments as a time partition becomes finer.For standard Brownian motion, this accumulated value equals the elapsed time almost surely.
Almost surelyWith probability one under the specified probability model.The statement permits exceptional paths of probability zero; it is not a claim about every imaginable path.

Unpack a technical sentence

Technical wording: Nonzero quadratic variation preserves a second-order Itô correction.

Read it as: For Brownian motion, squared changes add up to a nonzero limit. A second-order term that disappears in ordinary smooth-path calculus therefore remains in Itô calculus.

A slower worked example · one step at a time

  1. Use standard Brownian motion over a one-year horizon. Split the year into four equal .25-year intervals.
  2. Each increment has variance .25 years and mean zero. Its expected squared increment is therefore .25 years.
  3. The expected sum of the four squared increments is four times .25, or 1 year. A particular finite simulated sum need not equal 1.
  4. Now use 100 equal .01-year intervals. The expected squared increment is .01 years and the expected sum is again 1 year.
  5. These expectations explain the scaling but are not a proof of pathwise convergence. The quadratic-variation theorem states the limiting result under a specified refining partition: divide the time interval into smaller and smaller pieces. This is why the later Itô rule keeps a correction term.
Self-assessed: Must the sum of four realised squared Brownian increments equal one?

No. Its expectation over this one-year example is one. The limiting quadratic-variation statement concerns refinement, not exact equality for every finite sample.

  • For a square-integrable adapted step process, multiply the exposure fixed at the start of an interval by the Brownian increment over that interval.
  • The general Itô integral is defined by an appropriate mean-square limit.
  • This explanation is a construction outline, not a full measure-theoretic proof.
  • For standard Brownian motion, the sum of squared increments over refining deterministic partitions converges to elapsed time in the quadratic-variation sense.
  • This produces the familiar shorthand (dW)²=dt; it is not an equality between ordinary small real numbers.
∫0TWtdWt=WT2−T2,𝔼[(∫0THtdWt)2]=𝔼[∫0THt2dt]
Calculus: derivation and arithmetic

Itô integration and quadratic variation

  1. On a partition, expand W_next²−W_current²=2W_current ΔW+(ΔW)².
  2. Sum over intervals to telescope: Σ W_current ΔW=(W_T²−Σ(ΔW)²)/2. Taking the Itô limit gives (W_T²−T)/2.
  3. For adapted step exposures, cross terms have zero expectation by conditioning on the past, while each diagonal contribution is E[H_k²]Δt. Summing and passing to the mean-square limit gives the isometry.
Work it by hand

For one coarse path with increments .3 and −.1, W_T=.2, squared-increment sum=.10, and the left sum is 0×.3+.3×(−.1)=−.03. The exact discrete identity gives (.04−.10)/2=−.03. A coarse realised sum need not equal T.

Architecture pseudocode

def ito_left_sum(increments):
    w=0.0
    integral=0.0
    variation=0.0
    for dw in increments:
        integral+=w*dw
        variation+=dw*dw
        w+=dw
    return integral,(w*w-variation)/2,variation

def constant_exposure_variance(exposure,horizon):
    return exposure**2*horizon

print(ito_left_sum([.3,-.1]),constant_exposure_variance(2,1))

# Replay the slower, synthetic example above. Units are stated in its steps.
def plain_language_example():
    from math import exp, e  # Standard library; no extra dependency.
    return {
        "four_step_expected_sum": 4*.25,
        "hundred_step_expected_sum": 100*.01,
    }

print(plain_language_example())

An analogy to remember

Choose an exposure before the next coin-like shock, then record its contribution. Choosing it after seeing that shock changes the information rule and therefore the mathematical object.

How this becomes a building block

A self-financing diffusion trading gain has stochastic-integral terms. The isometry converts a second moment of accumulated noise exposure into an ordinary expected time integral. The quadratic-variation correction is the component that becomes gamma’s Itô term in an option model.

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.

def ito_left_sum(increments):
    w=0.0
    integral=0.0
    variation=0.0
    for dw in increments:
        integral+=w*dw
        variation+=dw*dw
        w+=dw
    return integral,(w*w-variation)/2,variation

def constant_exposure_variance(exposure,horizon):
    return exposure**2*horizon

print(ito_left_sum([.3,-.1]),constant_exposure_variance(2,1))

# Replay the slower, synthetic example above. Units are stated in its steps.
def plain_language_example():
    from math import exp, e  # Standard library; no extra dependency.
    return {
        "four_step_expected_sum": 4*.25,
        "hundred_step_expected_sum": 100*.01,
    }

print(plain_language_example())

Continue learning

Stochastic Calculus — all lessons
  1. Start with one random step before continuous noise
  2. Before Itô: random walks, Brownian motion and information
  3. Itô integration and quadratic variation
  4. SDEs, Euler–Maruyama and an Ornstein–Uhlenbeck example
  5. Geometric Brownian motion: the model under Black–Scholes
  6. Itô's lemma: why gamma exists
  7. Black–Scholes and delta hedging in production
  8. Put–call parity and a full Greek P&L budget

Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations