7. Stochastic Calculus and Control
7. Stochastic Calculus and Control
本讲导读 本讲(Toda 第 7 讲,全书最后一讲)讲随机微积分与随机控制的基础(详见 Chang 2004、Shreve 2004)。§1 布朗运动:从随机游走极限引出 BM(\(X(0)=0\)、路径连续、独立增量 \(X(t)-X(s)\sim N(0,\sigma^2(t-s))\)),以及多维 BM。§2 随机微积分:Ito(随机)积分(左端取值、\(\int_0^T B\,dB=\frac12 B(T)^2-\frac12 T\))、微分规则 \((dt)^2=0,\ dt\,dB=0,\ (dB)^2=dt\)、扩散 \(dX=g\,dt+v\,dB\)、Ito 公式 \(df(t,X)=(f_t+gf_x+\frac12 v^2 f_{xx})dt+vf_x\,dB\)(含多维)。§3 随机控制:3.1 HJB 方程(值函数 \(J\)、HJB (5)、Thm 1 验证定理 + 横截性条件、贴现情形);3.2 Merton 问题(最优组合 \(\theta=\frac1\gamma\Sigma^{-1}(\mu-r\mathbf1)\)、消费率 (7));3.3 Saito (1998) 异质主体一般均衡(市场出清 ⟹ \(r=\frac{\mathbf1'\Sigma^{-1}\mu-\gamma}{\mathbf1'\Sigma^{-1}\mathbf1}\),特质风险影响利率与溢价)。含习题与每讲参考文献。
7. Stochastic Calculus and Control
Overview This lecture (Toda's Lecture 7, the book's last) covers the basics of stochastic calculus and control (see Chang 2004, Shreve 2004). §1 Brownian motion: derive BM as a random-walk limit (\(X(0)=0\), continuous paths, independent increments \(X(t)-X(s)\sim N(0,\sigma^2(t-s))\)), and multidimensional BM. §2 stochastic calculus: the Ito (stochastic) integral (left-endpoint evaluation, \(\int_0^T B\,dB=\frac12 B(T)^2-\frac12 T\)), the differential rules \((dt)^2=0,\ dt\,dB=0,\ (dB)^2=dt\), a diffusion \(dX=g\,dt+v\,dB\), and Ito's formula \(df(t,X)=(f_t+gf_x+\frac12 v^2 f_{xx})dt+vf_x\,dB\) (with the multidimensional version). §3 stochastic control: 3.1 the HJB equation (value function \(J\), HJB (5), Thm 1 verification + transversality, the discounted case); 3.2 the Merton problem (optimal portfolio \(\theta=\frac1\gamma\Sigma^{-1}(\mu-r\mathbf1)\), consumption rule (7)); 3.3 Saito (1998) heterogeneous-agent general equilibrium (market clearing ⟹ \(r=\frac{\mathbf1'\Sigma^{-1}\mu-\gamma}{\mathbf1'\Sigma^{-1}\mathbf1}\), idiosyncratic risk affects the rate and premia). Includes exercises and per-lecture references.
1 布朗运动 / Brownian Motion
1 Brownian Motion
由随机游走到布朗运动 / From random walk to Brownian motion
设概率空间 \((\Omega,\mathcal F,\mathbb P)\)。离散时间过程 \(\{X(t)\}\) 是随机游走,若 \(X(0)=0\)、\(X(t)=X(t-1)+\epsilon_t\)(\(\{\epsilon_t\}\) i.i.d. 均值 0、方差 \(\sigma^2\))。把 \([t,t+1)\) 分成长 \(\Delta t\) 的子区间,令 \(X(t)=\sum_{k=1}^{t/\Delta t}u_k\)(\(\{u_k\}\) i.i.d. 均值 0),由 \(\sigma^2 t=\mathrm{Var}[X(t)]=(t/\Delta t)\mathrm{Var}[u_k]\) 得 \(\mathrm{Var}[u_k]=\sigma^2\Delta t\)。\(\Delta t\to0\) 时由中心极限定理 \(X(t)-X(s)\sim N(0,\sigma^2(t-s))\)。正式地,连续时间过程 \(\{X(t)\}_{t\ge0}\) 是布朗运动,若:(1) \(X(0)=0\);(2) 路径 \(t\mapsto X(t)\) 几乎必然连续;(3) 对 \(0
2 随机微积分 / Stochastic Calculus
Ito(随机)积分 / The Ito (stochastic) integral 设滤波 \(\{\mathcal F_t\}\),\(a,B\) 适应。对 \(a\) 为时间常数 \(\int_0^T a\,dB=aB(T)\);对阶梯 \(a\),\(\int_0^T a\,dB=\sum_n a(t_{n-1})(B(t_n)-B(t_{n-1}))\)。一般地对 càdlàg(右连续有左极限)\(a\),Let \(\{\mathcal F_t\}\) be a filtration with \(a,B\) adapted. For \(a\) constant in time \(\int_0^T a\,dB=aB(T)\); for a step \(a\), \(\int_0^T a\,dB=\sum_n a(t_{n-1})(B(t_n)-B(t_{n-1}))\). In general, for càdlàg (right-continuous, left-limited) \(a\),
$$\int_0^T a(t,\omega)\,dB(t)=\lim\sum_{n=1}^N a(t_{n-1},\omega)(B(t_n)-B(t_{n-1})),\tag{1}$$
极限取遍越来越细的分割,对平方可积 \(\mathbb E[\int_0^T|a|^2dt]<\infty\) 有意义。与 Riemann-Stieltjes 积分的唯一区别是:被积函数在区间左端 \(t_{n-1}\) 取值(极限依赖取值点;用中点为 Stratonovich 积分,从不使用)。经济金融中主体依现有信息行动,故用左端(否则需预知未来)。例:\(\int_0^T B\,dB\):由 \(B_{n-1}(B_n-B_{n-1})=\frac12(B_n^2-B_{n-1}^2-(B_n-B_{n-1})^2)\) 与大数定律 \(\frac1N\sum(\sqrt N(B_n-B_{n-1}))^2\xrightarrow{a.s.}T\),得the limit taken over finer and finer partitions, well-defined for square-integrable \(\mathbb E[\int_0^T|a|^2dt]<\infty\). The only difference from the Riemann-Stieltjes integral is that the integrand is evaluated at the left endpoint \(t_{n-1}\) (the limit depends on the evaluation point; the midpoint gives the Stratonovich integral, never used). In economics/finance agents act on current information, so the left point is natural (else one would need to know the future). Example: \(\int_0^T B\,dB\): from \(B_{n-1}(B_n-B_{n-1})=\frac12(B_n^2-B_{n-1}^2-(B_n-B_{n-1})^2)\) and the law of large numbers \(\frac1N\sum(\sqrt N(B_n-B_{n-1}))^2\xrightarrow{a.s.}T\),
$$\int_0^T B\,dB=\frac12 B(T)^2-\frac12 T.$$
微分规则与扩散 / Differential rules and diffusions 用微分 \(dt,dB\) 更方便。规则:\((dt)^2=0\)、\(dt\,dB=0\)、\((dB)^2=dt\)(分别由 \(\sum(t_n-t_{n-1})^2\to0\)、\(\sum(t_n-t_{n-1})(B_n-B_{n-1})\xrightarrow{a.s.}0\)、\(\sum(B_n-B_{n-1})^2\xrightarrow{a.s.}T=\int_0^T dt\) 论证)(3a)–(3c)。若 \(X(t)=X(0)+\int_0^t g\,ds+\int_0^t v\,dB\)(\(g,v\) 适应),称 \(X\) 为扩散(Ito 过程),记 \(dX=g\,dt+v\,dB\),\(g,v\) 为漂移与扩散系数(瞬时增长与波动);并有 \(dt\,dX=0\)、\((dX)^2=v^2dt\)。Differentials \(dt,dB\) are more convenient. Rules: \((dt)^2=0\), \(dt\,dB=0\), \((dB)^2=dt\) (justified by \(\sum(t_n-t_{n-1})^2\to0\), \(\sum(t_n-t_{n-1})(B_n-B_{n-1})\xrightarrow{a.s.}0\), \(\sum(B_n-B_{n-1})^2\xrightarrow{a.s.}T=\int_0^T dt\)) (3a)–(3c). If \(X(t)=X(0)+\int_0^t g\,ds+\int_0^t v\,dB\) (\(g,v\) adapted), \(X\) is a diffusion (Ito process), written \(dX=g\,dt+v\,dB\), with \(g,v\) the drift and diffusion coefficients (instantaneous growth and volatility); and \(dt\,dX=0\), \((dX)^2=v^2dt\).
Ito 公式 / Ito's formula 设 \(f\) 为 \(C^2\)。对 \(X(t)=B(t)\) 由 Taylor 展开取极限(首项→\(\int f'(B)dB\)、二阶项→\(\int\frac12 f''(B)dt\))得 Ito 公式Let \(f\) be \(C^2\). For \(X(t)=B(t)\), Taylor-expanding and taking the limit (first term \(\to\int f'(B)dB\), second \(\to\int\frac12 f''(B)dt\)) gives Ito's formula
$$df(B)=f'(B)\,dB+\frac12 f''(B)\,dt.\tag{4}$$
含时间 \(f(t,x)\):\(df(t,B)=f_t\,dt+f_x\,dB+\frac12 f_{xx}\,dt\)(记 \(\frac12 f_{xx}(dB)^2\),因 \((dB)^2=dt\))。对一般扩散 \(dX=g\,dt+v\,dB\):For time-dependent \(f(t,x)\): \(df(t,B)=f_t\,dt+f_x\,dB+\frac12 f_{xx}\,dt\) (or \(\frac12 f_{xx}(dB)^2\) since \((dB)^2=dt\)). For a general diffusion \(dX=g\,dt+v\,dB\):
$$df(t,X)=f_t\,dt+f_x\,dX+\frac12 f_{xx}(dX)^2=\left(f_t+gf_x+\frac12 v^2 f_{xx}\right)dt+vf_x\,dB.$$
故扩散的 \(C^2\) 函数仍是扩散。多维:若 \(dX=g\,dt+V\,dB\)(\(g\) 为 \(d_x\times1\)、\(V\) 为 \(d_x\times d_b\)、\(B\) 为瞬时方差 \(\Sigma\) 的 \(d_b\) 维 BM),则 \(df(t,X)=(f_t+f_x g+\frac12\mathrm{tr}[f_{xx}(V\Sigma V')])dt+f_x V\,dB\)。记忆法:Taylor 展到二阶 + 规则 \((dt)^2=0,\ dt\,dB=0,\ (dB)(dB)'=\Sigma\,dt\)。So a \(C^2\) function of a diffusion is again a diffusion. Multidimensional: if \(dX=g\,dt+V\,dB\) (\(g\) is \(d_x\times1\), \(V\) is \(d_x\times d_b\), \(B\) a \(d_b\)-dim BM with instantaneous variance \(\Sigma\)), then \(df(t,X)=(f_t+f_x g+\frac12\mathrm{tr}[f_{xx}(V\Sigma V')])dt+f_x V\,dB\). Mnemonic: Taylor-expand \(f\) to second order and use \((dt)^2=0,\ dt\,dB=0,\ (dB)(dB)'=\Sigma\,dt\).
3 随机控制 / Stochastic Control
3.1 Hamilton-Jacobi-Bellman 方程 / 3.1 HJB equation 考虑 \(\max\mathbb E_0[\int_0^\infty f(s,X(s),Y(s))ds]\) s.t. \(dX=g(t,X,Y)dt+V(t,X,Y)dB\)(\(X\) 状态、\(Y\) 控制、\(B\) 瞬时方差 \(\Sigma\) 的多维 BM)。值函数 \(J(t,x)=\sup_{\{Y(s)\}_{s\ge t}}\mathbb E_t[\int_t^\infty f\,ds]\)。由离散 Bellman 取 \(\Delta t\to0\) 并用 Ito(\(\mathbb E_t[dJ]=(J_t+J_x g+\frac12\mathrm{tr}[J_{xx}(V\Sigma V')])dt\)),得 HJB 方程Consider \(\max\mathbb E_0[\int_0^\infty f(s,X(s),Y(s))ds]\) s.t. \(dX=g(t,X,Y)dt+V(t,X,Y)dB\) (\(X\) state, \(Y\) control, \(B\) a multidim BM with instantaneous variance \(\Sigma\)). The value function \(J(t,x)=\sup_{\{Y(s)\}_{s\ge t}}\mathbb E_t[\int_t^\infty f\,ds]\). From the discrete Bellman equation as \(\Delta t\to0\), using Ito (\(\mathbb E_t[dJ]=(J_t+J_x g+\frac12\mathrm{tr}[J_{xx}(V\Sigma V')])dt\)), the HJB equation
$$0=\sup_y\left\{f(t,x,y)+J_t+J_x g+\frac12\mathrm{tr}[J_{xx}(V\Sigma V')]\right\}.\tag{5}$$
定理 1(验证定理)与贴现情形 / Theorem 1 (verification) and the discounted case 定理 1:设 \(J(t,x)\) 关于 \(t\) 为 \(C^1\)、\(x\) 为 \(C^2\),\(\{(X(t),Y(t))\}\) 可行,\(\mathbb E_0[\int_0^\infty|f|ds]<\infty\)。若 (i) \(J\) 满足 HJB (5),(ii) 横截性条件 \(\lim_{T\to\infty}\mathbb E_t[J(T,X(T))]=0\),则 \(\mathbb E_t[\int_t^\infty f\,ds]\le J(t,X(t))\),且当 \(Y(t)\) 取 HJB 的 arg max 时取等。即:值函数光滑时 HJB 必要;HJB + 横截性充分。 贴现情形:\(f=e^{-\beta t}u(x,y)\),令未贴现值函数 \(\tilde J(x)=e^{\beta t}J(t,x)\),HJB 化为 \(0=\max_y\{u(x,y)-\beta\tilde J+\tilde J_x g+\frac12\mathrm{tr}[\tilde J_{xx}(V\Sigma V')]\}\)。Theorem 1: let \(J(t,x)\) be \(C^1\) in \(t\), \(C^2\) in \(x\), \(\{(X(t),Y(t))\}\) feasible, \(\mathbb E_0[\int_0^\infty|f|ds]<\infty\). If (i) \(J\) satisfies HJB (5) and (ii) the transversality condition \(\lim_{T\to\infty}\mathbb E_t[J(T,X(T))]=0\), then \(\mathbb E_t[\int_t^\infty f\,ds]\le J(t,X(t))\), with equality when \(Y(t)\) is the arg max of the HJB. So: smoothness of the value function makes HJB necessary; HJB + transversality is sufficient. Discounted case: \(f=e^{-\beta t}u(x,y)\); with the undiscounted value function \(\tilde J(x)=e^{\beta t}J(t,x)\), HJB reduces to \(0=\max_y\{u(x,y)-\beta\tilde J+\tilde J_x g+\frac12\mathrm{tr}[\tilde J_{xx}(V\Sigma V')]\}\).
定理 1 证明 / Proof of Theorem 1 由 Bellman,\(f(s,X,Y)\le-(J_t+J_x g+\frac12\mathrm{tr}[J_{xx}(V\Sigma V')])\)。从 \(s=t\) 到 \(T\) 积分、取条件期望(BM 零均值增量、Ito)得 \(\mathbb E_t[\int_t^T f\,ds]\le J(t,X(t))-\mathbb E_t[J(T,X(T))]\)。令 \(T\to\infty\),由控制收敛定理与横截性条件得 \(\mathbb E_t[\int_t^\infty f\,ds]\le J(t,X(t))\)。\(\blacksquare\)By the Bellman equation, \(f(s,X,Y)\le-(J_t+J_x g+\frac12\mathrm{tr}[J_{xx}(V\Sigma V')])\). Integrating from \(s=t\) to \(T\) and taking conditional expectations (zero-mean BM increments, Ito) gives \(\mathbb E_t[\int_t^T f\,ds]\le J(t,X(t))-\mathbb E_t[J(T,X(T))]\). Letting \(T\to\infty\), by the dominated convergence theorem and the transversality condition, \(\mathbb E_t[\int_t^\infty f\,ds]\le J(t,X(t))\). \(\blacksquare\)
3.2 Merton 问题 / 3.2 The Merton problem 状态为财富 \(w\),控制为消费 \(c\) 与组合 \(\theta\)。未贴现 HJB \(0=\max_{c,\theta}\{u(c)-\beta J+J'(w)[(r+(\mu-r\mathbf1)'\theta)w-c]+\frac12 w^2 J''(w)\theta'\Sigma\theta\}\)。对 \(c\) 的一阶条件 \(u'(c)=J'(w)\);对 \(\theta\) 的一阶条件 \(wJ'(w)(\mu-r\mathbf1)+w^2 J''(w)\Sigma\theta=0\iff\theta=-\frac{J'(w)}{wJ''(w)}\Sigma^{-1}(\mu-r\mathbf1)\)。若 \(u(c)=\frac{c^{1-\gamma}}{1-\gamma}\),由齐次性猜 \(J(w)=A\frac{w^{1-\gamma}}{1-\gamma}\)(\(A>0\)),得最优组合The state is wealth \(w\), controls are consumption \(c\) and portfolio \(\theta\). The undiscounted HJB is \(0=\max_{c,\theta}\{u(c)-\beta J+J'(w)[(r+(\mu-r\mathbf1)'\theta)w-c]+\frac12 w^2 J''(w)\theta'\Sigma\theta\}\). The FOC in \(c\) is \(u'(c)=J'(w)\); the FOC in \(\theta\) is \(wJ'(w)(\mu-r\mathbf1)+w^2 J''(w)\Sigma\theta=0\iff\theta=-\frac{J'(w)}{wJ''(w)}\Sigma^{-1}(\mu-r\mathbf1)\). If \(u(c)=\frac{c^{1-\gamma}}{1-\gamma}\), by homotheticity guess \(J(w)=A\frac{w^{1-\gamma}}{1-\gamma}\) (\(A>0\)), giving the optimal portfolio
$$\theta=\frac1\gamma\Sigma^{-1}(\mu-r\mathbf1),$$
代回 HJB 得最优消费规则 \(c_t=mw_t\),and substituting back into the HJB gives the optimal consumption rule \(c_t=mw_t\),
$$m=\beta\varepsilon+(1-\varepsilon)\left(r+\frac1{2\gamma}(\mu-r\mathbf1)'\Sigma^{-1}(\mu-r\mathbf1)\right),\qquad\varepsilon=\frac1\gamma\ (\text{EIS}).\tag{7}$$
详见 Merton (1969, 1971);Epstein-Zin 偏好情形见 Svensson (1989)(公式相同);连续时间递归效用见 Duffie-Epstein (1992a,b)。See Merton (1969, 1971); for Epstein-Zin preferences see Svensson (1989) (same formula); for continuous-time recursive utility see Duffie-Epstein (1992a,b).
3.3 Saito (1998) 异质主体一般均衡 / 3.3 Saito (1998) heterogeneous-agent GE 把最优组合问题作为构件可得解析可解的异质主体一般均衡,最简单者即 Saito (1998)。两种技术:技术 1(股市)\(dK/K=\mu_1 dt+\sigma_1 dB_1\);技术 2(私人股权)\(dK/K=\mu_2 dt+\sigma_2 dB_2+\sigma_i dB_i\)(\(dB_1 dB_2=\rho\,dt\),\(B_i\) 跨主体 i.i.d. 且独立于总量冲击)。每主体最大化 CRRA 效用 s.t. 预算约束。令 \(\mu=(\mu_1,\mu_2)'\)、\(\Sigma=\begin{bmatrix}\sigma_1^2&\rho\sigma_1\sigma_2\\\rho\sigma_1\sigma_2&\sigma_2^2+\sigma_i^2\end{bmatrix}\),最优组合 \(\theta=\frac1\gamma\Sigma^{-1}(\mu-r\mathbf1)\)、消费 \(c_t=mw_t\)。一般均衡:各主体组合相同,无风险资产零净供给 ⟹ 市场出清 \(1-\theta_1-\theta_2=0\iff\mathbf1'\frac1\gamma\Sigma^{-1}(\mu-r\mathbf1)=1\),解得Using the optimal portfolio problem as a building block yields analytically tractable heterogeneous-agent general equilibrium, the simplest being Saito (1998). Two technologies: technology 1 (stock market) \(dK/K=\mu_1 dt+\sigma_1 dB_1\); technology 2 (private equity) \(dK/K=\mu_2 dt+\sigma_2 dB_2+\sigma_i dB_i\) (\(dB_1 dB_2=\rho\,dt\), \(B_i\) i.i.d. across agents and independent of aggregate shocks). Each agent maximizes CRRA utility subject to the budget constraint. With \(\mu=(\mu_1,\mu_2)'\), \(\Sigma=\begin{bmatrix}\sigma_1^2&\rho\sigma_1\sigma_2\\\rho\sigma_1\sigma_2&\sigma_2^2+\sigma_i^2\end{bmatrix}\), the optimal portfolio \(\theta=\frac1\gamma\Sigma^{-1}(\mu-r\mathbf1)\) and consumption \(c_t=mw_t\). General equilibrium: every agent's portfolio is the same, and the risk-free asset is in zero net supply ⟹ market clearing \(1-\theta_1-\theta_2=0\iff\mathbf1'\frac1\gamma\Sigma^{-1}(\mu-r\mathbf1)=1\), solving to
$$r=\frac{\mathbf1'\Sigma^{-1}\mu-\gamma}{\mathbf1'\Sigma^{-1}\mathbf1}.$$
可见特质冲击一般会影响无风险利率与风险溢价(详见 Toda 2015)。例如 \(\mu_1=\mu_2=\mu\) 时 \(r=\mu-\frac\gamma{\mathbf1'\Sigma^{-1}\mathbf1}\),两资产的股权溢价 $>0$ 且随特质波动 \(\sigma_i\) 递增。Thus the idiosyncratic shock generically affects the risk-free rate and risk premia (see Toda 2015). E.g. when \(\mu_1=\mu_2=\mu\), \(r=\mu-\frac\gamma{\mathbf1'\Sigma^{-1}\mathbf1}\), the equity premium on both assets is $>0$ and increasing in the idiosyncratic volatility \(\sigma_i\).
Exercises / 习题
习题 / Exercises 1. 证明 (3a) 与 (3b)((3c) 已在正文证明)。2. 证明 (6)(多维 Ito 公式的展开)。3. 推导 (7)(最优消费率 \(m\))。1. Prove (3a) and (3b) ((3c) is proved in the text). 2. Prove (6) (the expansion of the multidimensional Ito formula). 3. Derive (7) (the optimal consumption rate \(m\)).
References
- Angeletos, G.-M. and V. Panousi (2011). Financial Integration, Entrepreneurial Risk and Global Dynamics. Journal of Economic Theory 146(3), 863–896.
- Benhabib, J., A. Bisin, and S. Zhu (2011). The Distribution of Wealth and Fiscal Policy in Economies with Finitely Lived Agents. Econometrica 79(1), 123–157.
- Chang, F.-R. (2004). Stochastic Optimization in Continuous Time. Cambridge University Press.
- Constantinides, G. M. and D. Duffie (1996). Asset Pricing with Heterogeneous Consumers. Journal of Political Economy 104(2), 219–240.
- Duffie, D. and L. G. Epstein (1992a). Stochastic Differential Utility. Econometrica 60(2), 353–394.
- Duffie, D. and L. G. Epstein (1992b). Asset Pricing with Stochastic Differential Utility. Review of Financial Studies 5(3), 411–436.
- Merton, R. C. (1969). Lifetime Portfolio Selection under Uncertainty: The Continuous-Time Case. Review of Economics and Statistics 51(3), 247–257.
- Merton, R. C. (1971). Optimum Consumption and Portfolio Rules in a Continuous-Time Model. Journal of Economic Theory 3(4), 373–413.
- Saito, M. (1998). A Simple Model of Incomplete Insurance: The Case of Permanent Shocks. Journal of Economic Dynamics and Control 22(5), 763–777.
- Shreve, S. E. (2004). Stochastic Calculus for Finance II — Continuous-Time Models. Springer.
- Svensson, L. E. O. (1989). Portfolio Choice with Non-Expected Utility in Continuous Time. Economics Letters 30(4), 313–317.
- Toda, A. A. (2015). Asset Prices and Efficiency in a Krebs Economy. Review of Economic Dynamics 18(4), 957–978.