Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.


E.1 First-Order ODEs

General form: x˙=f(x,t)\dot{x} = f(x, t).

TypeFormSolution method
Separablex˙=g(x)h(t)\dot{x} = g(x)h(t)Separate: ∫dx/g(x)=∫h(t)dt\int dx/g(x) = \int h(t)dt
Linearx˙+p(t)x=q(t)\dot{x} + p(t)x = q(t)Integrating factor: μ=e∫p dt\mu = e^{\int p\,dt}
Bernoullix˙+p(t)x=q(t)xn\dot{x} + p(t)x = q(t)x^nSubstitute v=x1−nv=x^{1-n} → linear
Autonomousx˙=f(x)\dot{x} = f(x)Phase line analysis; x∗x^* where f(x∗)=0f(x^*)=0

Linear first-order (constant coefficients): x˙=ax+b\dot{x} = ax + b.

  • Steady state: x∗=−b/ax^* = -b/a (if a≠0a\neq0).

  • General solution: x(t)=(x0−x∗)eat+x∗x(t) = (x_0 - x^*)e^{at} + x^*.

  • Stable iff a<0a < 0.

Stability: Linearize x˙=f(x)\dot{x} = f(x) at x∗x^*: u˙≈f′(x∗)u\dot{u} \approx f'(x^*)u. Stable iff f′(x∗)<0f'(x^*) < 0.

E.2 Second-Order ODEs

Linear, constant coefficients: x¨+px˙+qx=r\ddot{x} + p\dot{x} + qx = r.

Characteristic equation: λ2+pλ+q=0\lambda^2 + p\lambda + q = 0, roots λ1,2=(−p±p2−4q)/2\lambda_{1,2} = (-p \pm \sqrt{p^2-4q})/2.

CaseRootsGeneral solution
Distinct real (p2>4qp^2>4q)λ1≠λ2∈R\lambda_1\neq\lambda_2\in\mathbb{R}C1eλ1t+C2eλ2t+x∗C_1e^{\lambda_1 t}+C_2e^{\lambda_2 t}+x^*
Repeated (p2=4qp^2=4q)λ=−p/2\lambda = -p/2(C1+C2t)eλt+x∗(C_1+C_2 t)e^{\lambda t}+x^*
Complex (p2<4qp^2<4q)λ=α±iβ\lambda = \alpha\pm i\betaeαt(C1cos⁡βt+C2sin⁡βt)+x∗e^{\alpha t}(C_1\cos\beta t + C_2\sin\beta t)+x^*

where α=−p/2\alpha = -p/2, β=4q−p2/2\beta = \sqrt{4q-p^2}/2, x∗=r/qx^* = r/q (particular solution).

Stability: All trajectories → x∗x^* iff Re(λi)<0\text{Re}(\lambda_i) < 0 for both roots.

E.3 Systems of ODEs

Linear system: x˙=Ax+b\dot{\mathbf{x}} = A\mathbf{x} + \mathbf{b}.

  • Steady state: x∗=−A−1b\mathbf{x}^* = -A^{-1}\mathbf{b} (if AA invertible).

  • General solution: x(t)=eAt(x0−x∗)+x∗\mathbf{x}(t) = e^{At}(\mathbf{x}_0 - \mathbf{x}^*) + \mathbf{x}^*.

  • Stable iff all eigenvalues of AA have negative real parts.

  • Saddle point iff det⁡(A)<0\det(A) < 0 (eigenvalues of mixed sign).

Phase portrait classification (2D system, eigenvalues λ1,λ2\lambda_1, \lambda_2):

Eigenvalue typeλ1,λ2<0\lambda_1, \lambda_2 < 0λ1<0<λ2\lambda_1 < 0 < \lambda_2λ1,λ2>0\lambda_1, \lambda_2 > 0Complex α±iβ\alpha\pm i\beta, α<0\alpha < 0
TypeStable nodeSaddleUnstable nodeStable spiral

E.4 Pontryagin Conditions Summary

For max⁡u(t)∫0∞e−ρtF(x,u)dt\max_{u(t)}\int_0^\infty e^{-\rho t}F(x,u)dt s.t. x˙=f(x,u)\dot{x} = f(x,u):

ConditionFormulaInterpretation
Current-value HamiltonianH=F(x,u)+μf(x,u)\mathcal{H} = F(x,u) + \mu f(x,u)utility + shadow value × rate of change
Optimality (FOC)∂H/∂u=0\partial\mathcal{H}/\partial u = 0Maximize H\mathcal{H} over uu
Costate equationμ˙=ρμ−∂H/∂x\dot{\mu} = \rho\mu - \partial\mathcal{H}/\partial xDynamics of shadow price
State equationx˙=∂H/∂μ=f(x,u)\dot{x} = \partial\mathcal{H}/\partial\mu = f(x,u)Law of motion
Transversalitylim⁡t→∞e−ρtμ(t)x(t)=0\lim_{t\to\infty}e^{-\rho t}\mu(t)x(t) = 0No asymptotic rents

Key costate interpretation: μ(t)=∂V/∂x\mu(t) = \partial V/\partial x (shadow price of state = marginal value of relaxing the constraint).


Appendix F: Difference Equations Cheat Sheet


F.1 First-Order Difference Equations

Linear: xt+1=axt+bx_{t+1} = ax_t + b.

  • Steady state: x∗=b/(1−a)x^* = b/(1-a) (a≠1a\neq1).

  • General solution: xt=at(x0−x∗)+x∗x_t = a^t(x_0-x^*) + x^*.

  • Stable iff ∣a∣<1|a| < 1.

Stability and behavior:

ConditionBehavior
0<a<10 < a < 1Monotone convergence to x∗x^*
−1<a<0-1 < a < 0Oscillatory (damped) convergence
a>1a > 1Monotone divergence
a<−1a < -1Oscillatory divergence

Forward-looking equation: xt=aEt[xt+1]+bztx_t = a\mathbb{E}_t[x_{t+1}] + b z_t.

  • If ∣a∣<1|a|<1: unique bounded solution xt=b∑j=0∞ajEt[zt+j]x_t = b\sum_{j=0}^\infty a^j\mathbb{E}_t[z_{t+j}].

  • If ∣a∣>1|a|>1: MSV solution xt=b/(1−aρz)ztx_t = b/(1-a\rho_z)z_t plus possible sunspots.

F.2 Second-Order Difference Equations

Linear: xt+2+pxt+1+qxt=cx_{t+2} + px_{t+1} + qx_t = c.

Characteristic equation: λ2+pλ+q=0\lambda^2 + p\lambda + q = 0, roots λ1,2=(−p±p2−4q)/2\lambda_{1,2} = (-p\pm\sqrt{p^2-4q})/2.

Stability conditions: ∣a∣<1+q|a| < 1+q AND q<1q < 1 (Schur–Cohn conditions — necessary and sufficient).

Root typeDiscriminantSolution form
Real, distinctp2>4qp^2 > 4qC1λ1t+C2λ2t+x∗C_1\lambda_1^t + C_2\lambda_2^t + x^*
Real, equalp2=4qp^2 = 4q(C1+C2t)λt+x∗(C_1+C_2t)\lambda^t + x^*
Complexp2<4qp^2 < 4q, r=qr=\sqrt{q}, θ=arccos⁡(−p/(2r))\theta=\arccos(-p/(2r))rt(C1cos⁡θt+C2sin⁡θt)+x∗r^t(C_1\cos\theta t+C_2\sin\theta t)+x^*

Oscillation period (complex case): T=2π/θT = 2\pi/\theta periods.

F.3 Systems of Difference Equations

Linear system: xt+1=Axt+b\mathbf{x}_{t+1} = A\mathbf{x}_t + \mathbf{b}.

  • Steady state: x∗=(I−A)−1b\mathbf{x}^* = (I-A)^{-1}\mathbf{b}.

  • General solution: xt=At(x0−x∗)+x∗\mathbf{x}_t = A^t(\mathbf{x}_0-\mathbf{x}^*)+\mathbf{x}^*.

  • Stable iff all eigenvalues of AA satisfy ∣λi∣<1|\lambda_i| < 1.

  • IRF at horizon hh: Ah−1bA^{h-1}\mathbf{b} (response to unit impulse).

Companion form. Convert pp-th order scalar system to first-order system with companion matrix:

A=(a1a2⋯ap10⋯001⋯0⋮⋱⋮).A = \begin{pmatrix}a_1 & a_2 & \cdots & a_p \\ 1 & 0 & \cdots & 0 \\ 0 & 1 & \cdots & 0 \\ \vdots & & \ddots & \vdots \end{pmatrix}.

Eigenvalues of AA are the roots of the characteristic polynomial.

F.4 Blanchard–Kahn Counting Rule

For the linearized DSGE Γ0yt=Γ1yt−1+Ψzt+Πηt\Gamma_0\mathbf{y}_t = \Gamma_1\mathbf{y}_{t-1}+\Psi\mathbf{z}_t+\Pi\boldsymbol\eta_t:

Unstable eigenvaluesJump variables (nfn_f)Outcome
=nf= n_fMatchUnique bounded solution ✓
<nf< n_fToo fewIndeterminate (sunspots possible)
>nf> n_fToo manyNo bounded solution

F.5 MSV Solution Procedure Summary

For yt=AEt[yt+1]+Czt\mathbf{y}_t = A\mathbb{E}_t[\mathbf{y}_{t+1}] + C\mathbf{z}_t with zt=Φzt−1+εt\mathbf{z}_t = \Phi\mathbf{z}_{t-1} + \boldsymbol\varepsilon_t:

  1. Conjecture: yt=Ωzt\mathbf{y}_t = \Omega\mathbf{z}_t.

  2. Substitute: Ωzt=AΩΦzt+Czt\Omega\mathbf{z}_t = A\Omega\Phi\mathbf{z}_t + C\mathbf{z}_t.

  3. Sylvester equation: Ω−AΩΦ=C\Omega - A\Omega\Phi = C.

  4. Vectorize: vec(Ω)=(I−Φ′⊗A)−1vec(C)\text{vec}(\Omega) = (I-\Phi'\otimes A)^{-1}\text{vec}(C).

  5. Verify: All eigenvalues of AA outside unit circle iff unique bounded solution.


Appendix G: Time Series Concepts Summary


G.1 Stationarity

Strict stationarity. {yt}\{y_t\} is strictly stationary if the joint distribution of (yt1,…,ytk)(y_{t_1},\ldots,y_{t_k}) equals that of (yt1+h,…,ytk+h)(y_{t_1+h},\ldots,y_{t_k+h}) for all kk, hh, and time indices.

Covariance (weak) stationarity. E[yt]=μ\mathbb{E}[y_t] = \mu (constant), Cov(yt,yt−j)=γj\text{Cov}(y_t, y_{t-j}) = \gamma_j (depends only on lag jj).

Key distinction: Strict ⇒\Rightarrow weak stationarity (for finite variance processes). Weak ⇏\not\Rightarrow strict.

Integrated processes. yt∼I(d)y_t \sim I(d): dd-th difference is stationary. Most macro levels: I(1)I(1); growth rates: I(0)I(0).

G.2 ARMA Representations

AR(pp): yt=∑j=1pϕjyt−j+εty_t = \sum_{j=1}^p\phi_jy_{t-j} + \varepsilon_t. Stationary iff all roots of 1−ϕ1z−⋯−ϕpzp1-\phi_1z-\cdots-\phi_pz^p lie outside the unit circle.

MA(qq): yt=∑j=0qθjεt−jy_t = \sum_{j=0}^q\theta_j\varepsilon_{t-j}. Always stationary.

ARMA(p,qp,q): Combines both. Autocovariance: γj=Cov(yt,yt−j)\gamma_j = \text{Cov}(y_t, y_{t-j}) depends on jj only.

Wold decomposition. Any zero-mean I(0)I(0) process: yt=∑j=0∞ψjεt−jy_t = \sum_{j=0}^\infty\psi_j\varepsilon_{t-j} (MA(∞\infty)) with ∑ψj2<∞\sum\psi_j^2<\infty. Long-run multiplier: ψ(1)=∑ψj\psi(1) = \sum\psi_j.

G.3 VAR Models

VAR(pp): yt=c+∑j=1pAjyt−j+et\mathbf{y}_t = \mathbf{c}+\sum_{j=1}^pA_j\mathbf{y}_{t-j}+\mathbf{e}_t.

OLS estimation: B^=(X′X)−1X′Y\hat{B} = (X'X)^{-1}X'Y — APL: B ← (⌹ X) +.× Y.

Lag selection criteria:

CriterionFormula
AIC$\ln
BIC$\ln
HQ$\ln

BIC consistent; AIC better for forecasting.

Granger causality. xtx_t Granger-causes yty_t iff Ayx,j≠0A_{yx,j}\neq0 for some lag jj — test via F-test on the restricted vs. unrestricted VAR equations.

G.4 Structural VAR Identification

Identification schemes (additional restrictions beyond Σ=B0−1(B0−1)′\Sigma = B_0^{-1}(B_0^{-1})'):

MethodRestrictionsAdvantage
CholeskyLower triangular B0B_0Simple; just-identified
Long-runA(1)A(1) matrix restrictionsStructural economic restrictions
Sign restrictionsIRF signs onlyRobust; set-identified
External instrumentProxy ztz_t correlated with one shockNo ordering assumption

IRF: Response of variable ii to shock jj at horizon hh: (Acomph⋅B0−1)ij(A^h_{comp}\cdot B_0^{-1})_{ij}.

FEVD: Fraction of hh-step MSE of variable ii due to shock jj: ∑k=0h−1(ΨkB0−1)ij2/MSEi(h)\sum_{k=0}^{h-1}(\Psi_k B_0^{-1})_{ij}^2/\text{MSE}_i(h).

G.5 Cointegration

Engle–Granger two-step:

  1. OLS: β^=(X′X)−1X′Y\hat\beta = (X'X)^{-1}X'Y (super-consistent, converges at rate TT).

  2. ADF test on residuals u^t=yt−β^xt\hat{u}_t = y_t - \hat\beta x_t.

Johansen trace statistic: Λtrace(r)=−T∑i=r+1nln⁡(1−λ^i)\Lambda_{trace}(r) = -T\sum_{i=r+1}^n\ln(1-\hat\lambda_i).

Error correction (VECM): Δyt=αβ′yt−1+∑j=1p−1ΓjΔyt−j+εt\Delta\mathbf{y}_t = \alpha\beta'\mathbf{y}_{t-1}+\sum_{j=1}^{p-1}\Gamma_j\Delta\mathbf{y}_{t-j}+\boldsymbol\varepsilon_t, where β\beta = cointegrating vectors, α\alpha = adjustment speeds.

G.6 Key Test Statistics

TestStatisticDistribution under H0H_0Purpose
ADFtγ^t_{\hat\gamma} in augmented regressionDF distribution (non-standard)Unit root
Johansen trace−T∑ln⁡(1−λ^i)-T\sum\ln(1-\hat\lambda_i)Non-standardCointegration rank
Diebold–Marianodˉ/V^/N\bar{d}/\sqrt{\hat V/N}N(0,1)\mathcal{N}(0,1)Forecast accuracy
Ljung–BoxT(T+2)∑j=1mρ^j2/(T−j)T(T+2)\sum_{j=1}^m\hat\rho_j^2/(T-j)χ2(m)\chi^2(m)Serial correlation
Granger causalityFF-statistic on excluded lagsF(p,T−2p−1)F(p,T-2p-1)Granger causality