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.
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 and discounts next year's utility by a factor between 0 and 1. The best plan satisfies the Euler equation , where is the marginal utility of consumption (the extra satisfaction from one more unit), is the real interest rate and is consumption in period . The logic is a no-gain condition: giving up one unit of consumption today costs ; saving it yields units tomorrow, worth 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 , lives two periods, earns a real interest rate on savings, discounts the future with , and has utility (illustrative numbers).
Step 1: write the budget constraint. Whatever is not consumed in period 0 is saved and grows by : . Equivalently, the present value of consumption equals wealth: .
Step 2: substitute and differentiate. Maximize . The derivative with respect to is . Setting it to zero gives .
Step 3: solve. . Savings are , so .
Step 4: check the Euler equation. With log utility . Left side: . Right side: . They match. Check the budget: .
Step 5: second-order condition. The second derivative of the objective is , so the stationary point is a maximum.
Consumption falls very slightly from 51.28 to 51.15 because is just below 1: the household's impatience slightly outweighs the reward for waiting. If were above 1, consumption would rise over time.
Solving it by hand: three periods with the Bellman equation
Now a "cake" of size must be eaten over three periods with no interest, and log utility (illustrative numbers). The Bellman equation solves this backward. Define the value function as the best total utility achievable from period onward with left.
Period 2 (last). Eat everything: and .
Period 1. Choose to maximize . The first-order condition gives . Substituting back, plus a constant.
Period 0. Maximize . The first-order condition gives .
Roll forward. Remaining cake ; ; then .
Check. . Each consumption is 95% of the previous one (, ), as the Euler equation requires when .
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 , where is the elasticity of intertemporal substitution (how willing people are to shift consumption across time when the interest rate changes), is the real interest rate and is the rate of time preference (how strongly they discount the future; ). Rearranged, , where is consumption growth. Given data on and and a value for , 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 and columns would stay negative.
| Period | Real 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–2007 | 2.18 | 2.06 | −4.16 | −2.29 | −0.12 | 0.97 |
| 2007–2019 | 1.03 | 0.63 | −2.31 | −1.43 | −0.40 | 0.12 |
| 2019–2025 | 2.18 | 0.75 | −5.49 | −3.62 | −1.43 | −0.34 |
| 2003–2025 | 1.55 | 0.92 | −3.51 | −2.18 | −0.63 | 0.15 |
| Elasticity of intertemporal substitution | Implied rate of time preference (%) |
|---|---|
| σ = 0.35 | −3.51 |
| σ = 0.5 | −2.18 |
| σ = 1 | −0.63 |
| σ = 2 | 0.15 |
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 does the implied discount rate turn slightly positive over the full period.
Which values of 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 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, , 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 to maximize
The Euler equation. Form the Lagrangian with a multiplier on each period's constraint, or perturb the optimal plan by consuming less in period and more in . The change in utility is , which must be zero at the optimum:
With constant-relative-risk-aversion utility , marginal utility is , so the Euler equation becomes . Taking logs and using and :
Applied to the two-period example (log utility means ): , close to the exact fall from 51.28 to 51.15 ().
The Bellman equation. Define as the maximum discounted utility attainable from wealth onward. In an infinite-horizon stationary problem,
The first-order condition is , and the envelope theorem (a small change in wealth is worth only its direct effect, because the choice of is already optimal) gives . Combining the two reproduces the Euler equation. The Bellman equation is a fixed-point problem in the function : 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 subject to , where a dot over a variable denotes its rate of change over time. Form the current-value Hamiltonian
The optimality conditions are , giving , and , plus the transversality condition . Differentiating with respect to time and using constant-relative-risk-aversion utility gives the continuous-time Euler equation , the same result as the discrete approximation.
With log utility the solution consumes a constant fraction of wealth each instant. For example, with , and log utility (), consumption grows at a year, and a household with wealth of 100 consumes 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 inside ; 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 , has and log utility. Find , and check the Euler equation.
Solution. With log utility . Savings are , so . Euler check: and . Budget check: . Consumption falls slightly because .
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 : . 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 . 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
- Ramsey and overlapping generations models — internal
- Optimization and Lagrange multipliers — internal
- Consumption and investment — internal
- Difference and differential equations — internal
- Fixed points and existence of equilibrium — internal
- The New Keynesian DSGE model — internal
- Havránek (2015), Measuring intertemporal substitution, Journal of the European Economic Association — external reference
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.
Primary Sources
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