Merton's portfolio problem is a well known problem in continuous-time

_{''T''}. He starts with a known initial wealth ''W''_{0} (which may include the present value of wage income). At time ''t'' he must choose what amount of his wealth to consume, ''c''_{''t''}, and what fraction of wealth to invest in a stock portfolio, ''π''_{''t''} (the remaining fraction 1 − ''π''_{''t''} being invested in the risk-free asset).
The objective is
: $\backslash max\; E\; \backslash left;\; href="/html/ALL/l/\backslash int\_0^T\_e^u(c\_s)\_\backslash ,\_ds\_+\_\_\backslash epsilon^\backslash gamma\_e^u(W\_T)\_\backslash right.html"\; ;"title="\backslash int\_0^T\; e^u(c\_s)\; \backslash ,\; ds\; +\; \backslash epsilon^\backslash gamma\; e^u(W\_T)\; \backslash right">\backslash int\_0^T\; e^u(c\_s)\; \backslash ,\; ds\; +\; \backslash epsilon^\backslash gamma\; e^u(W\_T)\; \backslash right$
where ''E'' is the expectation operator, ''u'' is a known _{''T''}), ''ε'' parameterizes the desired level of bequest, and ''ρ'' is the subjective discount rate.
The wealth evolves according to the _{''t''} is the increment of the _{''t''} ≥ 0, while ''π''_{''t''} is unrestricted (that is borrowing or shorting stocks is allowed).
Investment opportunities are assumed constant, that is ''r'', ''μ'', ''σ'' are known and constant, in this (1969) version of the model, although Merton allowed them to change in his

finance
Finance is the study and discipline of money, currency and capital assets. It is related to, but not synonymous with economics, the study of production, distribution, and consumption of money, assets, goods and services (the discipline of ...

and in particular intertemporal portfolio choice Intertemporal portfolio choice is the process of allocating one's investable wealth to various assets, especially financial assets, repeatedly over time, in such a way as to optimize some criterion. The set of asset proportions at any time defines ...

. An investor must choose how much to consume and must allocate their wealth between stocks and a risk-free asset so as to maximize expected utility
As a topic of economics, utility is used to model worth or value. Its usage has evolved significantly over time. The term was introduced initially as a measure of pleasure or happiness as part of the theory of utilitarianism by moral philosop ...

. The problem was formulated and solved by Robert C. Merton
Robert Cox Merton (born July 31, 1944) is an American economist, Nobel Memorial Prize in Economic Sciences laureate, and professor at the MIT Sloan School of Management, known for his pioneering contributions to continuous-time finance, especi ...

in 1969 both for finite lifetimes and for the infinite case. Research has continued to extend and generalize the model to include factors like transaction cost
In economics and related disciplines, a transaction cost is a cost in making any economic trade when participating in a market. Oliver E. Williamson defines transaction costs as the costs of running an economic system of companies, and unlike p ...

s and bankruptcy.
Problem statement

The investor lives from time 0 to time ''T''; their wealth at time ''T'' is denoted ''W''utility function
As a topic of economics, utility is used to model worth or value. Its usage has evolved significantly over time. The term was introduced initially as a measure of pleasure or happiness as part of the theory of utilitarianism by moral philosophe ...

(which applies both to consumption and to the terminal wealth, or bequest, ''W''stochastic differential equation
A stochastic differential equation (SDE) is a differential equation in which one or more of the terms is a stochastic process, resulting in a solution which is also a stochastic process. SDEs are used to model various phenomena such as stock pri ...

:$dW\_t\; =;\; href="/html/ALL/l/r\_+\_\backslash pi\_t(\backslash mu-r))W\_t\_-\_c\_t\_.html"\; ;"title="r\; +\; \backslash pi\_t(\backslash mu-r))W\_t\; -\; c\_t\; ">r\; +\; \backslash pi\_t(\backslash mu-r))W\_t\; -\; c\_t$
where ''r'' is the risk-free rate, (''μ'', ''σ'') are the expected return and volatility of the stock market and ''dB''Wiener process
In mathematics, the Wiener process is a real-valued continuous-time stochastic process named in honor of American mathematician Norbert Wiener for his investigations on the mathematical properties of the one-dimensional Brownian motion. It is ...

, i.e. the stochastic term of the SDE.
The utility function is of the constant relative risk aversion (CRRA) form:
: $u(x)\; =\; \backslash frac,$
where $\backslash gamma$ is a constant which expresses the investor's risk aversion: the higher the gamma, the more reluctance to own stocks.
Consumption cannot be negative: ''c''intertemporal CAPM
Within mathematical finance, the Intertemporal Capital Asset Pricing Model, or ICAPM, is an alternative to the CAPM provided by Robert Merton. It is a linear factor model with wealth as state variable that forecast changes in the distribution of ...

(1973).
Solution

Somewhat surprisingly for anoptimal control
Optimal control theory is a branch of mathematical optimization that deals with finding a control for a dynamical system over a period of time such that an objective function is optimized. It has numerous applications in science, engineering an ...

problem, a closed-form solution exists. The optimal consumption and stock allocation depend on wealth and time as follows:
:$\backslash pi(W,t)\; =\; \backslash frac.$
(This expression is commonly referred to as Merton's fraction. Note that ''W'' and ''t'' do not appear on the right-hand side; this implies that a constant fraction of wealth is invested in stocks, no matter what the age or prosperity of the investor).
:$c(W,t)=\; \backslash begin\backslash nu\; \backslash left(1+(\backslash nu\backslash epsilon-1)e^\backslash right)^\; W\&\backslash textrm\backslash ;T<\backslash infty\backslash ;\backslash textrm\backslash ;\backslash nu\backslash neq0\backslash \backslash (T-t+\backslash epsilon)^W\&\backslash textrm\backslash ;T<\backslash infty\backslash ;\backslash textrm\backslash ;\backslash nu=0\backslash \backslash \backslash nu\; W\&\backslash textrm\backslash ;\; T=\backslash infty\backslash end$
where $0\backslash le\backslash epsilon\backslash ll1$ and
:$\backslash begin\backslash nu\&=\backslash left(\backslash rho-(1-\backslash gamma)\backslash left(\backslash frac+r\backslash right)\backslash right)/\backslash gamma\; \backslash \backslash \&=\backslash rho/\backslash gamma-(1-\backslash gamma)\backslash left(\backslash frac+\backslash frac\; r\backslash right)\backslash \backslash \&=\backslash rho/\backslash gamma-(1-\backslash gamma)(\backslash pi(W,t)^2\; \backslash sigma^2/2+\; r/\backslash gamma)\backslash \backslash \&=\backslash rho/\backslash gamma-(1-\backslash gamma)((\backslash mu-r)\backslash pi(W,t)/2\backslash gamma+\; r/\backslash gamma).\backslash end$
The variable $\backslash rho$ is the subjective utility discount rate.)
Extensions

Many variations of the problem have been explored, but most do not lead to a simple closed-form solution. * Flexible retirement age can be taken into account. * A utility function other than CRRA can be used. * Transaction costs can be introduced. For ''proportional transaction costs'' the problem was solved by Davis and Norman in 1990. It is one of the few cases of stochastic singular control where the solution is known. For a graphical representation, the amount invested in each of the two assets can be plotted on the ''x''- and ''y''-axes; three diagonal lines through the origin can be drawn: the upper boundary, the Merton line and the lower boundary. The Merton line represents portfolios having the stock/bond proportion derived by Merton in the absence of transaction costs. As long as the point which represents the current portfolio is near the Merton line, i.e. between the upper and the lower boundary, no action needs to be taken. When the portfolio crosses above the upper or below the lower boundary, one should rebalance the portfolio to bring it back to that boundary. In 1994 Shreve and Soner provided an analysis of the problem via the Hamilton–Jacobi–Bellman equation and its viscosity solutions. :When there are ''fixed transaction costs'' the problem was addressed by Eastman and Hastings in 1988. A numerical solution method was provided by Schroder in 1995. :Finally Morton and Pliska considered trading costs that are proportional to the wealth of the investor for logarithmic utility. Although this cost structure seems unrepresentative of real life transaction costs, it can be used to find approximate solutions in cases with additional assets, for example individual stocks, where it becomes difficult or intractable to give exact solutions for the problem. * The assumption of constant investment opportunities can be relaxed. This requires a model for how $r,\backslash mu,\backslash sigma$ change over time. An interest rate model could be added and would lead to a portfolio containing bonds of different maturities. Some authors have added a stochastic volatility model of stock market returns. * Bankruptcy can be incorporated. This problem was solved by Karatzas, Lehoczky, Sethi and Shreve in 1986. Many models incorporating bankruptcy are collected in Sethi (1997).References

*{{Cite book , first1 = Ioannis, last1 = Karatzas, first2 = Steven E., last2 = Shreve, author-link2 = Steven E. Shreve, doi = 10.1007/b98840 , title = Methods of Mathematical Finance , series = Stochastic Modelling and Applied Probability , volume = 39 , year = 1998 , isbn = 978-0-387-94839-3 *Merton R.C.: ''Continuous Time Finance'', Blackwell (1990). Financial economics Stochastic control Portfolio theories Intertemporal economics