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.

Tobin’s q and Investment Dynamics

“Tobin’s q is the ratio of the market value of capital to its replacement cost. When q > 1, install more; when q < 1, let capital depreciate.” — James Tobin

Cross-reference: Principles Ch. 12 (investment theory: Jorgenson, Tobin’s q, real options, adjustment costs); Ch. 24.2 (financial accelerator and Hayashi’s theorem) [P:Ch.12, P:Ch.24.2]


13.1 Why Adjustment Costs? Motivating the Model

The neoclassical investment theory of Jorgenson (1963) [P:Ch.12.1] determines the optimal capital stock by equating the marginal product of capital to the user cost: f(K)=r+δf'(K^*) = r + \delta. In this frictionless framework, the firm immediately jumps to the optimal capital stock in response to any shock. Observed investment is then simply the instantaneous jump K˙=ΔK\dot{K} = \Delta K^* — an impulse function.

This prediction is empirically implausible. Investment data show:

  • Investment responds gradually to shocks, not in a single jump.

  • Firms do not continuously adjust capital; there are periods of high investment followed by consolidation.

  • The correlation between Tobin’s qq and investment is positive but loose — firms do not instantly equate qq to 1.

The adjustment cost model explains these patterns by introducing costs of rapid capital accumulation: installing new capital requires not just purchasing it but also disrupting ongoing production, training workers, and reorganizing the production process. These installation costs make it optimal to spread investment over time rather than adjusting instantaneously.

Formally, we assume a strictly convex adjustment cost function Φ(I,K)\Phi(I, K) that increases in II (higher investment is more expensive) and is homogeneous of degree one in (I,K)(I, K) — a standard specification that leads to the elegant results of this chapter.


13.2 The Firm’s Optimal Control Problem

13.2.1 Setup

A representative firm owns capital K(t)K(t) and chooses investment I(t)I(t) to maximize the present value of profits. The firm’s optimization problem:

maxI(t)0ert[π(K)IΦ(I,K)]dt\max_{I(t)} \int_0^\infty e^{-rt}\left[\pi(K) - I - \Phi(I, K)\right]\,dt

subject to: K˙=IδK\dot{K} = I - \delta K, K(0)=K0K(0) = K_0 given.

where:

  • π(K)=F(K,L)wL\pi(K) = F(K, L^*) - w^*L^* is operating profit (maximized over labor), an increasing concave function of KK.

  • II is gross investment (at purchase cost normalized to 1 per unit).

  • Φ(I,K)=ψ2(IK)2K=ψI22K\Phi(I, K) = \frac{\psi}{2}\left(\frac{I}{K}\right)^2 K = \frac{\psi I^2}{2K} is the quadratic adjustment cost function (Hayashi, 1982 specification), with ψ>0\psi > 0 the adjustment cost parameter.

  • rr is the (constant) discount rate.

  • δ\delta is the depreciation rate.

Definition 13.1 (Quadratic Adjustment Costs). The adjustment cost function Φ(I,K)=(ψ/2)(I/K)2K\Phi(I, K) = (\psi/2)(I/K)^2K has the properties:

  • Φ(0,K)=0\Phi(0, K) = 0: zero investment has zero adjustment cost.

  • ΦI=ψI/K>0\Phi_I = \psi I/K > 0: marginal adjustment cost is positive and increasing in the investment rate I/KI/K.

  • ΦII=ψ/K>0\Phi_{II} = \psi/K > 0: the marginal adjustment cost is increasing in II (strictly convex).

  • Homogeneous of degree 1 in (I,K)(I, K): Φ(λI,λK)=λΦ(I,K)\Phi(\lambda I, \lambda K) = \lambda\Phi(I, K).

The homogeneity assumption is crucial for Hayashi’s theorem (Section 13.5).

13.2.2 The Current-Value Hamiltonian

Apply the optimal control machinery of Chapter 11. The state variable is K(t)K(t); the control variable is I(t)I(t); the costate variable q(t)q(t) is the shadow price of an additional unit of capital.

Definition 13.2 (Tobin’s q as Costate Variable). The marginal q is the shadow value of an installed unit of capital — the costate variable of the firm’s optimal control problem:

q(t)V(K,t)K,q(t) \equiv \frac{\partial V(K, t)}{\partial K},

where V(K,t)=maxI()ter(st)[π(K)IΦ(I,K)]dsV(K, t) = \max_{I(\cdot)}\int_t^\infty e^{-r(s-t)}[\pi(K) - I - \Phi(I,K)]\,ds is the firm’s value function.

The current-value Hamiltonian:

H(K,I,q)=π(K)IψI22K+q(IδK).\mathcal{H}(K, I, q) = \pi(K) - I - \frac{\psi I^2}{2K} + q(I - \delta K).

13.2.3 Pontryagin Conditions

Condition 1 (FOC with respect to II):

HI=1ψIK+q=0    q=1+ψIK.\frac{\partial\mathcal{H}}{\partial I} = -1 - \frac{\psi I}{K} + q = 0 \implies \boxed{q = 1 + \frac{\psi I}{K}.}

This immediately gives the investment function:

IK=q1ψ.\frac{I}{K} = \frac{q - 1}{\psi}.

Investment is zero when q=1q = 1, positive when q>1q > 1, and negative (disinvestment) when q<1q < 1. The parameter ψ\psi controls the sensitivity of the investment rate to qq: high ψ\psi (large adjustment costs) means investment responds slowly to qq deviations.

Condition 2 (Costate equation for qq):

q˙=rqHK=rqπ(K)ψI22K2(1)K1K.\dot{q} = rq - \frac{\partial\mathcal{H}}{\partial K} = rq - \pi'(K) - \frac{\psi I^2}{2K^2}\cdot(-1)\cdot K\cdot\frac{1}{K}.

Wait — let us compute H/K\partial\mathcal{H}/\partial K carefully:

HK=π(K)+ψI22K2qδ.\frac{\partial\mathcal{H}}{\partial K} = \pi'(K) + \frac{\psi I^2}{2K^2} - q\delta.

Therefore:

q˙=rqπ(K)ψI22K2+qδ=(r+δ)qπ(K)ψ2(IK)2.\dot{q} = rq - \pi'(K) - \frac{\psi I^2}{2K^2} + q\delta = (r+\delta)q - \pi'(K) - \frac{\psi}{2}\left(\frac{I}{K}\right)^2.

Substituting the investment function I/K=(q1)/ψI/K = (q-1)/\psi:

q˙=(r+δ)qπ(K)(q1)22ψ.\boxed{\dot{q} = (r+\delta)q - \pi'(K) - \frac{(q-1)^2}{2\psi}.}

Condition 3 (State equation):

K˙=IδK=KIKδK=(q1)KψδK=K[q1ψδ].\dot{K} = I - \delta K = K\cdot\frac{I}{K} - \delta K = \frac{(q-1)K}{\psi} - \delta K = K\left[\frac{q-1}{\psi} - \delta\right].

Condition 4 (Transversality):

limtertq(t)K(t)=0.\lim_{t\to\infty}e^{-rt}q(t)K(t) = 0.

13.3 The Investment Function and Its Interpretation

The investment function I/K=(q1)/ψI/K = (q-1)/\psi is the central result of the model. It has a clean economic interpretation:

When q>1q > 1: The shadow price of installed capital exceeds its replacement cost. The firm can increase its value by investing — each dollar of investment generates more than one dollar of firm value. It is optimal to invest until capital accumulation drives down π(K)\pi'(K) (diminishing returns), reducing qq back toward 1.

When q<1q < 1: The shadow price of installed capital is below its replacement cost. The firm’s installed capital is worth less than it costs to replace. It should allow capital to depreciate without replacement (disinvestment at rate δ\delta) until capital falls and π(K)\pi'(K) rises enough to bring qq back to 1.

When q=1q = 1: The firm is at its optimal capital stock. Net investment is zero; gross investment exactly covers depreciation.

Definition 13.3 (Tobin’s Average q and Marginal q). Average q is the ratio of the firm’s market value to the replacement cost of its capital stock: qˉ=V/K\bar{q} = V/K. Marginal q is the shadow price q=V/Kq = \partial V/\partial K. These two concepts differ in general, but Hayashi’s theorem (Section 13.5) identifies conditions under which they are equal.


13.4 The (K,q)(K, q) Phase Plane

The two-equation system (K˙,q˙)(\dot{K}, \dot{q}) forms a 2D autonomous system amenable to phase-plane analysis.

13.4.1 Nullclines

K˙=0\dot{K} = 0 nullcline: q=1+δψq = 1 + \delta\psi. This is a horizontal line at q=1+ψδq^* = 1 + \psi\delta. (When δ=0\delta = 0, the nullcline is q=1q = 1.) Above this line, q>1+ψδq > 1 + \psi\delta implies I/K>δI/K > \delta, so KK is growing. Below, KK is shrinking.

q˙=0\dot{q} = 0 nullcline: (r+δ)qπ(K)(q1)2/(2ψ)=0(r+\delta)q - \pi'(K) - (q-1)^2/(2\psi) = 0. This is a curve in (K,q)(K, q) space. For the steady state q=1+ψδq^* = 1 + \psi\delta:

π(K)=(r+δ)(1+ψδ)(ψδ)22ψ=(r+δ)+ψδ(r+δ)ψδ22.\pi'(K^*) = (r+\delta)(1+\psi\delta) - \frac{(\psi\delta)^2}{2\psi} = (r+\delta) + \psi\delta(r+\delta) - \frac{\psi\delta^2}{2}.

For δ=0\delta = 0: π(K)=r\pi'(K^*) = r — the standard Jorgenson condition (MPK = user cost) is recovered as a special case when adjustment costs do not interact with depreciation.

13.4.2 Steady State and Saddle-Point Property

Theorem 13.1 (Saddle-Point Property of the (K,q)(K,q) System). Under standard regularity conditions (π<0\pi'' < 0), the steady state of the (K,q)(K, q) system is a saddle point.

Proof. The Jacobian of (K˙,q˙)(\dot{K}, \dot{q}) with respect to (K,q)(K, q) at the steady state:

J=(K˙/KK˙/qq˙/Kq˙/q)=((q1)/ψδK/ψπ(K)(r+δ)(q1)/ψ).J = \begin{pmatrix} \partial\dot{K}/\partial K & \partial\dot{K}/\partial q \\ \partial\dot{q}/\partial K & \partial\dot{q}/\partial q \end{pmatrix} = \begin{pmatrix} (q^*-1)/\psi - \delta & K^*/\psi \\ -\pi''(K^*) & (r+\delta) - (q^*-1)/\psi \end{pmatrix}.

At the steady state: (q1)/ψ=δ(q^*-1)/\psi = \delta, so the (1,1) entry is δδ=0\delta - \delta = 0 and the (2,2) entry is (r+δ)δ=r(r+\delta) - \delta = r.

J=(0K/ψπ(K)r).J = \begin{pmatrix} 0 & K^*/\psi \\ -\pi''(K^*) & r \end{pmatrix}.
det(J)=0r(K/ψ)(π(K))=Kψπ(K)(1)(1)=Kπ(K)ψ(1).\det(J) = 0 \cdot r - (K^*/\psi)(-\pi''(K^*)) = \frac{K^*}{\psi}\pi''(K^*) \cdot (-1)(-1) = \frac{K^*|\pi''(K^*)|}{\psi} \cdot (-1).

Hmm — let me be careful with signs. π<0\pi'' < 0, so π(K)>0-\pi''(K^*) > 0. Then:

det(J)=(K/ψ)(π(K))=K(π(K))ψ<0,\det(J) = -(K^*/\psi)(-\pi''(K^*)) = -\frac{K^*(-\pi''(K^*))}{\psi} < 0,

since K>0K^* > 0, ψ>0\psi > 0, and π(K)>0-\pi''(K^*) > 0... this gives det(J)<0\det(J) < 0. ✓ The determinant is negative, confirming the saddle-point property. \square

13.4.3 Impulse Responses

The saddle-path structure means that for any shock to π\pi (e.g., a TFP improvement that raises π(K)\pi'(K) at every KK), the adjustment follows the saddle path:

Permanent TFP shock: A permanent increase in TFP shifts the q˙=0\dot{q} = 0 nullcline upward (higher π(K)\pi'(K) at every KK), raising the steady-state capital KK^*. On impact, qq jumps up (the shadow value of capital increases) and then gradually declines along the new saddle path as KK accumulates toward its new steady state. Investment is high throughout the transition and declines as KK approaches KK^*.

Temporary TFP shock: A temporary shock generates a smaller initial jump in qq (since the higher profits are temporary and the old steady state will eventually be restored) and a smaller investment response. This is a key distinction: the qq model separates permanent from temporary shocks through their differential impact on the shadow price.


13.5 Hayashi’s Theorem

The empirical implementation of Tobin’s qq theory requires measuring qq. Marginal qq (the model’s key variable) is not directly observable. Average qq (market capitalization divided by replacement cost) is observable. Hayashi (1982) identifies conditions under which the two are equal.

Theorem 13.2 (Hayashi’s Theorem). If: (1) the production function F(K,L)F(K, L) is homogeneous of degree one (constant returns to scale), and (2) the adjustment cost function Φ(I,K)\Phi(I, K) is homogeneous of degree one in (I,K)(I, K), then marginal qq equals average qq:

qt=qˉtVtKt,q_t = \bar{q}_t \equiv \frac{V_t}{K_t},

where VtV_t is the market value of the firm and KtK_t is the replacement cost of capital.

Proof. Under CRS in production and HD1 adjustment costs, the firm’s value function is homogeneous of degree one in (K,exogenous prices)(K, \text{exogenous prices}): V(λK)=λV(K)V(\lambda K) = \lambda V(K). Euler’s theorem for homogeneous functions gives: V(K)=VKK=qKV(K) = \frac{\partial V}{\partial K}\cdot K = q\cdot K. Therefore q=V/K=qˉq = V/K = \bar{q}. \square

Importance: Hayashi’s theorem means we can test the qq model using stock market data. If the model is correct, the investment rate I/KI/K should be a linear function of Tobin’s average qq (the equity market capitalization plus debt, divided by replacement cost):

IK=qˉ1ψ+δ.\frac{I}{K} = \frac{\bar{q} - 1}{\psi} + \delta.

This is an empirically testable linear regression. However, the empirical R2R^2 of this regression is typically quite low (around 0.1–0.2), and qq explains much less of investment variation than the theory predicts. Proposed explanations: measurement error in qq (stock prices are noisy); non-convex adjustment costs (lumpy investment); financial frictions (the financial accelerator, [P:Ch.24.2]) that drive a wedge between marginal qq and the observable qˉ\bar{q}.


13.6 Real Options: The Investment Trigger

The adjustment cost model treats investment as continuously reversible. In reality, many investment projects are irreversible (once a factory is built, it cannot be un-built without large losses). Real options theory analyzes investment timing when investment is irreversible and payoffs are uncertain.

Definition 13.4 (Real Option). A real option is the right, but not the obligation, to undertake an investment project at a future date. Like a financial call option, a real option has value even when the immediate NPV is negative: waiting preserves the option to invest under more favorable conditions.

13.6.1 Geometric Brownian Motion for Profits

Let operating profit Π(t)\Pi(t) follow geometric Brownian motion (GBM):

dΠ=μΠdt+σΠdW,d\Pi = \mu\Pi\,dt + \sigma\Pi\,dW,

where μ\mu is the drift, σ\sigma is the volatility, and dWdW is a Wiener process increment.

Itô’s Lemma: For any twice-differentiable function V(Π)V(\Pi):

dV=V(Π)dΠ+12V(Π)(dΠ)2=[μΠV(Π)+σ2Π22V(Π)]dt+σΠV(Π)dW.dV = V'(\Pi)\,d\Pi + \frac{1}{2}V''(\Pi)(d\Pi)^2 = \left[\mu\Pi V'(\Pi) + \frac{\sigma^2\Pi^2}{2}V''(\Pi)\right]dt + \sigma\Pi V'(\Pi)\,dW.

13.6.2 The Option Value and the Investment Trigger

The firm waits to invest until profits exceed a threshold Π\Pi^* (the investment trigger). Below Π\Pi^*, the option value of waiting exceeds the NPV of immediate investment. Above Π\Pi^*, immediate investment is optimal.

For a perpetual project costing II with value V(Π)=Π/(rμ)V(\Pi) = \Pi/(r-\mu) (Gordon growth formula):

The option value F(Π)F(\Pi) satisfies the Bellman ODE (derived from Itô’s Lemma and the no-arbitrage condition rFdt=E[dF]rF\,dt = \mathbb{E}[dF]):

σ2Π22F(Π)+μΠF(Π)rF(Π)=0.\frac{\sigma^2\Pi^2}{2}F''(\Pi) + \mu\Pi F'(\Pi) - rF(\Pi) = 0.

This is an Euler–Cauchy ODE with power-function solutions F(Π)=AΠβF(\Pi) = A\Pi^\beta. The characteristic equation:

σ22β(β1)+μβr=0    σ22β2+(μσ22)βr=0.\frac{\sigma^2}{2}\beta(\beta-1) + \mu\beta - r = 0 \implies \frac{\sigma^2}{2}\beta^2 + \left(\mu - \frac{\sigma^2}{2}\right)\beta - r = 0.

The positive root β+>1\beta_+ > 1 (required for the option value to be finite as Π\Pi \to \infty):

β+=(μσ2/2)+(μσ2/2)2+2σ2rσ2.\beta_+ = \frac{-(\mu-\sigma^2/2) + \sqrt{(\mu-\sigma^2/2)^2 + 2\sigma^2 r}}{\sigma^2}.

Boundary conditions:

  1. Value matching: F(Π)=V(Π)IF(\Pi^*) = V(\Pi^*) - I (option value equals project value minus cost at the trigger).

  2. Smooth pasting: F(Π)=V(Π)F'(\Pi^*) = V'(\Pi^*) (optimality condition: option and project value curves are tangent at trigger).

Solving these two conditions for (A,Π)(A, \Pi^*):

Π=β+β+1(rμ)I.\Pi^* = \frac{\beta_+}{\beta_+ - 1}(r-\mu)I.

Definition 13.5 (Investment Trigger). The optimal investment trigger is:

Π=β+β+1(rμ)I,\boxed{\Pi^* = \frac{\beta_+}{\beta_+ - 1}(r-\mu)I,}

where β+/((β+1))>1\beta_+/((\beta_+-1)) > 1 is the option value multiplier — always greater than one, reflecting the value of waiting.

Key comparative statics:

  • Higher σ\sigma (more uncertainty): β+\beta_+ decreases (the characteristic equation root moves), making Π\Pi^* larger — more uncertainty raises the trigger and delays investment.

  • Higher rr (higher discount rate): Π\Pi^* rises — higher opportunity cost of waiting raises the trigger.

  • Higher μ\mu (faster expected profit growth): Π\Pi^* falls — faster growth makes the option less valuable relative to the project value.

This is the Bloom (2009) uncertainty channel: higher uncertainty (higher σ\sigma) raises investment thresholds, causing firms to delay investment during uncertain times. This mechanism explains the sharp investment contraction during the 2008–09 financial crisis and the COVID-19 recession [P:Ch.12.4, P:Ch.40].


13.7 Worked Example: Investment Response to a TFP Shock

Cross-reference: Principles Ch. 12.1 (investment empirics, q vs. data) [P:Ch.12.1]

Calibration: r=0.05r = 0.05, δ=0.10\delta = 0.10, ψ=2\psi = 2, π(K)=AKα\pi(K) = AK^\alpha with α=0.7\alpha = 0.7 (decreasing returns to K in operating profit — firms are not pure CRS in capital), A=1A = 1.

Steady state (baseline):

q=1+ψδ=1+2×0.10=1.20q^* = 1 + \psi\delta = 1 + 2\times0.10 = 1.20 (investment rate at steady state: I/K=(q1)/ψ=0.10/2=0.05<δ=0.10I^*/K^* = (q^*-1)/\psi = 0.10/2 = 0.05 < \delta = 0.10... this suggests I/K = δ at SS, so q*=1+ψδ=1.20 gives I/K = 0.10 = δ. ✓)

π(K)=r+δ+ψδ(r+δ)ψδ2/2r+δ=0.15\pi'(K^*) = r + \delta + \psi\delta(r+\delta) - \psi\delta^2/2 \approx r + \delta = 0.15 (for small ψδ\psi\delta corrections)

0.7K0.3=0.15    K=(0.7/0.15)1/0.3=(4.67)3.33=137.80.7K^{*\,-0.3} = 0.15 \implies K^* = (0.7/0.15)^{1/0.3} = (4.67)^{3.33} = 137.8

Permanent 10% TFP shock (A1.1A \to 1.1):

New MPK condition: 0.7×1.1×Knew0.3=0.15    Knew=(0.77/0.15)1/0.3=(5.13)3.33=193.70.7\times1.1\times K^{new\,-0.3} = 0.15 \implies K^{new} = (0.77/0.15)^{1/0.3} = (5.13)^{3.33} = 193.7

On impact: qq jumps up. The new q˙=0\dot{q} = 0 nullcline requires a higher π(K)\pi'(K), achievable only at lower KK — but KK cannot jump. So qq jumps to the value that puts the economy on the new saddle path at K0=137.8K_0 = 137.8.

APL

⎕IO←0

⍝ 1. Parameters
r ← 0.05  ⋄ delta ← 0.10  ⋄ psi ← 2  ⋄ alpha_pi ← 0.7

⍝ 2. Operating profit derivative ( Marginal Product of Capital )
pi_Kp ← {alpha_pi × ⍵ * alpha_pi - 1}

⍝ 3. Steady state
qstar ← 1 + psi × delta
Kstar ← ((r + delta) ÷ alpha_pi) * ÷ alpha_pi - 1

⍝ 4. Integrated ODE System & RK4 Solver
rk4_step ← {
    h state ← ⍺ ⍵
    sys ← {
        K q ← ⍵
        dK ← K × (((q - 1) ÷ psi) - delta)
        
        ⍝ FIXED: Enforced (A - B) - C to prevent right-to-left sign flipping
        ⍝ Replaced *2 with explicit multiplication for domain safety
        dq ← (((r + delta) × q) - (pi_Kp K)) - ((q - 1) × (q - 1)) ÷ (2 × psi)
        
        ⍝ Return as a flat vector
        dK , dq
    }
    k1 ← sys state
    k2 ← sys state + (h ÷ 2) × k1
    k3 ← sys state + (h ÷ 2) × k2
    k4 ← sys state + h × k3
    state + (h ÷ 6) × (k1 + (2 × k2) + (2 × k3) + k4)
}

⍝ 5. Setup and Run
K0 ← Kstar × 0.7
q0 ← 1.4
h  ← 0.1
T  ← 200

⍝ Memory-Safe Accumulator
shoot ← {
    path ← ⍵
    next ← h rk4_step ⊃⌽path
    path , ⊂next
}
path_states ← shoot⍣T ⊢ ⊂K0 q0

⍝ 6. Extract and Format Output
K_path ← {⍵[0]}¨ path_states
q_path ← {⍵[1]}¨ path_states

'--- Tobin q Model Steady State ---'
↑('Capital (K*)' 'Tobin q (q*)') ,¨ (⊂' : ') ,¨ ⍕¨ 4 ⍕¨ Kstar qstar

'--- Convergence Verification (End of Path) ---'
↑('Final K' 'Final q') ,¨ (⊂' : ') ,¨ ⍕¨ 4 ⍕¨ (⊃⌽K_path) (⊃⌽q_path)

Python

import numpy as np
from scipy.integrate import solve_ivp
from scipy.optimize import brentq
import matplotlib.pyplot as plt

# Parameters
r, delta, psi, alpha_pi = 0.05, 0.10, 2.0, 0.70

# Use np.maximum to prevent K from going negative and causing power errors
def pi_Kp(K, A=1.0):
    K_safe = np.maximum(K, 1e-6)
    return A * alpha_pi * K_safe**(alpha_pi - 1)

# 1. Steady State
qstar = 1 + psi*delta
Rstar = (r + delta)*qstar - (qstar - 1)**2 / (2*psi)
Kstar = (alpha_pi / Rstar)**(1 / (1 - alpha_pi))

def Kq_system(t, state, A=1.0):
    K, q = state
    K_safe = np.maximum(K, 1e-6) # Guard against power errors
    dK = K_safe*(q-1)/psi - delta*K_safe
    dq = (r+delta)*q - pi_Kp(K_safe, A) - (q-1)**2/(2*psi)
    return [dK, dq]

# Event to stop integration if K hits 0 or grows too large
def hit_boundary(t, state, A=1.0):
    return state[0] - 1e-3
hit_boundary.terminal = True

# 2. Saddle Path via Eigenvectors
# J = [[dK_dot/dK, dK_dot/dq], [dq_dot/dK, dq_dot/dq]]
# dK_dot/dK = (q-1)/psi - delta. At SS, this is 0.
J = np.array([[0, Kstar/psi],
              [alpha_pi*(1-alpha_pi)*Kstar**(alpha_pi-2), r]])

eigvals, eigvecs = np.linalg.eig(J)
stable_idx = np.argmin(eigvals)
v = eigvecs[:, stable_idx]
if v[0] < 0: v = -v # Ensure it points right

# 3. Solve Saddle Path (Integrating backward from SS)
eps = 1e-3 # Small perturbation for shooting
back_time = (0, 30) # Reduced time to prevent exploding

sol_r = solve_ivp(lambda t,s: [-x for x in Kq_system(t,s)], back_time, 
                  [Kstar + eps*v[0], qstar + eps*v[1]], events=hit_boundary)
sol_l = solve_ivp(lambda t,s: [-x for x in Kq_system(t,s)], back_time, 
                  [Kstar - eps*v[0], qstar - eps*v[1]], events=hit_boundary)

# 4. TFP Shock (A: 1.0 -> 1.1)
A_new = 1.1
Kstar_new = (alpha_pi*A_new / Rstar)**(1 / (1 - alpha_pi))

# Find the jump: Integrate backward from the NEW steady state to find where it crosses OLD K*
sol_shock = solve_ivp(lambda t,s: [-x for x in Kq_system(t,s, A_new)], (0, 50),
                      [Kstar_new + eps*v[0], qstar + eps*v[1]], 
                      dense_output=True, events=hit_boundary)

# Find q0 by looking for when K(t) in backward integration reached the original Kstar
try:
    t_jump = brentq(lambda t: sol_shock.sol(t)[0] - Kstar, 0, sol_shock.t[-1])
    q_jump = sol_shock.sol(t_jump)[1]
except:
    q_jump = qstar + 0.05 # Rough fallback

# Forward simulation of the shock
sol_path = solve_ivp(Kq_system, (0, 100), [Kstar, q_jump], args=(A_new,), dense_output=True)

print("--- PERMANENT TFP SHOCK (A: 1.0 -> 1.1) ---")
print(f"New Steady State K*: {Kstar_new:.4f}")
print(f"Initial q jump:      {q_jump:.4f}")
print(f"Total q increase:    {((q_jump - qstar)/qstar)*100:.2f}%")
print("-" * 30)

# --- Visualization ---
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(14, 5))

# Phase Diagram
ax1.plot(sol_r.y[0], sol_r.y[1], 'g-', label='Saddle Path')
ax1.plot(sol_l.y[0], sol_l.y[1], 'g-')
ax1.axhline(qstar, color='k', linestyle=':', label='K-nullcline')
ax1.plot(Kstar, qstar, 'ko', label='Old SS')
ax1.plot(Kstar_new, qstar, 'ro', label='New SS')
ax1.set_title("Phase Diagram: Tobin's q")
ax1.set_xlabel("Capital (K)"); ax1.set_ylabel("q")
ax1.legend()

# Time Paths
t_grid = np.linspace(0, 100, 200)
ax2.plot(t_grid, sol_path.sol(t_grid)[0], label='K (Capital)')
ax2_right = ax2.twinx()
ax2_right.plot(t_grid, sol_path.sol(t_grid)[1], 'r', label='q (Tobin\'s q)')
ax2.set_title("Response to TFP Shock")
ax2.set_xlabel("Time")
ax2.legend(loc='upper left'); ax2_right.legend(loc='upper right')

plt.tight_layout()
plt.show()
--- PERMANENT TFP SHOCK (A: 1.0 -> 1.1) ---
New Steady State K*: 153.7468
Initial q jump:      1.2500
Total q increase:    4.17%
------------------------------
<Figure size 1400x500 with 3 Axes>

13.8 Programming Exercises

Exercise 13.1 (APL — Saddle Path)

Implement the full reverse-shooting algorithm for the (K,q)(K, q) system in APL using iteration. (a) Find the Jacobian eigenvalues and stable eigenvector at the steady state as a dfn. (b) Perturb from the steady state in both directions and integrate backward using the RK4 dfn from Chapter 3. (c) Trace both branches of the saddle path and export for plotting.

Exercise 13.2 (Python — Adjustment Cost Sensitivity)

Compute the investment rate I/KI/K response to a permanent 5% TFP shock for ψ{0.5,1,2,5,10}\psi \in \{0.5, 1, 2, 5, 10\}. For each ψ\psi: (a) find the on-impact jump in qq; (b) simulate the full convergence path; (c) compute the half-life of the capital stock adjustment. Plot all five convergence paths on a single figure. Verify that higher ψ\psi (larger adjustment costs) leads to slower but more gradual investment.

Exercise 13.3 (Julia — Real Options Trigger)

using Roots

function investment_trigger(r, mu, sigma, I_cost)
    # Characteristic equation root
    beta_plus = (-( mu - sigma^2/2) + sqrt((mu-sigma^2/2)^2 + 2*sigma^2*r)) / sigma^2
    # Investment trigger
    Pi_star = beta_plus / (beta_plus - 1) * (r - mu) * I_cost
    return (beta_plus=beta_plus, Pi_star=Pi_star)
end

r, mu, I_cost = 0.05, 0.02, 1.0
println("Trigger analysis:")
for sigma in [0.10, 0.20, 0.30, 0.40]
    res = investment_trigger(r, mu, sigma, I_cost)
    println("  σ=$(sigma): β+=$(round(res.beta_plus,digits=3)), Π*=$(round(res.Pi_star,digits=3))")
end
println("\nNPV rule threshold: Π*_NPV = $(r-mu)*I = $((r-mu)*I_cost)")
println("Option value ratio at σ=0.20: $(investment_trigger(r,mu,0.20,I_cost).Pi_star/((r-mu)*I_cost))")

Exercise 13.4 (R — Hayashi Theorem Test)

Using Compustat data (or simulated data calibrated to U.S. manufacturing), run the Hayashi regression: Iit/Ki,t1=a+bqit+εitI_{it}/K_{i,t-1} = a + b\cdot q_{it} + \varepsilon_{it} where qitq_{it} is Tobin’s average q. (a) What is the estimated bb? What does this imply for ψ=1/b\psi = 1/b? (b) Add cash flow CFit/Ki,t1CF_{it}/K_{i,t-1} as an additional regressor. If the Hayashi theorem holds perfectly, cash flow should be insignificant (all relevant information is in qq). Is it? (c) Interpret the cash flow coefficient as a measure of financial frictions.

Exercise 13.5 — Irreversibility (\star)

Modify the adjustment cost model to allow for irreversibility: I0I \geq 0 (no disinvestment). Add a KKT multiplier μ0\mu \geq 0 for the constraint I0I \geq 0 with complementary slackness μI=0\mu I = 0. (a) Show that with irreversibility, qq can fall below 1 (the firm would like to disinvest but cannot). (b) Characterize the “wait and see” region where q<1+ψδq < 1 + \psi\delta and investment is zero. (c) Using the real options trigger formula, explain why irreversibility raises the investment threshold for expansion and creates a symmetric lower threshold for contraction.

Exercise 13.6 — Financial Frictions (\star\star)

Introduce a financial friction: the firm faces an external finance premium ξ(q,K)\xi(q, K) that depends on the gap between qq and 1. Specifically, the effective discount rate for investment becomes r+ξr + \xi where ξ=ϕmax(0,1q)\xi = \phi\max(0, 1-q) — external finance becomes more expensive when q<1q < 1 (financial distress). (a) Modify the costate equation to include the premium. (b) Show that this creates an additional amplification mechanism: a negative TFP shock reduces qq below 1, raises the external finance premium, further discourages investment, and further reduces qq — a financial accelerator. (c) Calibrate with ϕ=0.5\phi = 0.5 and simulate the investment response to a 10% negative TFP shock with and without the financial accelerator.


13.9 Chapter Summary

Key results:

  • The firm’s optimal control problem minimizes investment cost subject to the capital accumulation constraint, with the Hamiltonian H=π(K)IΦ(I,K)+q(IδK)\mathcal{H} = \pi(K) - I - \Phi(I,K) + q(I-\delta K).

  • Pontryagin’s conditions yield the investment function: I/K=(q1)/ψI/K = (q-1)/\psi — investment is positive (negative) when qq exceeds (falls below) 1, with sensitivity 1/ψ1/\psi to the gap.

  • The costate equation q˙=(r+δ)qπ(K)(q1)2/(2ψ)\dot{q} = (r+\delta)q - \pi'(K) - (q-1)^2/(2\psi) combined with the state equation K˙=K(q1)/ψδK\dot{K} = K(q-1)/\psi - \delta K forms a 2D saddle-point system.

  • The (K,q)(K, q) phase plane has a horizontal K˙=0\dot{K}=0 nullcline at q=1+ψδq^* = 1+\psi\delta and a curved q˙=0\dot{q}=0 nullcline; the saddle-point property follows from det(J)<0\det(J) < 0 (as in the RCK model).

  • Hayashi’s theorem: under CRS production and HD1 adjustment costs, marginal qq equals average q=V/Kq = V/K — allowing empirical testing using stock market data.

  • The real options trigger Π=β+/(β+1)(rμ)I\Pi^* = \beta_+/(\beta_+-1)\cdot(r-\mu)I shows that uncertainty raises the investment threshold above the NPV rule: the ratio β+/(β+1)>1\beta_+/(\beta_+-1) > 1 is the option value multiplier.

  • In APL: the (K,q)(K,q) system is integrated with the same rk4_step dfn as the RCK model; the phase diagram nullclines are computed on a grid using f¨K_grid (apply function to each element).

Connections forward: The financial accelerator mechanism — investment responds to qq, which depends on the firm’s balance sheet — is central to Chapter 37’s replication of the Great Recession. Chapter 29 (perturbation methods) shows how the second-order approximation of the value function is needed to capture the precautionary investment response to uncertainty.


Next: Part IV — Discrete-Time Dynamic Models in Macroeconomics