AMS 516 · Statistical Methods in Finance · Project 21
The HJB and Fokker–Planck equations, solved with physics-informed neural networks
Ander Ibarrondo · Deepak Singh
Stony Brook University
The idea
The problem
each line is one investor’s wealth · r = 2%, μ = 8%, σ = 20%
The problem · the goal
What each investor wants at T
The problem · the equilibrium
HJB
each investor’s best strategy
◀ solved backward, T → 0
the best strategy moves the crowd
Fokker–Planck
how wealth spreads in the crowd
solved forward, 0 → T ▶
the crowd’s average
Equilibrium: the average the HJB assumes is the average the Fokker–Planck equation delivers.
The equilibrium
\(\bar m\)
\(\pi^*\)
\(\Phi(\bar m)\)
no: a new guess for \(\bar m\)
yes: equilibrium, \(\Phi(\bar m^*) = \bar m^*\)
Guess
\(\bar m\)
first guess: 1.110, the average with no penalty
Each investor
HJB
the best plan \(\pi^*\) against \(\bar m\)
The crowd
Fokker–Planck
everyone plays \(\pi^*\): the average they create, \(\Phi(\bar m)\)
Compare
\(\Phi(\bar m) \overset{?}{=} \bar m\)
does the guess come back?
The method
Finite differences
the classic way: our benchmark
Values on a grid (800 × 400 in the code); derivatives from neighbouring points; solved column by column, backward from T
Physics-informed neural network
a network trained to satisfy the equation
R: how far the network is from satisfying the equation, at thousands of random points. No solution is given; derivatives by automatic differentiation
Finite differences: the whole equilibrium in 2 s, error about 10⁻⁶
Networks: about 1 hour, equilibrium within 0.014% of finite differences
With N investors a grid needs 800N points; a network does not
The value network · training
checked at 6,400 new random points at every training step
The crowd · Fokker–Planck
Results · fear of falling behind · λ = 2
The network and finite differences overlap; the equilibrium average agrees to 0.014%.
Extension
A few investors who see each other: one HJB, solved in rounds
The league of N · in symbols
The crowd enters through one fixed number
Every rival enters with their current wealth
Goal at T
The group’s mean \(\bar x\) includes me: \(\bar x - x = \big(1 - \tfrac1N\big)(\bar y - x)\), with \(\bar y\) the rivals’ mean, so it is rewritten as
Best plan: one HJB with N wealths
\(V(t, x, \cC{y})\) with \(\cC{y} = (y_1, \dots, y_{N-1})\) and \(V(T, x, y) = U(x, \bar x)\)
\(\cC{\pi_j} = \pi\big(t, y_j, y^{(j)}\big)\): every rival plays the same rule, from their own seat
The league of N · the method
no: the rivals play the new rule
yes: equilibrium
Start
\(\pi_0 = \text{Merton}\)
the rule without the penalty
Freeze
the rivals
a frozen copy of the rule plays them
V network
HJB
my best response to them
m network
Fokker–Planck
where wealth ends up
New rule
\(\pi_{k+1}\)
read from the network
Compare
Δ falling?
is the rule still moving?
Not needed: the rivals are already inside the HJB
Start · round 1
The rivals start by playing Merton
Exact and smooth: the rule without the penalty, no training needed
Each round · freeze
A frozen copy of the rule plays every rival
It does not change during the round, so my problem is an ordinary HJB
Each round · the V network
Train my best response to those rivals
One round is one training, starting from the network of the round before
Each round · the new rule
Read the new rule from the network
The same formula as in the mean field; there is no density to compute
Each round · compare
Has the change stopped falling?
Stop when Δ no longer halves: what is left is training noise
The rounds of the league with N = 5
The league of N · training
The league of N · training
Ledgesno edges: there is no box
the HJB with every rival holds; the rivals’ \(\pi_j\) come from the frozen copy
the right value at the end, now with \(\lambda_N\) and \(\bar y\)
my own slope and curvature at the end, which set my rule
The league of N · the rule
The league of N · real games
A real case · why a square
at a corner, \(\partial_{xx} V = -\infty\)
AMS 516 · Stony Brook University
Questions?
1 / 16
← → or clicker to move · F for full screen