THURSDAY, 3 DECEMBER 2026GLOBAL ECONOMICS INTELLIGENCE
StudyMath & Econ

Dynamic Optimization Explained: Choosing the Best Path Over Time

  • ▸Dynamic optimization chooses a whole sequence of decisions, such as consumption in every year of a life, to maximize a total payoff when today's choice changes tomorrow's options.
  • ▸Three tools solve these problems: the Euler equation, which says the gain from consuming a little more today must equal the discounted gain from saving it; the Bellman equation, which solves the problem backward one period at a time; and the Hamiltonian, which does the same in continuous time.
  • ▸Applied to US real consumption per person and the 10-year inflation-indexed Treasury yield over 2003–2025, the Euler equation fits only if households are assumed to value the future more than the present for most plausible values of the elasticity of intertemporal substitution, a version of the risk-free rate puzzle; the result depends on that elasticity, so it is shown for values from 0.35 to 2.
ShareWhatsApp

Understanding dynamic optimization — simply put

Many economic decisions are not one-off choices but plans. A household decides how much to spend this year knowing that whatever it saves will fund spending later. A firm decides how much to invest knowing that machines bought today raise output for years. A government decides how fast to extract a mineral that cannot be replaced. Dynamic optimization is the mathematics of choosing the best path of decisions over time when what you do now changes what you can do later. Its answer is usually a rule linking today's choice to tomorrow's, rather than a single number.

How does it actually help?

A household with wealth can consume now or save at an interest rate and consume later. It values consumption with a utility function u(c)u(c) and discounts next year's utility by a factor β\beta between 0 and 1. The best plan satisfies the Euler equation u′(ct)=β(1+r) u′(ct+1)u'(c_t) = \beta(1+r)\,u'(c_{t+1}), where u′(c)u'(c) is the marginal utility of consumption (the extra satisfaction from one more unit), rr is the real interest rate and ctc_t is consumption in period tt. The logic is a no-gain condition: giving up one unit of consumption today costs u′(ct)u'(c_t); saving it yields 1+r1 + r units tomorrow, worth β(1+r)u′(ct+1)\beta(1+r)u'(c_{t+1}) today. At the optimum the two are equal, so no reshuffling between periods can make the household better off.

Why does this matter?

The same logic runs through most of modern macroeconomics. The consumption function in the New Keynesian model, the saving rate in the Ramsey model, investment decisions, the optimal pace of extracting oil and the design of pension systems are all solutions to dynamic optimization problems. The Euler equation also links interest rates to consumption growth, which is how central banks think about the effect of rate changes on spending.

What makes the solution reliable?

The problem must have a well-defined objective (utility that is increasing and concave, so the agent prefers smooth consumption), a budget constraint that cannot be escaped by borrowing forever, and a horizon with an end condition, or a rule for the infinite case that rules out explosive debt. When those hold, the first-order conditions pick out the best plan rather than just a stationary point.

The takeaway

Dynamic optimization turns a whole plan into conditions that link one period to the next. The sections below solve a two-period and a three-period problem by hand, test the Euler equation on US data, and then derive the general tools.

Solving it by hand: two periods

A household has wealth W=100W = 100, lives two periods, earns a real interest rate r=5%r = 5\% on savings, discounts the future with β=0.95\beta = 0.95, and has utility ln⁡c0+βln⁡c1\ln c_0 + \beta \ln c_1 (illustrative numbers).

Step 1: write the budget constraint. Whatever is not consumed in period 0 is saved and grows by 1+r1 + r: c1=(W−c0)(1+r)c_1 = (W - c_0)(1 + r). Equivalently, the present value of consumption equals wealth: c0+c1/(1+r)=Wc_0 + c_1/(1 + r) = W.

Step 2: substitute and differentiate. Maximize ln⁡c0+βln⁡((W−c0)(1+r))\ln c_0 + \beta \ln\big((W - c_0)(1+r)\big). The derivative with respect to c0c_0 is 1/c0−β/(W−c0)1/c_0 - \beta/(W - c_0). Setting it to zero gives W−c0=βc0W - c_0 = \beta c_0.

Step 3: solve. c0=W/(1+β)=100/1.95=51.28c_0 = W/(1 + \beta) = 100/1.95 = 51.28. Savings are 48.7248.72, so c1=48.72×1.05=51.15c_1 = 48.72 \times 1.05 = 51.15.

Step 4: check the Euler equation. With log utility u′(c)=1/cu'(c) = 1/c. Left side: 1/51.28=0.01951/51.28 = 0.0195. Right side: β(1+r)/c1=0.9975/51.15=0.0195\beta(1+r)/c_1 = 0.9975/51.15 = 0.0195. They match. Check the budget: 51.28+51.15/1.05=51.28+48.72=10051.28 + 51.15/1.05 = 51.28 + 48.72 = 100.

Step 5: second-order condition. The second derivative of the objective is −1/c02−β/(W−c0)2<0-1/c_0^2 - \beta/(W - c_0)^2 < 0, so the stationary point is a maximum.

Consumption falls very slightly from 51.28 to 51.15 because β(1+r)=0.9975\beta(1 + r) = 0.9975 is just below 1: the household's impatience slightly outweighs the reward for waiting. If β(1+r)\beta(1 + r) were above 1, consumption would rise over time.

Solving it by hand: three periods with the Bellman equation

Now a "cake" of size W=100W = 100 must be eaten over three periods with no interest, β=0.95\beta = 0.95 and log utility (illustrative numbers). The Bellman equation solves this backward. Define the value function Vt(w)V_t(w) as the best total utility achievable from period tt onward with ww left.

Period 2 (last). Eat everything: c2=wc_2 = w and V2(w)=ln⁡wV_2(w) = \ln w.

Period 1. Choose cc to maximize ln⁡c+βV2(w−c)=ln⁡c+βln⁡(w−c)\ln c + \beta V_2(w - c) = \ln c + \beta \ln(w - c). The first-order condition 1/c=β/(w−c)1/c = \beta/(w - c) gives c1=w/(1+β)c_1 = w/(1 + \beta). Substituting back, V1(w)=(1+β)ln⁡wV_1(w) = (1 + \beta)\ln w plus a constant.

Period 0. Maximize ln⁡c+βV1(w−c)=ln⁡c+β(1+β)ln⁡(w−c)\ln c + \beta V_1(w - c) = \ln c + \beta(1 + \beta)\ln(w - c). The first-order condition gives c0=w/(1+β+β2)=100/2.8525=35.06c_0 = w/(1 + \beta + \beta^2) = 100/2.8525 = 35.06.

Roll forward. Remaining cake 64.9464.94; c1=64.94/1.95=33.30c_1 = 64.94/1.95 = 33.30; then c2=64.94−33.30=31.64c_2 = 64.94 - 33.30 = 31.64.

Check. 35.06+33.30+31.64=10035.06 + 33.30 + 31.64 = 100. Each consumption is 95% of the previous one (33.30/35.06=0.9533.30/35.06 = 0.95, 31.64/33.30=0.9531.64/33.30 = 0.95), as the Euler equation 1/ct=β/ct+11/c_t = \beta/c_{t+1} requires when r=0r = 0.

The Bellman approach breaks a three-period problem into three one-period problems. With many periods, or uncertainty, that is what makes the problem solvable.

A real example: does US consumption follow the Euler equation?

With the widely used constant-relative-risk-aversion utility, the Euler equation implies a simple prediction: consumption grows at approximately σ(r−ρ)\sigma(r - \rho), where σ\sigma is the elasticity of intertemporal substitution (how willing people are to shift consumption across time when the interest rate changes), rr is the real interest rate and ρ\rho is the rate of time preference (how strongly they discount the future; β=1/(1+ρ)\beta = 1/(1+\rho)). Rearranged, ρ=r−gc/σ\rho = r - g_c/\sigma, where gcg_c is consumption growth. Given data on gcg_c and rr and a value for σ\sigma, we can back out the discount rate a representative household would need.

The table uses real personal consumption expenditures per person from the Bureau of Economic Analysis and, as the real interest rate, the yield on 10-year Treasury inflation-indexed securities. The yield is indexed to the consumer price index while consumption is deflated by the PCE price index; CPI inflation has run a few tenths of a point a year above PCE inflation, so a PCE-based real rate would be higher and every implied discount rate would rise by roughly that amount. The entries in the σ=0.35\sigma = 0.35 and σ=0.5\sigma = 0.5 columns would stay negative.

PeriodReal consumption growth per person (% a year)Average real 10-year yield (%)Implied ρ if σ = 0.35 (%)Implied ρ if σ = 0.5 (%)Implied ρ if σ = 1 (%)Implied ρ if σ = 2 (%)
2003–20072.182.06−4.16−2.29−0.120.97
2007–20191.030.63−2.31−1.43−0.400.12
2019–20252.180.75−5.49−3.62−1.43−0.34
2003–20251.550.92−3.51−2.18−0.630.15
US consumption growth, real interest rate and the discount rate implied by the Euler equation — Sources: US Bureau of Economic Analysis, real personal consumption expenditures per capita (A794RX0Q048SBEA, chained 2017 dollars, annual averages of quarterly data); Board of Governors of the Federal Reserve System, market yield on US Treasury securities at 10-year constant maturity, inflation-indexed (DFII10, annual averages); both via FRED, accessed December 3, 2026. Consumption growth is the average annual log change between the end years; the real yield is the average over the years after the start year. Implied ρ = r − g/σ, computed by EconoLens. Values of σ are assumptions; see the text for the empirical range.
Elasticity of intertemporal substitutionImplied rate of time preference (%)
σ = 0.35−3.51
σ = 0.5−2.18
σ = 1−0.63
σ = 20.15
Discount rate implied by the Euler equation, 2003–2025 (% a year) — Same calculation as the table above, full period 2003–2025. The bar chart plots the implied rate of time preference.

Reading the result

For any elasticity up to 1, the implied rate of time preference is negative in every period: households would have to value future consumption more than present consumption to choose such fast consumption growth at such low real interest rates. Only with σ=2\sigma = 2 does the implied discount rate turn slightly positive over the full period.

Which values of σ\sigma are plausible? A meta-analysis of 2,735 published estimates by Havránek (2015) finds that, after correcting for selective reporting, micro-data estimates for households that hold assets are around 0.3–0.4, and that values above 0.8 are inconsistent with most of the evidence. At σ=0.35\sigma = 0.35 the implied discount rate is about −3.5% a year. This is a version of what Weil (1989) called the risk-free rate puzzle: given how much consumption grows, real interest rates are too low for a standard Euler equation with impatient households.

This exercise is a consistency check, not a test that could confirm the model: it backs out the one free parameter that makes the equation fit, so a fit is guaranteed. The informative part is that the required parameter is implausible. The data also differ from the model in ways that matter. The 10-year yield is a long-term rate, while the Euler equation for annual consumption refers to a one-year rate; aggregate consumption includes households that cannot borrow; and part of consumption growth reflects rising income that many households spend as it arrives rather than planning it years ahead.

The assumptions

Time-separable utility with a constant discount factor. Total welfare is the discounted sum of each period's utility. Why it matters: if people discount the near future more steeply than the distant future (present bias), plans made today are revised tomorrow, and the Euler equation no longer describes actual choices, a topic of behavioral economics.

Concave utility. Marginal utility falls as consumption rises. Why it matters: concavity is what makes the household want to smooth consumption, and what makes the first-order conditions pick out a maximum. With linear utility the household would put everything in whichever period has the higher discounted return.

Free borrowing and lending at one interest rate. Why it matters: a household that cannot borrow against future income cannot raise consumption today even when the Euler equation says it should, so its consumption tracks current income instead.

A terminal or transversality condition. In finite problems wealth cannot be negative at the end; in infinite problems the present value of assets must go to zero in the limit. Why it matters: without it, borrowing forever and never repaying would look optimal, and the first-order conditions alone do not rule out such paths.

Known interest rates and income. Why it matters: with uncertainty the Euler equation holds in expectation, u′(ct)=βEt[(1+r)u′(ct+1)]u'(c_t) = \beta E_t[(1 + r)u'(c_{t+1})], and precautionary saving appears; the deterministic formulas then understate saving.

The formula

This section is optional reading and gives the general tools.

The discrete-time problem. Choose consumption c0,c1,…c_0, c_1, \dots to maximize

∑t=0Tβtu(ct)subject toat+1=(1+r)(at−ct),aT+1≥0\sum_{t=0}^{T} \beta^t u(c_t) \quad \text{subject to} \quad a_{t+1} = (1 + r)(a_t - c_t), \quad a_{T+1} \ge 0
where aₜ is wealth at the start of period t, β is the discount factor, r is the real interest rate and T is the final period.

The Euler equation. Form the Lagrangian with a multiplier λt\lambda_t on each period's constraint, or perturb the optimal plan by consuming ϵ\epsilon less in period tt and (1+r)ϵ(1+r)\epsilon more in t+1t+1. The change in utility is −βtu′(ct)ϵ+βt+1u′(ct+1)(1+r)ϵ-\beta^t u'(c_t)\epsilon + \beta^{t+1}u'(c_{t+1})(1+r)\epsilon, which must be zero at the optimum:

u′(ct)=β(1+r) u′(ct+1)u'(c_t) = \beta(1 + r)\,u'(c_{t+1})
where u′ is marginal utility.

With constant-relative-risk-aversion utility u(c)=c1−1/σ/(1−1/σ)u(c) = c^{1 - 1/\sigma}/(1 - 1/\sigma), marginal utility is c−1/σc^{-1/\sigma}, so the Euler equation becomes (ct+1/ct)1/σ=β(1+r)(c_{t+1}/c_t)^{1/\sigma} = \beta(1+r). Taking logs and using ln⁡β≈−ρ\ln\beta \approx -\rho and ln⁡(1+r)≈r\ln(1+r) \approx r:

ln⁡ct+1−ln⁡ct≈σ(r−ρ)\ln c_{t+1} - \ln c_t \approx \sigma(r - \rho)
where σ is the elasticity of intertemporal substitution and ρ is the rate of time preference.

Applied to the two-period example (log utility means σ=1\sigma = 1): σ(r−ρ)=0.05−0.0526=−0.26%\sigma(r - \rho) = 0.05 - 0.0526 = -0.26\%, close to the exact fall from 51.28 to 51.15 (−0.25%-0.25\%).

The Bellman equation. Define V(a)V(a) as the maximum discounted utility attainable from wealth aa onward. In an infinite-horizon stationary problem,

V(a)=max⁡c  {u(c)+β V((1+r)(a−c))}V(a) = \max_{c}\;\Big\{ u(c) + \beta\,V\big((1+r)(a - c)\big) \Big\}
where V is the value function and the maximization is over this period's consumption.

The first-order condition is u′(c)=β(1+r)V′(a′)u'(c) = \beta(1+r)V'(a'), and the envelope theorem (a small change in wealth is worth only its direct effect, because the choice of cc is already optimal) gives V′(a)=u′(c)V'(a) = u'(c). Combining the two reproduces the Euler equation. The Bellman equation is a fixed-point problem in the function VV: under standard conditions the right-hand side is a contraction, so iterating it from any starting guess converges to the true value function (see fixed points). Applied to the three-period cake, backward induction is exactly this iteration run three times.

The Hamiltonian (continuous time). Maximize ∫0∞e−ρtu(c(t)) dt\int_0^\infty e^{-\rho t}u(c(t))\,dt subject to a˙=ra−c\dot{a} = r a - c, where a dot over a variable denotes its rate of change over time. Form the current-value Hamiltonian

H=u(c)+μ (ra−c)H = u(c) + \mu\,(r a - c)
where μ (mu) is the costate variable, the shadow value of one more unit of wealth.

The optimality conditions are ∂H/∂c=0\partial H/\partial c = 0, giving u′(c)=μu'(c) = \mu, and μ˙=ρμ−∂H/∂a=(ρ−r)μ\dot{\mu} = \rho\mu - \partial H/\partial a = (\rho - r)\mu, plus the transversality condition lim⁡t→∞e−ρtμ(t)a(t)=0\lim_{t\to\infty} e^{-\rho t}\mu(t)a(t) = 0. Differentiating u′(c)=μu'(c) = \mu with respect to time and using constant-relative-risk-aversion utility gives the continuous-time Euler equation c˙/c=σ(r−ρ)\dot{c}/c = \sigma(r - \rho), the same result as the discrete approximation.

With log utility the solution consumes a constant fraction ρ\rho of wealth each instant. For example, with ρ=3%\rho = 3\%, r=5%r = 5\% and log utility (σ=1\sigma = 1), consumption grows at c˙/c=1×(0.05−0.03)=2%\dot{c}/c = 1 \times (0.05 - 0.03) = 2\% a year, and a household with wealth of 100 consumes 0.03×100=30.03 \times 100 = 3 a year at that instant.

Convention. This guide uses the current-value Hamiltonian, in which the costate is measured in current utility units. The present-value version multiplies the objective by e−ρte^{-\rho t} inside HH; the costates differ by that factor and the resulting Euler equation is identical.

When this isn't the right tool

When agents face borrowing limits or uninsurable risk. The Euler equation then holds with inequality for constrained households, and solutions require numerical dynamic programming with occasionally binding constraints, as in heterogeneous-agent models.

When preferences are time-inconsistent. With present bias, the optimal plan today is not followed tomorrow, so a single optimization over the whole horizon is not the right model, a topic of behavioral economics.

When the question is about the economy, not one agent. Dynamic optimization describes individual choices. To find market outcomes, combine the optimizing agents with market-clearing conditions, as in the Ramsey model and general equilibrium.

When you need dynamics without choice. If the rule for how a variable evolves is already given, use difference and differential equations directly.

Practice problems

Problem 1. A student has wealth 1,000, lives two periods, faces r=10%r = 10\%, has β=0.9\beta = 0.9 and log utility. Find c0c_0, c1c_1 and check the Euler equation.

Solution. With log utility c0=W/(1+β)=1,000/1.9=526.32c_0 = W/(1 + \beta) = 1{,}000/1.9 = 526.32. Savings are 473.68473.68, so c1=473.68×1.1=521.05c_1 = 473.68 \times 1.1 = 521.05. Euler check: 1/526.32=0.0019001/526.32 = 0.001900 and β(1+r)/c1=0.99/521.05=0.001900\beta(1+r)/c_1 = 0.99/521.05 = 0.001900. Budget check: 526.32+521.05/1.1=526.32+473.68=1,000526.32 + 521.05/1.1 = 526.32 + 473.68 = 1{,}000. Consumption falls slightly because β(1+r)=0.99<1\beta(1 + r) = 0.99 < 1.

Problem 2. Suppose real consumption per person grows by 2% a year, the real interest rate is 1% and the elasticity of intertemporal substitution is 0.5. What rate of time preference makes this consistent with the Euler equation? What does the answer suggest?

Solution. From gc=σ(r−ρ)g_c = \sigma(r - \rho): ρ=r−gc/σ=1−2/0.5=−3%\rho = r - g_c/\sigma = 1 - 2/0.5 = -3\%. A negative rate of time preference means households would value the future more than the present. Since that is implausible, the data are hard to reconcile with this version of the model: either the elasticity is higher, the relevant interest rate is higher, or consumption growth is driven by something the model leaves out, such as rising income spent as it arrives.

Problem 3. A firm extracts a resource whose price is expected to rise. Under the Hotelling rule, an owner is indifferent between selling now and later only if the net price rises at the interest rate. If today's net price is 40 and the interest rate is 5%, what net price in two years leaves the owner indifferent, and what should the owner do if the expected price in two years is 46?

Solution. Indifference requires 40×1.052=44.1040 \times 1.05^2 = 44.10. If the expected price is 46, more than 44.10, the resource is worth more left in the ground, so the owner should extract less now. This is an Euler-type no-gain condition: moving one unit of sales across time must not raise the present value of profits.

Further reading

Sources

US Bureau of Economic Analysis, via FRED, Real personal consumption expenditures per capita (A794RX0Q048SBEA), accessed December 3, 2026. https://fred.stlouisfed.org/series/A794RX0Q048SBEA

Board of Governors of the Federal Reserve System, via FRED, Market yield on US Treasury securities at 10-year constant maturity, inflation-indexed (DFII10), accessed December 3, 2026. https://fred.stlouisfed.org/series/DFII10

Havránek, T. (2015), Measuring intertemporal substitution: the importance of method choices and selective reporting, Journal of the European Economic Association 13(6), 1180–1204. https://ideas.repec.org/a/bla/jeurec/v13y2015i6p1180-1204.html

Weil, P. (1989), The equity premium puzzle and the risk-free rate puzzle, Journal of Monetary Economics 24(3), 401–421. https://econpapers.repec.org/RePEc:eee:moneco:v:24:y:1989:i:3:p:401-421

Implied discount rates are EconoLens calculations; the values of the elasticity are assumptions. The numbers in the hand-worked examples and practice problems are illustrative.

Frequently Asked Questions

What is dynamic optimization in economics?

Dynamic optimization is the method of choosing a sequence of decisions over time, such as consumption, investment or resource extraction, to maximize a total payoff when choices today affect what is possible in the future. Its main tools are the Euler equation, the Bellman equation and the Hamiltonian.

What is the Euler equation for consumption?

The consumption Euler equation states that the marginal utility of consuming one more unit today equals the discount factor times one plus the real interest rate times the marginal utility of consumption next period. It means that, at the optimum, shifting consumption between periods cannot raise total welfare.

What is the Bellman equation?

The Bellman equation writes the value of a dynamic problem as the best current payoff plus the discounted value of the problem that remains. It lets a multi-period problem be solved one period at a time, usually by working backward from the end or by iterating until the value function stops changing.

What is the difference between the Bellman equation and the Hamiltonian?

The Bellman equation is mainly used for problems in discrete time and with uncertainty, and is solved through the value function. The Hamiltonian is used for continuous-time problems and is solved through first-order conditions on a costate variable, the shadow value of the state. For the same deterministic problem, both give the same Euler equation.

What is the elasticity of intertemporal substitution?

It measures how much consumption growth responds to the real interest rate. An elasticity of 0.5 means that a 1 percentage point higher real interest rate raises planned consumption growth by about 0.5 percentage point. Meta-analysis of published estimates puts micro-data values for asset holders around 0.3 to 0.4.

What is the risk-free rate puzzle?

It is the finding that, with standard preferences, observed consumption growth would require real interest rates much higher than those actually seen, or a rate of time preference below zero. The term was introduced by Philippe Weil in 1989.

Cite This Article

EconoLens. (2026, December 3). Dynamic Optimization Explained: Choosing the Best Path Over Time. EconoLens. https://www.econolens.co.in/news/study-dynamic-optimisation-explained

Share this analysis