Optimisation & Mathematical Methods for Economics The University of Edinburgh · School of Economics
This final week surveys three frontiers where optimisation meets modern economics and data science: stochastic dynamic programming, stochastic gradient descent for machine learning, and Bayesian optimisation for simulation-based models.
1. Stochastic Dynamic Programming
Real economies face uncertainty. The Bellman equation becomes:
Over 10 weeks we have built a complete optimisation toolkit:
Weeks
Topic
Key result
1
Foundations
Eigenvalues, positive definiteness
2–3
Unconstrained
FOC/SOC, gradient descent, Newton
4–5
Constrained
Lagrange, KKT, complementary slackness
6
Convex
Global optimality, duality, CVXPY
7
Linear programming
Simplex, shadow prices, LP duality
8–9
Dynamic
Euler equation, Bellman, VFI
10
Frontiers
Stochastic DP, SGD, modern methods
These tools underpin virtually every model in modern economics — from consumer choice to DSGE models to machine learning.
Exercises
Exercise 1: Implement SGD with momentum: \(v_{t+1} = \gamma v_t + \alpha \nabla \ell\) and \(\theta_{t+1} = \theta_t - v_{t+1}\). Does it converge faster than vanilla SGD?
theta_mom = np.zeros(d)v = np.zeros(d)gamma =0.9for t inrange(200): idx = np.random.choice(n, batch_size) grad = (2/batch_size) * X[idx].T @ (X[idx] @ theta_mom - y[idx]) v = gamma * v + lr * grad theta_mom -= v# Yes, momentum smooths the updates and typically converges faster.