InvestmentMathMaths for Portfolio Management
https://www.investmentmath.com/
Solution of the Exam (2018)<p><em>This is the solution of the exam for the 2018 ensae course.</em></p>
<hr />
<h2 id="exercise-1">Exercise 1</h2>
<ol type="1">
<li><p>The program is: <span class="math display">\[\underset{\pi}{\text{min}} \; \pi' \Sigma \pi.\]</span> <span class="math display">\[\pi'e=1,\]</span> <span class="math display">\[\pi'\mu=\bar{\mu}.\]</span> The Lagrangian is: <span class="math display">\[\frac{1}{2}\pi' \Sigma \pi-\delta \pi'e-\gamma \pi'\mu.\]</span></p></li>
<li><p>First order condition: <span class="math display">\[\Sigma \pi=\delta e+\gamma \mu.\]</span> The condition <span class="math inline">\(\gamma=0\)</span> corresponds to the minimum variance portfolio, since this corresponds to the soluion of: <span class="math display">\[\underset{\pi}{\text{min}} \; \pi' \Sigma \pi.\]</span> <span class="math display">\[\pi'e=1,\]</span> i.e. wihtout the return constraint.</p></li>
<li><p>If <span class="math inline">\((\Sigma \bar{\pi})_{i}\)</span> is the <span class="math inline">\(i\)</span>^th line of the vector, we have obviously: <span class="math display">\[(\Sigma \bar{\pi})_{i}=\gamma \mu_{i}+\gamma.\]</span> Now <span class="math inline">\((\Sigma \bar{\pi})_{i}\)</span> is the covariance of portfolio <span class="math inline">\(\bar{\pi}\)</span> with asset <span class="math inline">\(i\)</span>.</p></li>
<li><p>Multiplying the first order condition by <span class="math inline">\(\pi'\)</span>, we get: <span class="math display">\[\text{var}(\bar{r})=\gamma \bar{\mu}+\delta.\]</span> Beta is defined as: <span class="math display">\[\frac{\text{Cov}(r_{i},r_{p})}{\text{Var}(r_{p})}.\]</span> We can therefore multiply and divide the left hand side of the equation established in the previous question by <span class="math inline">\(\text{var}(\bar{r})\)</span>: <span class="math display">\[\text{var}(\bar{r})\beta_{i}=\mu_{i}+\frac{\delta}{\gamma},\]</span> which then, leads to: <span class="math display">\[\beta_{i}(\bar{\mu}+\frac{\delta}{\gamma})=\mu_{i}+\frac{\delta}{\gamma}.\]</span></p></li>
<li><p>If we gather all the above equations using a vectorial notation, we get: <span class="math display">\[\beta(\bar{\mu}+\frac{\delta}{\gamma})=\mu+\frac{\delta}{\gamma}.\]</span> We then multiply this by <span class="math inline">\(\tilde{\pi}'\)</span> and then use the fact that <span class="math inline">\(\tilde{\pi}'\beta=0\)</span> to get: <span class="math display">\[0=\tilde{\mu}+\frac{\delta}{\gamma},\]</span> <span class="math display">\[\tilde{\mu}=-\frac{\delta}{\gamma}.\]</span> This provides the required result.</p></li>
<li><p>We have used the assumption <span class="math inline">\(\gamma\neq 0\)</span>. As a consequence, this construct cannot be applied for the minimum variance portfolio.</p></li>
<li><p>Using the definition of <span class="math inline">\(\beta_{i}\)</span>, we can write: <span class="math display">\[\text{Cov}(r_{i},\bar{r})(\bar{\mu}-\rho)=\text{Var}(\bar{r})(\mu_{i}-\rho),\]</span> which in turn gives: <span class="math display">\[\text{Cov}(r_{i},\bar{r})=\frac{\text{Var}(\bar{r})}{\bar{\mu}-\rho}(\mu_{i}-\rho),\]</span> provided <span class="math inline">\(\bar{\mu}-\rho\neq 0\)</span>. This has the form: <span class="math display">\[\Sigma \bar{\pi}=\gamma \mu + \delta e.\]</span></p></li>
<li><p>The above equation is the first order condition of certain maximization problem as set out in question <span class="math inline">\(1\)</span>. To identify this program, all that is needed is finding the expected return. It is however just <span class="math inline">\(\bar{\pi}'\mu\)</span>. Now, since the first order condition characterizes the solution, <span class="math inline">\(\bar{\pi}\)</span> is, as desired, on the efficient frontier.</p></li>
</ol>
<h2 id="exercice-2">Exercice 2</h2>
<ol type="1">
<li><p><span class="math display">\[\frac{dW_{t}}{W_{t}}=x_{t}\frac{dP_{t}}{P_{t}}+(1-x_{t})\frac{dD_{t}}{D_{t}},\]</span> <span class="math display">\[\frac{dW_{t}}{W_{t}}=x_{t}(\mu dt+\sigma dB_{t})+(1-x_{t})rdt,\]</span> <span class="math display">\[\frac{dW_{t}}{W_{t}}=rdt+x_{t}(\mu-r)dt+\pi_{t}\sigma dB_{t},\]</span> <span class="math display">\[E_{t}\left[dW_{t}\right]=W_{t}(rdt+x_{t}(\mu-r)dt),\]</span> <span class="math display">\[d[W]_{t}=W_{t}^{2}x_{t}^{2}\sigma^{2}dt.\]</span></p></li>
<li><p><span class="math display">\[\frac{dW_{t}}{W_{t}}=rdt+x_{t}(\mu-r)dt+x_{t}\sigma dB_{t}-c_{t}dt,\]</span> where <span class="math inline">\(c_{t}=C_{t}/W_{t}\)</span>.</p></li>
<li><p>The term that depend on <span class="math inline">\(C_{t}\)</span> in the expression to be maximized is: <span class="math display">\[u(C_{t})-J_{W}C_{t},\]</span> and its maximization with respect to <span class="math inline">\(C_{t}\)</span> lead to: <span class="math display">\[C_{t}=u^{'-1}(J_{W}).\]</span></p></li>
<li><p>The term that depends on <span class="math inline">\(x_{t}\)</span> is: <span class="math display">\[J_{W}W_{t}x_{t}(\mu-r)+\frac{1}{2}J_{WW}W_{t}^{2}x_{t}^{2}\sigma^{2}.\]</span> Assuming this is a concave function in <span class="math inline">\(x_{t}\)</span>, we can assume optimal investment is given by: <span class="math display">\[x^{*}_{t}=-\frac{J_{W}}{W_{t}J_{WW}}\frac{\mu-r}{\sigma^{2}}.\]</span></p></li>
<li><p>The first fraction on the left hand side is risk tolerance. Investment is proportional to the tagent portfolio.</p></li>
<li><p>This is standard calculus.</p></li>
<li><p>These equations are obtained by subsituting the optimal controls (consumption and investment, as function of the partial derivatives of the value function) into the expressions. The algrebra is a bit tedious but without difficulties.</p></li>
<li><p>Inject the result of 7. into HJB. The algebra is simple.</p></li>
<li><p>Injecting the above results into HJB, prove that <span class="math inline">\(h(\cdot)\)</span> solves the following differential equation: <span class="math display">\[\beta=\frac{1}{\alpha}\left[-\rho+(1-\alpha)r+\frac{1-\alpha}{2\alpha}\lambda^{2}\right],\]</span> the equation is: <span class="math display">\[h'+\beta h+1=0.\]</span> The solution is of the form: <span class="math display">\[h(t)=a \exp(-\beta t)+b.\]</span> The differential equation and the terminal constraint determine <span class="math inline">\(a\)</span> and <span class="math inline">\(b\)</span>. We get: <span class="math display">\[h(t)=\frac{1}{\beta}\left(\exp(\beta (T-t))-1\right).\]</span></p></li>
</ol>
Tue, 15 Jan 2019 00:00:00 +0100
https://www.investmentmath.com/ensae/2019/01/15/solexam.html
https://www.investmentmath.com/ensae/2019/01/15/solexam.htmlExam (2018)<p><em>This is the exam for the 2018 ensae course.</em></p>
<hr />
<h2 id="exercise-1">Exercise 1</h2>
<p>The investment universe is composed of <span class="math inline">\(N\)</span> risky assets (indices <span class="math inline">\(i=1,\ldots,N\)</span>) with expected returns <span class="math inline">\(\mu=(\mu_{1},\ldots,\mu_{N})'\)</span> and covariance matrix <span class="math inline">\(\Sigma\)</span> (dimension <span class="math inline">\((N,N)\)</span>) which is assumed non singular. A portfolio is a vector <span class="math inline">\(\pi\)</span> of size <span class="math inline">\(N\)</span> which records the proportions invested on the assets. The proportions sum to <span class="math inline">\(1\)</span>, i.e. <span class="math inline">\(\pi'e=1\)</span> where <span class="math inline">\(e\)</span> is the vector of size <span class="math inline">\(N\)</span> where each component is equal to <span class="math inline">\(1\)</span>.</p>
<ol type="1">
<li><p>Given a return objective <span class="math inline">\(\bar{\mu}\)</span>, we are looking for the portfolio with the lowest possible level of risk. Give the corresponding optimization problem. Derive the Lagrangian, noting <span class="math inline">\(\gamma\)</span> the multiplier of the return constraint and <span class="math inline">\(\delta\)</span> the multiplier of the full investment constraint.</p></li>
<li><p>What is the first order condition corresponding to the optimum ? For which portfolio do we get <span class="math inline">\(\gamma=0\)</span> ?</p></li>
<li><p>We consider an optimal portfolio <span class="math inline">\(\bar{\pi}\)</span> with <span class="math inline">\(\gamma \neq 0\)</span> and return <span class="math inline">\(\bar{r}\)</span>. Show that the first order condition for this portfolio can be written as: <span class="math display">\[\text{cov}(r_{i},\bar{r})=\gamma \mu_{i}+\delta.\]</span></p></li>
<li><p>Show that: <span class="math display">\[\text{var}(\bar{r})=\gamma \bar{\mu}+\delta,\]</span> and: <span class="math display">\[\beta_{i}(\bar{\mu}+\frac{\delta}{\gamma})=\mu_{i}+\frac{\delta}{\gamma},\]</span> where <span class="math inline">\(\beta_{i}\)</span> is the beta of asset <span class="math inline">\(i\)</span> against portfolio <span class="math inline">\(\bar{\pi}\)</span>.</p></li>
<li><p>We now consider portfolio <span class="math inline">\(\tilde{\pi}\)</span> with return <span class="math inline">\(\tilde{r}\)</span> satisfying: <span class="math inline">\(\text{cov}(\tilde{r},\bar{r})=0\)</span>. Let <span class="math inline">\(\tilde{\mu}\)</span> be its expected return. Show that for asset <span class="math inline">\(i\)</span>: <span class="math display">\[\mu_{i}-\tilde{\mu}=\beta_{i}(\bar{\mu}-\tilde{\mu}).\]</span> This is called a one factor representation of expected returns.</p></li>
<li><p>Only one efficient portfolio does not give rise to a one factor representation of expected returns. Which one ?</p></li>
<li><p>Inversely, assume that portfolio <span class="math inline">\(\bar{\pi}\)</span> with return <span class="math inline">\(\bar{r}\)</span> gives rise to a one factor representation: <span class="math display">\[\beta_{i}(\bar{\mu}-\rho)=\mu_{i}-\rho,\]</span> for all <span class="math inline">\(i\)</span>, where <span class="math inline">\(\beta_{i}\)</span> is the beta of asset <span class="math inline">\(i\)</span> with respect to portfolio <span class="math inline">\(\bar{\pi}\)</span>. Show that we have the following vectorial relationship: <span class="math display">\[\Sigma \bar{\pi}=\gamma \mu + \delta e,\]</span> where <span class="math inline">\(\gamma\)</span> and <span class="math inline">\(\delta\)</span> are constants associated to the one factor representation.</p></li>
<li><p>Conclude that portfolio <span class="math inline">\(\bar{\pi}\)</span> (the portfolio which generates the given one factor representation) is a solution to the problem defined in the first question. As a reminder, in the context of convex objective function and linear constraints, the first order condition attached to the Lagrangian is both necessary and sufficient to define a solution.</p></li>
</ol>
<h2 id="exercice-2">Exercice 2</h2>
<p>We consider the following continuous time investment problem. The investment universe is composed of two assets, cash with constant rate of return: <span class="math display">\[\frac{dD_{t}}{D_{t}}=r dt,\]</span> and a risky asset that follows a geometric diffusion process: <span class="math display">\[\frac{dP_{t}}{P_{t}}=\mu dt+\sigma dB_{t}=r dt+(\mu-r)dt+\sigma dB_{t},\]</span> where <span class="math inline">\(B_{t}\)</span> is a scalar Brownian motion. The price of risk is defined as <span class="math inline">\(\lambda=(\mu-r)/\sigma\)</span>.</p>
<p>At each point in time, wealth <span class="math inline">\(W_{t}\)</span> is invested to finance a consumption flow <span class="math inline">\(C_{t}dt\)</span> over the time interval <span class="math inline">\([t,t+dt]\)</span>. The fraction of wealth invested on the risky asset at time <span class="math inline">\(t\)</span> is noted <span class="math inline">\(x_{t}\)</span>.</p>
<ol type="1">
<li><p>Give the stochastic differential equation followed by wealth assuming consumption is zero. As a reminder, this is the infinitesimal version of the discrete time equation. Give <span class="math inline">\(E_{t}[dW_{t}]\)</span> (the drift of wealth) and <span class="math inline">\(d[W]_{t}\)</span> (the quadratic variation of wealth).</p></li>
<li><p>Same question without assuming <span class="math inline">\(C^{t}=0\)</span>.</p></li>
</ol>
<p>At each time <span class="math inline">\(t\)</span>, the investor maximizes: <span class="math display">\[E_{t}\left[\int_{t}^{T}e^{-\rho (u-t)}u(C_{u})du\right],\]</span> by making consumption - <span class="math inline">\(C_{t}\)</span> - and investment - <span class="math inline">\(x_{t}\)</span> - choices. The associated value function is noted <span class="math inline">\(J(t,W_{t})\)</span>. It is admitted that the dynamic programming principle implies the following partial differential equation (HJB): <span class="math display">\[0=\max_{(C_{t},x_{t})}\left[
u(C_{t})-\rho J+\frac{\partial J}{\partial t}+\frac{\partial J}{\partial W}E[dW_{t}]+\frac{1}{2}\frac{\partial^{2} J}{\partial W^{2}}d[W]_{t}
\right].\]</span></p>
<p>We will use the following notations: <span class="math display">\[\frac{\partial J}{\partial t}=J_{t},\]</span> <span class="math display">\[\frac{\partial J}{\partial W}=J_{W},\]</span> <span class="math display">\[\frac{\partial^{2} J}{\partial W^{2}}=J_{WW}.\]</span></p>
<ol start="3" type="1">
<li><p>Give the optimal consumption rate <span class="math inline">\(C_{t}^{*}\)</span> as a function of <span class="math inline">\(J_{W}\)</span> and the utility function.</p></li>
<li><p>Give the optimal risky asset weight <span class="math inline">\(x_{t}^{*}\)</span>, outlining the relevant property of the value function underlying your reasoning.</p></li>
<li><p>Describe the structure of this solution.</p></li>
</ol>
<p>We now assume the utility function is: <span class="math display">\[u(C)=\frac{C^{1-\alpha}}{1-\alpha},\]</span> with <span class="math inline">\(\alpha>1\)</span> and admit that the value function has a similar structure: <span class="math display">\[J(t,W_{t})=h(t)^{\alpha}\frac{W_{t}^{1-\alpha}}{1-\alpha}.\]</span></p>
<ol start="6" type="1">
<li><p>Show that: <span class="math display">\[\frac{C^{*}_{t}}{W^{*}_{t}}=h(t)^{-1},\]</span> and: <span class="math display">\[x_{t}^{*}=\frac{1}{\alpha}\frac{\lambda}{\sigma}.\]</span></p></li>
<li><p>Show that at each date <span class="math inline">\(t\)</span>: <span class="math display">\[u(C^{*})-J_{W}C^{*}=\frac{\alpha}{1-\alpha}J_{W}^{(\alpha-1)/\alpha},\]</span> <span class="math display">\[J_{W}Wx^{*}(\mu-r)+\frac{1}{2}J_{WW}W^{2}\sigma^{2}x^{*2}=-\frac{1}{2}\frac{J_{W}^{2}}{J_{WW}}\lambda^{2}.\]</span></p></li>
<li><p>Injecting the above results into HJB, prove that <span class="math inline">\(h(\cdot)\)</span> solves the following differential equation: <span class="math display">\[h'+\frac{1}{\alpha}\left[-\rho+(1-\alpha)r+\frac{1-\alpha}{2\alpha}\lambda^{2}\right]h+1=0,\]</span> with <span class="math inline">\(h(T)=0\)</span>.</p></li>
<li><p>Find the solution <span class="math inline">\(h(\cdot)\)</span>.</p></li>
<li><p>Give the stochastic differential equation followed by log wealth and log consumption.</p></li>
</ol>
Mon, 03 Dec 2018 00:00:00 +0100
https://www.investmentmath.com/ensae/2018/12/03/exam.html
https://www.investmentmath.com/ensae/2018/12/03/exam.htmlExam (2017)<p><em>This is the exam for the 2017 ensae course.</em></p>
<hr />
<h2 id="notations">Notations</h2>
<p>I consider an investment universe composed of cash (index <span class="math inline">\(i=0\)</span>) with return <span class="math inline">\(r\)</span> and <span class="math inline">\(N\)</span> risky assets (indices <span class="math inline">\(i=1,\ldots,N\)</span>) with expected returns <span class="math inline">\(\mu=(\mu_{1},\ldots,\mu_{N})'\)</span> and covariance matrix <span class="math inline">\(\Sigma\)</span> (dimension <span class="math inline">\((N,N)\)</span>). Each investor builds a portfolio <span class="math inline">\(\pi=(\pi_{0},\tilde{\pi})\)</span> where <span class="math inline">\(\pi_{0}\)</span> is the proportion of wealth invested in cash and <span class="math inline">\(\tilde{\pi}\)</span> is a vector of size <span class="math inline">\((N,1)\)</span> recording the proportions invested on the risky assets. The portfolio vector satisfies the following contraint: <span class="math display">\[\pi_{0}+\tilde{\pi}'e=1,\]</span> where <span class="math inline">\(e\)</span> is the vector of size <span class="math inline">\(N\)</span> with all components equal to <span class="math inline">\(1\)</span>.</p>
<h2 id="part-1">Part <span class="math inline">\(1\)</span></h2>
<h2 id="exercise-1">Exercise 1</h2>
<p>Investor preferences are assumed quadratic (expected utility): <span class="math display">\[\pi_{0}r+\tilde{\pi}'\mu-\frac{\rho}{2}\tilde{\pi}'\Sigma\tilde{\pi},\]</span> indexed by <span class="math inline">\(\rho>0\)</span>.</p>
<ol type="1">
<li><p>Let’s assume investors access risky assets exclusively through a portfolio <span class="math inline">\(\tilde{\pi}_{e}\)</span> (satisfying <span class="math inline">\(\tilde{\pi}_{e}'e=1\)</span>), with expected return <span class="math inline">\(\mu_{e}\)</span> and variance <span class="math inline">\(\sigma_{e}^{2}\)</span>. Let <span class="math inline">\(\hat{\pi}_{\rho}\)</span> be the proportion of portfolio <span class="math inline">\(\tilde{\pi}_{e}\)</span> bought by an investor with parameter <span class="math inline">\(\rho\)</span> (her risky asset portfolio is therefore <span class="math inline">\(\tilde{\pi}_{\rho}=\hat{\pi}_{\rho}\tilde{\pi}_{e}\)</span>). Compute <span class="math inline">\(\tilde{\pi}_{\rho}\)</span>.</p></li>
<li><p>Given the situation described in question 1, all investors hold different proportions of the index <span class="math inline">\(\tilde{\pi}_{e}\)</span>. We are now interested in marginal changes in risky asset positions investors could make to improve their expected utility level. Compute the gradient of expected utility of investor <span class="math inline">\(\rho\)</span>, measured at <span class="math inline">\(\tilde{\pi}_{\rho}\)</span>.</p></li>
<li><p>Show that the gradient is independent of <span class="math inline">\(\rho\)</span>, and that component <span class="math inline">\(i\)</span> is equal to: <span class="math display">\[(\mu_{i}-r)-\beta_{i,e}\eta,\]</span> where <span class="math inline">\(\beta_{i,e}\)</span> is the beta of asset <span class="math inline">\(i\)</span> with respect to the index (the beta of <span class="math inline">\(y\)</span> with respect to <span class="math inline">\(x\)</span> is <span class="math inline">\(\text{Cov}(y,x)/\text{Var}(x)\)</span>) and <span class="math inline">\(\eta\)</span> is a constant that will be expressed as a return.</p></li>
<li><p>To improve expected utility, one can move positions in the direction given by the gradient. Explain why all investors agree on the assets to buy and sell in this process.</p></li>
</ol>
<h2 id="part-2">Part <span class="math inline">\(2\)</span></h2>
<p>In this part, the returns of the assets between date <span class="math inline">\(t-1\)</span> and date <span class="math inline">\(t\)</span> will be noted <span class="math inline">\(R_{i,t}\)</span> while the rates of return are written <span class="math inline">\(r_{i,t}\)</span>. The vector (of size <span class="math inline">\((N+1,1)\)</span>) of returns is <span class="math inline">\(R_{t}\)</span>. Note that this vector contains the cash return. I assume initially that the sequence of returns is i.i.d.. As usual, the vector of size <span class="math inline">\((N+1,1)\)</span> with all components equal to <span class="math inline">\(1\)</span> is noted <span class="math inline">\(e\)</span>.</p>
<p>Let <span class="math inline">\(w_{t}\)</span> be the level of wealth. At any date <span class="math inline">\(t<T\)</span>, the investor maximizes the expected value of the log of wealth at horizon <span class="math inline">\(T\)</span>.</p>
<h2 id="exercice-2">Exercice 2</h2>
<ol type="1">
<li><p>Describe the optimization program and define the value function.</p></li>
<li><p>Give the dynamic programming equation between date <span class="math inline">\(t\)</span> and <span class="math inline">\(t+1\)</span>.</p></li>
<li><p>Using backward induction, show that the value function has the following structure: <span class="math display">\[V_{t}(w_{t})=\log(w_{t})+A_{t},\]</span> where <span class="math inline">\(A_{t}\)</span> is a constant. Conclude that the investor solves the same optimization problem (which one ?) at each date <span class="math inline">\(t\)</span>.</p></li>
<li><p>Give the first order condition of the problem identified in question <span class="math inline">\(3\)</span>. Is this condition sufficient ?</p></li>
</ol>
<p>We now assume that there is a solution to the optimization problem identified in question <span class="math inline">\(3\)</span>.</p>
<ol start="5" type="1">
<li>Assume that an investor with infinite investment horizon solves the sequential optimization problem defined above. This leads to a same optimal portfolio <span class="math inline">\(\pi_{*}\)</span> being chosen in each period. Prove that this policy beats any other static portfolio choice <span class="math inline">\(\pi\neq\pi_{*}\)</span>.</li>
</ol>
<p>I now drop the assumption that returns are i.i.d.. The conditional distribution <span class="math inline">\({\cal L}_{t}(R_{t+1})\)</span> of period <span class="math inline">\(t+1\)</span> returns as seen from period <span class="math inline">\(t\)</span> is supposed to be characterized by a markovian state variable <span class="math inline">\(x_{t}\)</span>. More generally, we assume that for any random variable <span class="math inline">\(y_{t+1}\)</span>: <span class="math display">\[E_{t}[y_{t+1}]=E[y_{t+1}|x_{t}].\]</span> It is reminded that <span class="math inline">\(E[y_{t+1}|x_{t}]\)</span> can be written <span class="math inline">\(g(x_{t})\)</span> where the function <span class="math inline">\(g(\cdot)\)</span> is specific to the random variable <span class="math inline">\(y_{t+1}\)</span>.</p>
<p>The optimization problem is otherwise unchanged.</p>
<ol start="6" type="1">
<li><p>Define the state variable of the new problem, and give the new dynamic programming equation.</p></li>
<li><p>Show that the value function now has the following structure: <span class="math display">\[V_{t}(x_{t},w_{t})=\log(w_{t})+A_{t}(x_{t}).\]</span></p></li>
<li><p>Which optimization problem is solved at each date as a result ? The solution will be noted <span class="math inline">\(\pi_{t}^{*}(x_{t})\)</span>.</p></li>
</ol>
<p>I remind that a martingale difference is a process <span class="math inline">\((z_{t})_{t\in \mathbb{N}}\)</span> satisfying <span class="math inline">\(E_{t}[z_{t+1}]=0\)</span>. We will admit that under some condition on second moments, almost surely: <span class="math display">\[\lim_{T \rightarrow +\infty}\frac{1}{T}\sum_{t=1}^{T}z_{t}=0.\]</span></p>
<ol start="9" type="1">
<li><p>We now want to extend the result of question <span class="math inline">\(5\)</span> to the new context. An investor chooses at each date the portfolio <span class="math inline">\(\pi_{t}(x_{t})\)</span>. Show that asymptotically, the wealth process generated by <span class="math inline">\(\pi_{t}^{*}(x_{t})\)</span> dominates that generated by <span class="math inline">\(\pi_{t}(x_{t})\)</span>.</p></li>
<li><p>Extend the above results to the continuous time context, starting with the i.i.d. case.</p></li>
</ol>
Sat, 01 Dec 2018 00:00:00 +0100
https://www.investmentmath.com/ensae/2018/12/01/exam.html
https://www.investmentmath.com/ensae/2018/12/01/exam.htmlThe Martingale Method in Continuous Time<p><em>This post describes the martingale method in continuous time. It should be read after <a href="/ensae/2015/11/14/complete-dyn.html">this one</a>. It illustrates the method on a simple example within the Black and Scholes framework where an investor maximizes the utility of terminal wealth. In this context, the martingale method allows to spell out how optimal terminal wealth depends on the unique stochastic discount factor, or alternatively, how it is obtained as a transformation of the stock return. The transformation hinges on the shape of the utility function. The case of a CRRA utility function is fully spelled out. The results obtained through dynamic programming <a href="/ensae/2014/10/27/cont.html">here</a> are recovered although the martingale method does not easily uncover the trading policy that generates the optimal terminal wealth.</em></p>
<hr />
<h2 id="no-arbitrage-and-stochastic-discount-factors">No arbitrage and Stochastic Discount Factors</h2>
<ul>
<li><p>We take a situation where trading takes place over a time interval <span class="math inline">\([0,T]\)</span>. <span class="math inline">\(T\)</span> is therefore the end of time.</p></li>
<li><p>In this context, we say that the market is complete if any suitably measurable and integrable pay-off <span class="math inline">\(X_{t}\)</span> of any date <span class="math inline">\(t\)</span> can be obtained through a trading strategy, starting from some initial level of wealth.</p></li>
<li>The logic remains the same as in the case of discrete time:
<ul>
<li>if there is a strictly positive stochastic discount factor, there is no arbitrage,</li>
<li>if there is no arbitrage, there exists a strictly positive discount factor,</li>
<li>the market is complete if and only if there is a unique strictly positive discount factor.</li>
</ul></li>
<li><p>The results are however much more difficult to establish, especially going from no arbitrage to the existence of the strictly positive discount factor.</p></li>
<li><p>As in discrete time, the existence of a strictly positive discount factor is equivalent to the existence of a probability measure such that after choosing the bank account as the numeraire, asset prices follow martingale dynamics under the new probability measure.</p></li>
<li><p>The completeness of the market is tightly linked to the ability of representing martingales as stochastic integrals with respect to ‘tradable martingales’. When the martingale representation result holds in the given market context (all suitably measurable and integrable martingales can be obtained as stochastic integrals with respect to ‘tradable martingales’), the given representation can be used to identify the trading policy that generates the pay-off <span class="math inline">\(X_{t}\)</span>. Martingale representation results are existence results and other techniques are needed to effectively compute the trading policy.</p></li>
</ul>
<h2 id="the-martingale-approach">The martingale approach</h2>
<ul>
<li><p>I assume that the market admits no arbitrage, and is complete.</p></li>
<li><p>Let’s consider a consumption and investment problem, without labour income. We assume that the optimization problem is: <span class="math display">\[\underset{(C_{[0,T]},\pi_{[0,T]})}{\text{max}}
\; E_{0}\left[\int_{0}^{T} \delta^{v}u_{v}(C_{v})du+U(W_{T})\right],\]</span> subject to the self-financing condition: <span class="math display">\[\frac{dW_{v}}{W_{v}}=\pi_{0,t}r_{v}du+\sum_{i=1}^{N}\pi_{i,t}\frac{dS_{i,t}}{S_{i,t}}-\frac{dC_{v}}{W_{v}},\]</span> for an initial level of wealth <span class="math inline">\(W_{0}\)</span>. I will assume <span class="math inline">\(u_{t}(\cdot)\)</span> and <span class="math inline">\(U(\cdot)\)</span> have range <span class="math inline">\(\mathbb{R}_{+}^{*}\)</span> and are strictly increasing and concave, with <span class="math inline">\(u_{t}^{\prime}\)</span> and <span class="math inline">\(U^{\prime}\)</span> ranging from <span class="math inline">\(+\infty\)</span> to <span class="math inline">\(0\)</span> as consumption varies in <span class="math inline">\(\mathbb{R}_{+}^{*}\)</span>.</p></li>
<li><p>Because the market is complete, we actually don’t have to worry about how a consumption stream (including final wealth) is going to be financed. All that matters is that initial wealth is sufficient to finance them given the Arrow-Debreu prices. If that is the case, we know that a financing policy has to exists.</p></li>
<li><p>We can thus restate the optimization problem as: <span class="math display">\[\underset{C_{[0,T]}}{\text{max}}
\; E_{0}\left[\int_{0}^{T} \delta^{v}u_{v}(C_{v})du+\delta^{T}U(W_{T})\right],\]</span> subject to the financability condition: <span class="math display">\[W_{0}=E_{0}\left[\int_{0}^{T} M_{v}C_{v}du+M_{T}W_{T}\right].\]</span></p></li>
<li><p>We can study the corresponding Lagrangian: <span class="math display">\[E_{0}\left[\int_{0}^{T} \delta^{v}u_{v}(C_{v})du+\delta^{T}U(W_{T})-\lambda\left(\int_{0}^{T} M_{v}C_{v}du+M_{T}W_{T}\right)\right].\]</span> We can then pretend to solve it as if all <span class="math inline">\(C_{t}(\omega)\)</span> (all dates and all states of nature) and <span class="math inline">\(W_{T}(\omega)\)</span> (all states of nature) were chosen independently. Of course these values cannot be chosen independently in reality since the functions <span class="math inline">\(C_{t}(\cdot)\)</span> and <span class="math inline">\(W_{T}(\cdot)\)</span> have to be adapted to the filtration for example. We will however proceed as if they could be chosen independently and we will check ex-post that the solutions are indeed adapted.</p></li>
<li><p>By analogy to the discrete time case, we should expect: <span class="math display">\[\delta^{t}u_{t}'(C_{t}(\omega))=\lambda M_{t}(\omega),\]</span> <span class="math display">\[\delta^{T}U_{t}'(W_{T}(\omega))=\lambda M_{T}(\omega),\]</span> for some <span class="math inline">\(\lambda\)</span>.</p></li>
<li><p>Given that the state price deflator is adapted to the filtration and that commands are defined by: <span class="math display">\[C_{t}(\omega)=u^{\prime -1}(\lambda\delta^{-t} M_{t}(\omega)),\]</span> <span class="math display">\[W_{T}(\omega)=U^{\prime -1}(\lambda\delta^{-T} M_{T}(\omega)),\]</span> the commands necessarily satisfy the measurability conditions (adaptation to the filtration).</p></li>
<li><p>The choice of <span class="math inline">\(\lambda\)</span> is dictated by the budget constraint: <span class="math display">\[W_{0}=E_{0}\left[\int_{0}^{T} M_{v}C_{v}du+M_{T}W_{T}\right].\]</span> The assumptions on the derivatives of the utility functions are designed to ensure the existence of a suitable multiplier. Indeed, one can check that the budget required by the above consumption and final wealth levels is a monotonous function of <span class="math inline">\(\lambda\)</span> and that there necessarily exists a value <span class="math inline">\(\lambda^{*}\)</span> that is compatible with the initial level of wealth.</p></li>
<li><p>This solution technique is very elegant. It should however be clear that it does not deliver the required trading policy. We know that this policy exists, but we have not established a way to pin it down.</p></li>
</ul>
<h2 id="a-simple-illustration">A simple illustration</h2>
<ul>
<li><p>I now illustrate this method on a Black and Scholes setting. The example is borrowed from John Cochrane (reference): <span class="math display">\[\frac{dD_{t}}{D_{t}}=rdt,\]</span> <span class="math display">\[\frac{dS_{t}}{S_{t}}=\mu dt+\sigma dB_{t}=rdt+(\mu-r)dt+\sigma dB_{t}.\]</span></p></li>
<li><p>Suppose the SDF follows a diffusion: <span class="math display">\[\frac{dM_{t}}{M_{t}}=\beta dt+\alpha dB_{t}.\]</span> Applying Ito to <span class="math inline">\(M_{t}D_{t}\)</span> and imposing that the drift is null (i.e. we have a martingale), we see that we should have <span class="math inline">\(\beta=-r\)</span>. Similarly, Ito applied to <span class="math inline">\(M_{t}S_{t}\)</span> forces <span class="math inline">\(\alpha=-(\mu-r)/\sigma=-\lambda\)</span> (minus the price of risk), so that in the end: <span class="math display">\[\frac{dM_{t}}{M_{t}}=-r dt-\lambda dB_{t}.\]</span></p></li>
<li><p>The market is complete and any suitably integrable martingale <span class="math inline">\((X_{t})_{t \in [0,T]}\)</span> can be expressed as a stochastic integral: <span class="math display">\[\int_{0}^{t}h_{v}dB_{v},\]</span> where <span class="math inline">\((h_{v})_{t \in [0,T]}\)</span> is a predictable process.</p></li>
<li><p>Let’s consider now an optimization problem with terminal utility of wealth: <span class="math display">\[\underset{W_{T}}{\text{max}} \; E_{0}\left[U(W_{T})\right],\]</span> subject to the financeability condition (complete market): <span class="math display">\[W_{0}=E_{0}\left[M_{T}W_{T}\right].\]</span> We take: <span class="math display">\[U(W)=\frac{W^{1-\rho}}{1-\rho}.\]</span></p></li>
<li><p>We know that there must exist a Lagrange multiplier <span class="math inline">\(\gamma\)</span> such that: <span class="math display">\[U^{\prime}(W_{T})=\gamma M_{T},\]</span> <span class="math display">\[W_{0}=E_{0}\left[M_{T}U^{\prime -1}(\gamma M_{T})\right].\]</span> Using <span class="math inline">\(U^{\prime}(x)=x^{-\rho}\)</span>, we then get: <span class="math display">\[\frac{W_{T}^{*}}{W_{0}}=\frac{M_{T}^{-\frac{1}{\rho}}}{E_{0}\left[M_{T}^{\frac{\rho-1}{\rho}}\right]}.\]</span></p></li>
<li><p>Integrating the SDE followed by <span class="math inline">\(M_{t}\)</span>, we get: <span class="math display">\[M_{T}=\exp\left(-(r+\frac{1}{2}\lambda^{2})T-\lambda B_{T}\right).\]</span> Injecting this into the expression for optimal wealth delivers: <span class="math display">\[W_{T}^{*}=\exp\left(rT+\frac{1}{\rho}(1-\frac{1}{2\rho})\lambda^{2}T+\frac{1}{\rho}\lambda B_{T}\right).\]</span> It can be checked that this is the same expression as the one obtained <a href="/ensae/2014/10/27/cont.html">here</a>, where we solved this constant opportunities problem with CRRA utility of terminal wealth through dynamic programming.</p></li>
<li><p>Relatively lengthy calculations also show that, setting: <span class="math display">\[\alpha=\frac{\lambda}{\rho \sigma},\]</span> we have: <span class="math display">\[\frac{W_{T}^{*}}{W_{0}}=\exp\left((1-\alpha)(r+\frac{1}{2}\alpha\sigma^{2})T\right)R_{T}^{\alpha},\]</span> where: <span class="math display">\[R_{T}=\frac{S_{T}}{S_{0}}=\exp\left(rT+\sigma\lambda T+\sigma B_{T}\right).\]</span></p></li>
<li><p>Optimal wealth is thus a transformation of the stock return. The graph below gives the shape of this transformation for different values of parameters. For low risk aversion, the transformation is convex. It is concave for high risk aversion, and linear for <span class="math inline">\(\alpha=1\)</span>. This is consistent with the idea that investors with low risk aversion will accept the downside to benefit from the downside. In contrast, high risk aversion investors are willing to sacrifice the upside to protect the downside.</p></li>
</ul>
<figure>
<img src="/assets/media/complete.png" alt="Figure 1: The impact of risk aversion on the optimal wealth schedule (blue=leveraged, red=unleveraged)" /><figcaption>Figure 1: The impact of risk aversion on the optimal wealth schedule (blue=leveraged, red=unleveraged)</figcaption>
</figure>
<p><br />
</p>
<ul>
<li>The martingale method does not deliver a trading policy. We know from dynamic programming however that the optimal policy consists in investing <span class="math inline">\(\alpha\)</span> on the stock at all times. Low risk aversion investors have <span class="math inline">\(\alpha>1\)</span> (leverage) while high risk aversion investors have <span class="math inline">\(\alpha<1\)</span> (the investor holds cash in addition to stocks). The case <span class="math inline">\(\alpha=1\)</span> consists in putting all wealth on stocks and holding it subsequently. It is a buy-and-hold policy. It should be noted that in all cases, wealth is entirely consumed when <span class="math inline">\(R_{T}=0\)</span>. In contrast, an investor who splits its wealth on cash and stocks and never rebalances is guaranteed to keep its cash when the value of the stock goes to zero.</li>
</ul>
Fri, 13 Jan 2017 00:00:00 +0100
https://www.investmentmath.com/ensae/2017/01/13/completecont.html
https://www.investmentmath.com/ensae/2017/01/13/completecont.htmlConstrained Optimization<p><em>This post collects constrained optimzation results for reference.</em></p>
<hr />
<h2 id="kuhn-tucker">Kuhn-Tucker</h2>
<p>The presentation below is an adaptation of <em>Functional Analysis, Calculus of Variations and Optimal Control</em>, by Francis Clarke, Springer Verlag 2013 (Chapter <span class="math inline">\(9\)</span>).</p>
<p>We start with the following data:</p>
<ul>
<li><span class="math inline">\(S\)</span> is a convex set of <span class="math inline">\(\mathbb{R}^{N}\)</span></li>
<li><span class="math inline">\(f : S \to \mathbb{R}\)</span></li>
<li><span class="math inline">\(f\)</span> is concave</li>
<li><span class="math inline">\(g_{i} : S \to \mathbb{R},\, i=1,2,\ldots,m\)</span></li>
<li>each <span class="math inline">\(g_{i}\)</span> is convex</li>
<li><span class="math inline">\(h_{i} : S \to \mathbb{R},\, i=1,2,\ldots,n\)</span></li>
<li>each <span class="math inline">\(h_{i}\)</span> is affine</li>
</ul>
<p>Program <span class="math inline">\(P\)</span>: <span class="math display">\[\underset{x}{\text{max}} \; f(x)\]</span> <span class="math display">\[\text{s.t.}:\]</span> <span class="math display">\[x \in S,\]</span> <span class="math display">\[h(x)=0,\]</span> <span class="math display">\[g(x)\leq 0.\]</span></p>
<p><strong>Theorem (Kuhn-Tucker)</strong>: <em>Let <span class="math inline">\(x_{*}\)</span> be a solution of <span class="math inline">\(P\)</span>. Then there exists <span class="math inline">\((\eta_{*},\gamma_{*},\lambda_{*}) \in \mathbb{R}\times\mathbb{R}^{m}\times\mathbb{R}^{n}\)</span> satisfying (non triviality)</em>:</p>
<p><span class="math display">\[(\eta_{*},\gamma_{*},\lambda_{*})\neq 0,\]</span> <em>as well as (positivity and complementary slackness)</em>: <span class="math display">\[\eta_{*}=0\; \textrm{or}\; 1,\, \gamma_{*}\geq 0, \,\langle\gamma_{*},g(x_{*})\rangle=0,\]</span> <em>and (maximization condition)</em>, <span class="math inline">\(\forall x \in S\)</span>: <span class="math display">\[\eta_{*} f(x)-\langle\gamma_{*},g(x)\rangle-\langle\lambda_{*},h(x)\rangle\leq \eta_{*} f(x_{*})-\langle\gamma_{*},g(x_{*})\rangle-\langle\lambda_{*},h(x_{*})\rangle=\eta_{*} f(x_{*}).\]</span></p>
<p><span class="math inline">\({\scriptstyle \blacksquare}\)</span></p>
<p>The proof of this proposition entails the analysis of the convex cone: <span class="math display">\[C=\{(f(x)-\delta,g(x)+\Delta,h(x)): \delta \geq 0,\Delta \geq 0, x\in S\},\]</span> around <span class="math inline">\(z_{*}=(f(x_{*}),0,0)\)</span>, which must lie on its boundary. One then uses the fact that there must exist a vector at <span class="math inline">\(z_{*}\)</span> that points towards the exterior of <span class="math inline">\(C\)</span> and such that the scalar product of this vector with any vector <span class="math inline">\(z-z_{*}\)</span> (where <span class="math inline">\(z\)</span> is in <span class="math inline">\(C\)</span>) is negative.</p>
<h3 id="first-order-condition">First order condition</h3>
<p>In the above theorem, the usual stationarity condition (first order condition) is replaced by a maximization condition. It is clear that if <span class="math inline">\(x_{*}\)</span> is in the interior of <span class="math inline">\(S\)</span> and that <span class="math inline">\(f\)</span> and <span class="math inline">\(g\)</span> are differentiable at <span class="math inline">\(x_{*}\)</span>, the maximization condition implies: <span class="math display">\[\eta_{*} \nabla f(x)-\langle\gamma_{*},\nabla g(x)\rangle-\langle\lambda_{*},\nabla h(x)\rangle=0.\]</span></p>
<h3 id="sufficiency">Sufficiency</h3>
<p>When <span class="math inline">\(\eta_{*}=1\)</span> (the normal case), the maximization condition reads: <span class="math display">\[f(x)-\langle\gamma_{*},g(x)\rangle-\langle\lambda_{*},h(x)\rangle\leq f(x_{*}), \forall x \in S.\]</span> Since <span class="math inline">\(\gamma_{*}\geq 0\)</span>, we have <span class="math inline">\(\langle\gamma_{*},g(x)\rangle\leq 0\)</span> whenever <span class="math inline">\(x\)</span> satisfies the inequality constraint <span class="math inline">\(g(x)\leq 0\)</span>. In addition, under the set of constraints, <span class="math inline">\(h(x)=0\)</span>. We can thus conclude that: <span class="math display">\[f(x) \leq f(x_{*}), \forall x \in S,\, g(x)\leq 0,\, h(x)=0,\]</span> and we can conclude that <span class="math inline">\(x_{*}\)</span> is optimum, i.e. the conditions in the theorem are also sufficient.</p>
<h3 id="slater-condition">Slater condition</h3>
<p><strong>Theorem (Slater conditions)</strong>: <em>Assume that there exists a strictly admissible point <span class="math inline">\(x_{0}\)</span> for <span class="math inline">\(P\)</span>, i.e.</em>: <span class="math display">\[x_{0}\in \text{int}S,\, g(x_{0})<0,\, h(x_{0})=0,\]</span> <em>and the affine functions of the equality constraints are independent. Then the multiplier of the Kuhn-Tucker Theorem satisfies <span class="math inline">\(\eta_{*}=1\)</span>.</em></p>
<p><span class="math inline">\({\scriptstyle \blacksquare}\)</span></p>
<h3 id="saddle-point-property">Saddle point property</h3>
<p>Assume <span class="math inline">\(x_{*}\)</span> and <span class="math inline">\((1,\gamma_{*},\lambda_{*})\)</span> are the multiplier of problem <span class="math inline">\(P\)</span>. The maximization condition in the Kuhn-Tucker theorem reads: <span class="math display">\[f(x)-\langle\gamma_{*},g(x)\rangle-\langle\lambda_{*},h(x)\rangle\leq f(x_{*})-\langle\gamma_{*},g(x_{*})\rangle-\langle\lambda_{*},h(x_{*})\rangle=f(x_{*}), \forall x \in S.\]</span> Now, since <span class="math inline">\(\gamma_{*}\geq 0\)</span> and <span class="math inline">\(g(x_{*})\leq 0\)</span>, we have <span class="math inline">\(\langle\gamma,g(x_{*})\rangle\geq 0\)</span> for all <span class="math inline">\(\gamma\geq 0\)</span> with equality for <span class="math inline">\(\gamma_{*}\)</span> (complementary slackness). We also have <span class="math inline">\(\langle\lambda,h(x_{*})\rangle=0\)</span>. As a result we have: <span class="math display">\[f(x)-\langle\gamma_{*},g(x)\rangle-\langle\lambda_{*},h(x)\rangle\leq f(x_{*})\leq f(x_{*})-\langle\gamma,g(x_{*})\rangle-\langle\lambda,h(x_{*})\rangle,\]</span> <span class="math display">\[\forall x \in S,\, \gamma \geq 0,\, \lambda.\]</span> This is the famous saddle point property for the Lagrangian of the constrained optimization problem.</p>
<h3 id="multipliers-as-derivatives-of-the-value-function">Multipliers as derivatives of the value function</h3>
<p>One can consider the following maximization problem, noted <span class="math inline">\(P(\alpha,\beta)\)</span>: <span class="math display">\[\underset{x}{\text{max}} \; f(x)\]</span> <span class="math display">\[\text{s.t.}:\]</span> <span class="math display">\[x \in S,\]</span> <span class="math display">\[h(x)=\beta,\]</span> <span class="math display">\[g(x)\leq \alpha.\]</span></p>
<p><strong>Theorem</strong>: <em>Assuming there is a solution <span class="math inline">\(x_{*}\)</span> to problem <span class="math inline">\(P\)</span> where the Slater condition is satisfied. Define <span class="math inline">\(V(\alpha,\beta)\)</span> as the value function of <span class="math inline">\(P(\alpha,\beta)\)</span>. Then, <span class="math inline">\(V(\cdot,\cdot)\)</span> is concave with values in <span class="math inline">\([-\infty,+\infty)\)</span>. The vector <span class="math inline">\((1,\gamma,\lambda)\)</span> is a multiplier associated to <span class="math inline">\(x_{*}\)</span> if and only if <span class="math inline">\((\gamma,\lambda)\)</span> is such that</em>: <span class="math display">\[V(\alpha,\beta)\leq V(0,0)+\langle\gamma,\alpha\rangle+\langle\lambda,\beta\rangle.\]</span></p>
<p><span class="math inline">\({\scriptstyle \blacksquare}\)</span></p>
<p>The vector <span class="math inline">\((\gamma,\lambda)\)</span> is called the superdifferential of the concave value function at <span class="math inline">\((0,0)\)</span>. If <span class="math inline">\(V(\cdot,\cdot)\)</span> is differentiable, <span class="math inline">\(\gamma\)</span> is the partial derivative with respect to <span class="math inline">\(\alpha\)</span> and <span class="math inline">\(\lambda\)</span> is the partial derivative with respect to <span class="math inline">\(\beta\)</span>.</p>
<h3 id="remark">Remark</h3>
<p>The most confusing aspect in the multiplier rule is perhaps the choice of the sign of the multiplier in the case of inequality constraints. In other words, how should we choose to formulate the Lagrangian? The logic is as follows. When the inequality constraint is of the form <span class="math inline">\(g(x)\leq 0\)</span> and the problem is a maximization one, the multiplier rule should be that at the optimum, increasing <span class="math inline">\(f\)</span> should require increasing <span class="math inline">\(g\)</span>. Gradients therefore have to be colinear (up to the adjustment for the equality constraints) with a positive constant of proportionality. In the expression below: <span class="math display">\[\nabla f(x)=\langle\gamma_{*},\nabla g(x)\rangle+\langle\lambda_{*},\nabla h(x)\rangle,\]</span> <span class="math inline">\(\gamma\)</span> should be positive. This pins down the form of the Lagrangian. Should the constraint be <span class="math inline">\(g(x)\geq 0\)</span>, the sign of <span class="math inline">\(\gamma\)</span> would have to be reversed.</p>
<h3 id="envelope-theorem">Envelope Theorem</h3>
<p>The penultimate section gives the derivatives of the value function with respect to the parameters of the constraint. One can understand this rule adapting an argument usually coined the envelope theorem. The envelope theorem concerns the maximization problem:</p>
<p><span class="math display">\[\underset{x}{\text{max}} \; f(x,t)\]</span> <span class="math display">\[\text{s.t.}:\]</span> <span class="math display">\[x \in S,\]</span> where <span class="math inline">\(t\)</span> is for instance a real parameter, <span class="math inline">\(S\)</span> is a convex subset of <span class="math inline">\(\mathbb{R}\)</span> (say) and <span class="math inline">\(f\)</span> is assumed continuously differentiable in both variables. Whenever this problem has an interior solution (i.e. in the interior of <span class="math inline">\(S\)</span>) <span class="math inline">\(x^{*}(t)\)</span> for <span class="math inline">\(t\)</span> in an interval <span class="math inline">\(I=]t_{0},t_{1}[\)</span>, then, the value function attached to this problem satisfies (assuming this value function is differentiable)<a href="#fn1" class="footnoteRef" id="fnref1"><sup>1</sup></a>: <span class="math display">\[V'(t)=\frac{\partial f}{\partial t}(x^{*}(t),t),\]</span> in this interval. In other words, the derivative of the value function can be computed as if the command was fixed at <span class="math inline">\(x^{*}(t)\)</span> in the marginal experiment. Indeed, we have: <span class="math display">\[\frac{\partial f}{\partial x}(x^{*}(t),t)=0,\]</span> so that this term drops out in the variation of <span class="math inline">\(f\)</span>: <span class="math display">\[dV=\frac{\partial f}{\partial x}(x^{*}(t),t)dx+\frac{\partial f}{\partial t}(x^{*}(t),t)dt.\]</span></p>
<p>The envelope theorem derives its name from the geometric situation. For each <span class="math inline">\(t\)</span>, the function <span class="math inline">\(f(\cdot,t)\)</span> corresponds to a curve <span class="math inline">\({\cal C}_{t}\)</span>. The curve corresponding to <span class="math inline">\(V(\cdot)\)</span> is the upper envelope of the <span class="math inline">\({\cal C}_{t}\)</span>’s. Now the tangent to the upper envelope at point <span class="math inline">\(t\)</span> is equal to the tangent to the supporting curve <span class="math inline">\({\cal C}_{t}\)</span> at this same point.</p>
<p>Applied to the constrained optimization context, this means that we can evaluate the change in the value function when constraints change by choosing a second best candidate to the choice of <span class="math inline">\(x\)</span>. This second best should make full use of the relaxation of the constraints however. The reasoning is sketched below.</p>
<p>Let <span class="math inline">\(x^{*}(\alpha,\beta)\)</span> be the optimal solution as a function of parameters. Consider a small change from <span class="math inline">\((0,0)\)</span> to <span class="math inline">\((\alpha,\beta)\)</span>. We can decompose the change in the value function as follows. We move the choice of <span class="math inline">\(x\)</span> from <span class="math inline">\(x^{*}(0,0)\)</span> to <span class="math inline">\(\hat{x}(\alpha,\beta)\)</span> where <span class="math inline">\(\hat{x}(\alpha,\beta)\)</span> is built to keep saturated constraints satisfied for the new parameters <span class="math inline">\((\alpha,\beta)\)</span> (I write the change in <span class="math inline">\(g\)</span> as if all inequality constraints were saturated; one should in fact keep track of the indices of saturated constraints but the argument goes through unchanged, using the slackness condition in the last step below): <span class="math display">\[\langle\nabla_{x^{*}(0,0)}g,\hat{x}(\alpha,\beta)-x^{*}(0,0)\rangle=\alpha,\]</span> <span class="math display">\[\langle\nabla_{x^{*}(0,0)}h,\hat{x}(\alpha,\beta)-x^{*}(0,0)\rangle=\beta.\]</span> We then move from <span class="math inline">\(\hat{x}(\alpha,\beta)\)</span> to <span class="math inline">\(x^{*}(\alpha,\beta)\)</span>. Both points <span class="math inline">\(\hat{x}(\alpha,\beta)\)</span> and <span class="math inline">\(x^{*}(\alpha,\beta)\)</span> satisfy the constraints <span class="math inline">\(g(x)\leq\alpha\)</span> and <span class="math inline">\(h(x)=\beta\)</span>, and given that <span class="math inline">\(x^{*}(\alpha,\beta)\)</span> is optimal under the constraint, the change in the value of <span class="math inline">\(f\)</span> along this move is negligible. The change in the value function can thus be computed as: <span class="math display">\[\langle\nabla_{x^{*}(0,0)}f,\hat{x}(\alpha,\beta)-x^{*}(0,0)\rangle.\]</span> Using the multiplier rule to replace <span class="math inline">\(\nabla_{x^{*}(0,0)}f\)</span> by <span class="math inline">\(\langle\gamma_{*},\nabla g(x)\rangle+\langle\lambda_{*},\nabla h(x)\rangle\)</span>, this leads to (after some easy calculations): <span class="math display">\[\langle\nabla_{x^{*}(0,0)}f,\hat{x}(\alpha,\beta)-x^{*}(0,0)\rangle=\langle\gamma,\alpha\rangle+\langle\lambda,\beta\rangle.\]</span></p>
<section class="footnotes">
<hr />
<ol>
<li id="fn1"><p>For a rigorous discussion of envelope theorems, you might want to check Milgrom-Segal, 2002, ‘Envelope Theorems for Arbitrary Choice Sets’, <em>Econometrica</em> 70 (2):583-601.<a href="#fnref1">↩</a></p></li>
</ol>
</section>
Fri, 16 Dec 2016 00:00:00 +0100
https://www.investmentmath.com/ensae/2016/12/16/optimization.html
https://www.investmentmath.com/ensae/2016/12/16/optimization.htmlSolution of the Exam (2016)<p><em>This is the solution of the exam for the 2016 ensae course.</em></p>
<hr />
<h2 id="exercise-1">Exercise 1</h2>
<ol type="1">
<li><p>The program is: <span class="math display">\[\underset{\pi}{\text{min}} \; \pi' \Sigma \pi.\]</span> <span class="math display">\[\text{s.t.}:\]</span> <span class="math display">\[\pi'(\mu-re)=\mu_{p}-r.\]</span> Lagrangian: <span class="math display">\[\pi' \Sigma \pi-\gamma_{\mu_{p}-r}\pi'(\mu-re),\]</span> which leads to the system (first order condition, constraint): <span class="math display">\[\Sigma \pi=\gamma_{\mu_{p}-r}(\mu-re),\]</span> <span class="math display">\[\pi'(\mu-re)=\mu_{p}-r.\]</span> Solution: <span class="math display">\[\gamma_{\mu_{p}-r}=\frac{\mu_{p}-r}{(\mu-re)'\Sigma^{-1}(\mu-re)},\]</span> <span class="math display">\[\pi_{\mu_{p}-r}=\frac{\mu_{p}-r}{(\mu-re)'\Sigma^{-1}(\mu-re)}\Sigma^{-1}(\mu-re).\]</span> The shape of the efficient frontier is linear.</p></li>
<li><p>We must have: <span class="math display">\[\mu^{*}-r=\frac{(\mu-re)'\Sigma^{-1}(\mu-re)}{e'\Sigma^{-1}(\mu-re)}.\]</span></p></li>
<li><p>It is the efficient frontier of portfolios invested on risky assets only (no cash).</p></li>
<li><p>Adding an asset to the investment universe improves possibilities. The efficient frontier attached to a narrower universe is thus necessarily below that of the full universe. In our case, the risky asset efficient frontier is below the full efficient frontier. Both frontiers meet at <span class="math inline">\(\pi^{*}\)</span>. They are tangent to each other at <span class="math inline">\(\pi^{*}\)</span>.</p></li>
<li><p>This follows from the formula for <span class="math inline">\(\mu^{*}-r\)</span>, that of <span class="math inline">\(\pi_{\mu_{p}-r}\)</span> and that of <span class="math inline">\(\gamma_{\mu_{p}-r}\)</span>.</p></li>
<li><p><span class="math inline">\(\Sigma\pi_{\mu_{p}-r}\)</span> is a vector where component <span class="math inline">\(i\)</span> measures the covariance of asset <span class="math inline">\(i\)</span> with the return of portfolio <span class="math inline">\(p\)</span>. It is by construction the derivative of portfolio with respect to a change in position. Therefore, the marginal change in risk brought up by a change in position <span class="math inline">\(\pi_{\mu_{p}-r,i}\)</span> is the covariance of the corresponding return with the portfolio return. The first order condition says that at the optimum, these marginal changes in risk must be proportional to the excess returns. Covariances need to be proportional to excess returns. The gradient of the risk function must be orthogonal to the level sets induced by the constraint.</p></li>
<li><p>We have: <span class="math display">\[\Sigma\pi=\frac{\mu_{p}-r}{\mu^{*}-r}\frac{\mu^{*}-r}{(\mu-re)'\Sigma^{-1}(\mu-re)}(\mu-re),\]</span> and this translates into (using question 5.): <span class="math display">\[\Sigma\pi^{*}=\frac{\mu^{*}-r}{(\mu-re)'\Sigma^{-1}(\mu-re)}(\mu-re).\]</span> All first order conditions (i.e. for all excess return targets) boil down to the same one, which is the one of the tangent portfolio. Indeed, all investors apply the same trade-off.</p></li>
<li><p>We have: <span class="math display">\[\Sigma\pi^{*}=\frac{\mu^{*}-r}{(\mu-re)'\Sigma^{-1}(\mu-re)}(\mu-re),\]</span> and as a result: <span class="math display">\[\sigma^{*2}=\pi^{*'}\Sigma\pi^{*}=\frac{\mu^{*}-r}{(\mu-re)'\Sigma^{-1}(\mu-re)}(\mu^{*}-r).\]</span> Combining the two relationships we get: <span class="math display">\[\frac{\Sigma\pi^{*}}{\sigma^{2*}}(\mu^{*}-r)=(\mu-r),\]</span> i.e.: <span class="math display">\[\beta(\tilde{r}_{i},\tilde{r}^{*})(\mu^{*}-r)=(\mu-r).\]</span> Beta is the coefficient of the regression of <span class="math inline">\(\tilde{r}_{i}\)</span> on <span class="math inline">\(\tilde{r}^{*}\)</span>. This relationship says that all expected excess returns of the asset are proportional to their beta with the market. In the excess return/beta space, all assets are on a line that goes through the origin.</p></li>
<li><p>If all investors share the same beliefs and only differ in their risk aversion parameters (within the above quadratic family of utility functions), they will all hold the tangent portfolio as their risky asset holding (although the proportion invested in the tangent portfolio will be different from one investor to the next). The aggregated risky asset portfolio is equal to the overall market and it must be the tangent portfolio. As a result, the beta relationship holds with the tangent portfolio being replaced by the market portfolio. This is the capm.</p></li>
</ol>
<h2 id="exercise-2">Exercise 2</h2>
<ol type="1">
<li><p>The program is <span class="math display">\[\underset{\pi}{\text{min}} \; \pi' \Sigma \pi.\]</span> <span class="math display">\[\text{s.t.}:\]</span> <span class="math display">\[\pi'e=1.\]</span> Lagrangian: <span class="math display">\[\pi' \Sigma \pi-\gamma \pi'e,\]</span> which leads to the system (first order condition, constraint): <span class="math display">\[\Sigma \pi=\gamma e,\]</span> <span class="math display">\[\pi'e=1\]</span> Solution: <span class="math display">\[\gamma=\frac{1}{e'\Sigma^{-1} e},\,\pi^{mv}=\frac{1}{e'\Sigma^{-1} e}\Sigma^{-1}e\,\]</span> <span class="math display">\[\pi^{mv}_{i}=\frac{\sigma_{i}^{-2}}{\sum_{i}^{n}\sigma_{i}^{-2}}.\]</span></p></li>
<li><p>The vector of sensitivities has components: <span class="math display">\[s^{mv}_{i}=\frac{\sigma_{i}^{-1}}{\sum_{i}^{n}\sigma_{i}^{-2}}.\]</span></p></li>
<li><p>For the profile of sensitivities to be flat, positions have to be proportional to <span class="math inline">\(1/\sigma_{i}\)</span>. The full investment constraint then leads to:<span class="math display">\[\pi^{ew}_{i}=\frac{\sigma_{i}^{-1}}{\sum_{i}^{n}\sigma_{i}^{-1}}.\]</span></p></li>
<li><p>Both portfolios are equal when all variances are equal.</p></li>
<li><p>We remember (see the previous exercise for instance) that: <span class="math display">\[\pi_{\mu_{p}-r}=\frac{\mu_{p}-r}{(\mu-re)'\Sigma^{-1}(\mu-re)}\Sigma^{-1}(\mu-re).\]</span> This vector is proportional to the vector with components <span class="math inline">\(\sigma_{i}^{-1}\)</span> (use the diagonal structure of the covariance matrix and that of the returns). The sensitivity profile of <span class="math inline">\(\pi_{\mu_{p}-r}\)</span> is thus constant.</p></li>
<li><p>The first order condition is, componentwise: <span class="math display">\[\sum_{j\neq i}\rho\sigma_{j}\sigma_{i}\pi_{j}+\sigma_{i}^{2}\pi_{i}=\gamma\lambda\sigma_{i}.\]</span> One can write this as: <span class="math display">\[\sum_{j}\rho\sigma_{j}\sigma_{i}\pi_{j}+(1-\rho)\sigma_{i}^{2}\pi_{i}=\gamma\lambda\sigma_{i},\]</span> which leads to (<span class="math inline">\(\sigma_{i}>0\)</span>): <span class="math display">\[\sum_{j}\rho\sigma_{j}\pi_{j}+(1-\rho)\sigma_{i}\pi_{i}=\gamma\lambda,\]</span> since and we can deduce that <span class="math inline">\(\sigma_{i}\pi_{i}\)</span> is necessarily constant since <span class="math inline">\(\sum_{j}\rho\sigma_{j}\pi_{j}\)</span> is itself constant. As a result, position <span class="math inline">\(\pi_{i}\)</span> has to be inversely related to <span class="math inline">\(\sigma_{i}\)</span>. The sensitivity profile is as in 5..</p></li>
<li><p>We have: <span class="math display">\[\sigma_{p}^{2}(\pi)=\pi'\Sigma\pi,\]</span> and thus: <span class="math display">\[\frac{\partial \sigma_{p}}{\partial \pi_{i}}=\frac{1}{\sigma_{p}}(\Sigma\pi)_{i}.\]</span> Since: <span class="math display">\[\Sigma\pi=\gamma(\mu-re),\]</span> we have: <span class="math display">\[\frac{\partial \sigma_{p}}{\partial \pi_{i}}=\frac{1}{\sigma_{p}}\gamma (\mu_{i}-r).\]</span></p></li>
<li><p>The function <span class="math inline">\(\sigma_{p}(\pi)\)</span> is homogenous of degree one, and therefore satisfies: <span class="math display">\[\sum_{i=1}^{N}\pi_{i}\frac{\partial \sigma_{p}}{\partial \pi_{i}}=\sigma_{p}.\]</span></p></li>
<li><p>In the context of question 6. we have: <span class="math display">\[\pi_{i}\propto\frac{1}{\sigma_{i}},\]</span> and thus: <span class="math display">\[\pi_{i}\frac{\partial \sigma_{p}}{\partial \pi_{i}}\propto\frac{1}{\sigma_{i}}\frac{1}{\sigma_{p}}\gamma (\mu_{i}-r)\propto\frac{1}{\sigma_{i}} (\mu_{i}-r)=\text{constant}.\]</span> Thus total contributions to risk are equalized.</p></li>
<li><p>Mean-variance efficiency with cash naturally leads to diversified portfolios, in the sense of equally weighting sources of risk. Portfolio constraint such as the long only constraint might threaten diversification. This happens because of conflicts between objectives. Equalizing risk contributions looks like a very ad-hoc way of forcing diversification in portfolios.</p></li>
</ol>
<h2 id="exercise-3">Exercise 3</h2>
<ol type="1">
<li><p>The diffusions: <span class="math display">\[\frac{dP_{i,t}}{P_{i,t}}=d\log(P_{i,t})+\frac{1}{2}\xi_{i,t}^{2}dt,\]</span> <span class="math display">\[\frac{dV_{\pi,t}}{V_{\pi,t}}=d\log(V_{\pi,t})+\frac{1}{2}\xi_{\pi,t}^{2}dt,\]</span> and drifts are: <span class="math display">\[r_{i,t}=\gamma_{i,t}+\frac{1}{2}\xi_{i,t}^{2},\]</span> <span class="math display">\[r_{\pi,t}=\gamma_{\pi,t}+\frac{1}{2}\xi_{\pi,t}^{2},\]</span></p></li>
<li><p>We have: <span class="math display">\[\frac{dV_{\pi,t}}{V_{\pi,t}}=\sum_{i=1}^{N}\pi_{i,t}\frac{dP_{i,t}}{P_{i,t}},\]</span> from which we get: <span class="math display">\[d\log(V_{\pi,t})=\sum_{i=1}^{N}\pi_{i,t}d\log(P_{i,t})+\gamma^{*}_{\pi,t},\]</span> with: <span class="math display">\[\gamma^{*}_{\pi,t}=\frac{1}{2}\left(\sum_{i=1}^{N}\pi_{i,t}\xi_{i,t}^{2}-\xi_{\pi,t}^{2}\right).\]</span></p></li>
<li><p>Subtract: <span class="math display">\[V_{\eta,t}=\sum_{i=1}^{N}\pi_{i,t}V_{\eta,t},\]</span> from the previous equation.</p></li>
<li><p>Apply the previous result with <span class="math inline">\(\eta=\pi\)</span>.</p></li>
<li><p>On can write: <span class="math display">\[\gamma^{*}_{\pi,t}=-\sum_{i=1}^{N}\pi_{i,t}\frac{d(P_{i,t}/V_{\pi,t})}{P_{i,t}/V_{\pi,t}}+\frac{1}{2}\sum_{i=1}^{N}\pi_{i}d[\log(P_{i,.}/V_{\pi,.})]_{t}.\]</span> Now, consider the portfolio return identity: <span class="math display">\[\frac{dV_{\pi,t}}{V_{\pi,t}}=\sum_{i=1}^{N}\pi_{i,t}\frac{dP_{i,t}}{P_{i,t}}.\]</span> One can rewrite it against any numeraire. In particular, we can choose <span class="math inline">\(V_{\pi}\)</span> as the numeraire. It then reads: <span class="math display">\[\frac{d(V_{\pi,t}/V_{\pi,t})}{V_{\pi,t}/V_{\pi,t}}=0=\sum_{i=1}^{N}\pi_{i,t}\frac{d(P_{i,t}/V_{\pi,t})}{P_{i,t}/V_{\pi,t}}.\]</span> We thus obtain: <span class="math display">\[\gamma^{*}_{\pi,t}=\frac{1}{2}\sum_{i=1}^{N}\pi_{i}d[\log(P_{i,.}/V_{\pi,.})]_{t}\geq 0,\]</span> with strict inequality if any of the <span class="math inline">\(\log(P_{i,.}/V_{\pi,.})\)</span> is non deterministic.</p></li>
<li><p>Apply 3. with <span class="math inline">\(\eta=\mu\)</span> and then use <span class="math inline">\(\mu_{i,t}=P_{i,t}/V_{\pi,t}\)</span>.</p></li>
<li><p>The log function is strictly concave (<span class="math inline">\(0\leq \lambda \leq 1,\, a>0,\, b>0\)</span>): <span class="math display">\[\log(\lambda a+(1-\lambda)b)\ge \lambda\log(a)+(1-\lambda)\log(b),\]</span> with equality if and only if <span class="math inline">\(a=b\)</span>, <span class="math inline">\(\lambda=0\)</span> or <span class="math inline">\(\lambda=1\)</span>. Taking two vectors <span class="math inline">\(x\)</span> and <span class="math inline">\(y\)</span> in the simplex and mixing them using <span class="math inline">\(\lambda\)</span>, and applying the above inequality, we get: <span class="math display">\[S(\lambda x+(1-\lambda)y)\geq \lambda S(x)+(1-\lambda)S(y),\]</span> i.e. <span class="math inline">\(S(\cdot)\)</span> is (strictly) concave. The first order condition characterizes the maximum of a concave function. One can verify that the gradient of <span class="math inline">\(S(\cdot)\)</span> is zero for <span class="math inline">\(x=(1/N,\ldots,1/N)\)</span>. Limiting behavior towards the edges of the simplex is trivial.</p></li>
<li><p>Under the assumption of the question, relative performance of <span class="math inline">\(\pi\)</span> versus the market portfolio is driven by changes in <span class="math inline">\(S\)</span>. Starting from <span class="math inline">\(x=(1/N,\ldots,1/N)\)</span>, <span class="math inline">\(S\)</span> can only decrease, so that portfolio <span class="math inline">\(\pi\)</span> cannot beat the market portfolio.</p></li>
<li><p>We have: <span class="math display">\[\log(V_{\pi,t}/V_{\mu,t})-\log(V_{\pi,t}/V_{\mu,t})=S(\mu_{t})-S(\mu_{0})+\int_{0}^{t}\gamma^{*}_{\pi,u}du,\]</span> so that: <span class="math display">\[\log(V_{\pi,t}/V_{\mu,t})-\log(V_{\pi,t}/V_{\mu,t})\geq B-\text{max}(S)+\varepsilon t.\]</span> Since the function <span class="math inline">\(S(\cdot)\)</span> is bounded above, we can conclude that portfolio <span class="math inline">\(\pi\)</span> will end up beating the market portfolio after a sufficiently long time: <span class="math display">\[t\geq \frac{\text{max}-B}{\varepsilon}.\]</span></p></li>
</ol>
Thu, 15 Dec 2016 00:00:00 +0100
https://www.investmentmath.com/ensae/2016/12/15/solexam.html
https://www.investmentmath.com/ensae/2016/12/15/solexam.htmlExam (2016)<p><em>This is the exam for the 2016 ensae course.</em></p>
<hr />
<h2 id="exercise-1">Exercise 1</h2>
<p>We are in a static investment setup. The investment universe is made of cash (asset with index <span class="math inline">\(0\)</span>) earning a riskless rate <span class="math inline">\(r\)</span> and <span class="math inline">\(N\)</span> risky assets with rates of return <span class="math inline">\((\tilde{r}_{i})_{i=1,\ldots,N}\)</span>. The vector of risky asset risky is denoted <span class="math inline">\(\tilde{\pmb{r}}\)</span> (size <span class="math inline">\((N,1)\)</span>). Its mean is <span class="math inline">\(\pmb{\mu}\)</span> and its variance <span class="math inline">\(\Sigma\)</span> is assumed to be positive definite (and therefore invertible).</p>
<p>A portfolio is a vector of proportions. The proportion invested on cash is <span class="math inline">\(\pi_{0}\)</span> and the vector of risky asset positions is <span class="math inline">\(\pmb{\pi}\)</span> (size <span class="math inline">\((N,1)\)</span>). The vector of size <span class="math inline">\((N,1)\)</span> with all components equal to one is denoted <span class="math inline">\(\pmb{e}\)</span>. A portfolio therefore satisfies: <span class="math display">\[\pi_{0}+\pmb{e}'\pmb{\pi}=1.\]</span> We will assume <span class="math inline">\(\pmb{e}'\Sigma^{-1}(\pmb{\mu}-r\pmb{e})>0\)</span>.</p>
<ol type="1">
<li><p>Given an excess return target <span class="math inline">\(\mu_{p}-r>0\)</span>, find the risky portfolio <span class="math inline">\(\pmb{\pi}_{\mu_{p}-r}\)</span> with minimum variance amongst portfolios that achieve the return target <span class="math inline">\(\mu_{p}-r>0\)</span>. Let <span class="math inline">\(\gamma_{\mu_{p}-r}\)</span> be the lagrange multiplier in the optimization problem. Changing <span class="math inline">\(\mu_{\mu_{p}-r}\)</span> and therefore <span class="math inline">\(\gamma_{\mu_{p}-r}\)</span> allows to map the efficient frontier of the complete problem (cash plus risky asset). What is the geometrical shape of this curve in the (x=standard deviation,y=excess-return) space?</p></li>
<li><p>Show that for a certain value of <span class="math inline">\(\mu_{p}\)</span>, say <span class="math inline">\(\mu^{*}\)</span>, the optimal risky asset portfolio <span class="math inline">\(\pmb{\pi}^{*}\)</span> is fully invested, i.e. <span class="math inline">\(\pmb{e}'\pmb{\pi}^{*}=1\)</span>.</p></li>
<li><p>What is the definition of the risky assets efficient frontier?</p></li>
<li><p>Why is the risky assets efficient frontier always below the efficient frontier of the complete problem? Describe the overall geometric situation, including the relative position of the different curves at <span class="math inline">\(\pmb{\pi}^{*}\)</span>.</p></li>
<li><p>Show that: <span class="math display">\[\pmb{\pi}_{\mu_{p}-r}=\frac{\mu_{p}-r}{\mu^{*}-r}\pmb{\pi}^{*}.\]</span></p></li>
<li><p>What is the interpretation of the quantity <span class="math inline">\(\Sigma\pmb{\pi}_{\mu_{p}-r}\)</span>? Consider the first order condition satisfied by the Lagrangian at the optimum of the problem described in question <span class="math inline">\(1\)</span>. What is its marginalist interpretation?</p></li>
<li><p>Using the proportionality condition established in question <span class="math inline">\(5\)</span>, show that the first order condition for an investor with excess return target <span class="math inline">\(\mu_{p}-r>0\)</span> is in fact equivalent to that of an investor with excess return target <span class="math inline">\(\mu^{*}-r\)</span>. As a consequence, all investors actually apply the same trade-off?</p></li>
<li><p>Show that: <span class="math display">\[\mu_{i}-r=\beta(\tilde{r}_{i},\tilde{r}^{*})(\mu^{*}-r),\]</span> with <span class="math inline">\(\tilde{r}^{*}=\pmb{\pi}^{*\prime}\tilde{\pmb{r}}\)</span>. Give the explicit value of <span class="math inline">\(\beta(\tilde{r}_{i},\tilde{r}^{*})\)</span> as well as its interpretation.</p></li>
<li><p>Suppose the economy is composed of mean-variance investors who share the same return and risk expectations but have different levels of risk aversion. The risky asset supply is assumed exogenous. It must be held by the set of investors. The overall portfolio is called the market portfolio. Using the above results, explain how the excess return of individual assets relate to the excess return of the market portfolio.</p></li>
</ol>
<h2 id="exercice-2">Exercice 2</h2>
<p>The setup is that of the previous exercise. Assumptions on risk and expected returns are specialized further. Tildas are used to denote random variables.</p>
<p>Assume the risky asset returns satisfy: <span class="math display">\[\tilde{r}_{i}=\mu_{i}+\sigma_{i}\tilde{\epsilon}_{i},\]</span> where <span class="math inline">\((\tilde{\epsilon}_{i})_{i=1,\ldots,N}\)</span> are i.i.d., with zero mean and variance equal to <span class="math inline">\(1\)</span>. As usual, the cash return is denoted <span class="math inline">\(r\)</span>.</p>
<p>Within questions <span class="math inline">\(1\)</span> to <span class="math inline">\(4\)</span>, portfolios are assumed to be fully invested on risky assets (i.e. <span class="math inline">\(\pmb{e}'\pmb{\pi}=1\)</span>).</p>
<ol type="1">
<li><p>Determine the vector of weights <span class="math inline">\(\pmb{\pi}^{mv}\)</span> of the minimum variance portfolio.</p></li>
<li><p>For a given portfolio <span class="math inline">\(\pmb{\pi}\)</span>, the profile of sensivities to risk is the vector of formal derrivatives of <span class="math inline">\(\pmb{\pi}'\tilde{\pmb{r}}\)</span> with respect to <span class="math inline">\((\tilde{\epsilon}_{i})_{i=1,\ldots,N}\)</span>. Compute the profile of sensitivities of <span class="math inline">\(\pmb{\pi}^{mv}\)</span>.</p></li>
<li><p>A portfolio is more diversified if its sensitivity profile constant. I note <span class="math inline">\(\pmb{\pi}^{ew}\)</span> the portfolio with a constant sensitivity profile. Compute <span class="math inline">\(\pmb{\pi}^{ew}\)</span> and give its variance.</p></li>
<li><p>Under what condition do we have <span class="math inline">\(\pmb{\pi}^{mv}=\pmb{\pi}^{ew}\)</span>? Why is <span class="math inline">\(\pmb{\pi}^{mv}\)</span> usually underdiversified?</p></li>
</ol>
<p>I now consider portfolios that are invested on all assets, i.e. including cash (<span class="math inline">\(\pi_{0}+\pmb{e}'\pmb{\pi}=1\)</span>). In this context, risk can be reduced witout limit by reducing the weight of risky assets (<span class="math inline">\(\pmb{e}'\pmb{\pi}\)</span>).</p>
<ol start="5" type="1">
<li>Assuming <span class="math inline">\(\mu_{i}-r=\lambda \sigma_{i}>0\)</span> (the risk structure is unchanged), find the efficient portfolio with target excess return <span class="math inline">\(\mu_{p}-r>0\)</span>. Give its sensitivity profile and comment.</li>
</ol>
<p>We now consider a more general condition where <span class="math inline">\(\text{Cov}(\tilde{r}_{i},\tilde{r}_{j})=\rho \sigma_{i}\sigma_{j},\; i\neq j\)</span> with <span class="math inline">\(\rho\)</span> neither <span class="math inline">\(0\)</span> nor <span class="math inline">\(1\)</span> (homogenous correlations). The assumption <span class="math inline">\(\mu_{i}-r=\lambda \sigma_{i}>0\)</span> is maintained.</p>
<ol start="6" type="1">
<li>Find the efficient portfolio with target excess return <span class="math inline">\(\mu_{p}-r>0\)</span>. Give its sensitivity profile and comment. Compare with question 5.</li>
</ol>
<p>For a given portfolio <span class="math inline">\(\pi\)</span>, I note <span class="math inline">\(\sigma_{p}(\pi)\)</span> its standard deviation. The derivative <span class="math inline">\(\partial{\sigma_{p}}/\partial \pi_{i}\)</span> is called the marginal contribution to risk of position <span class="math inline">\(\pi_{i}\)</span>. The total contribution to risk of position <span class="math inline">\(\pi_{i}\)</span> is defined as <span class="math inline">\(\pi_{i}\partial{\sigma_{p}}/\partial \pi_{i}\)</span>.</p>
<ol start="7" type="1">
<li><p>In the context of mean-variance optimization (with cash and risky assets) and a target excess return, what relation is satisfied by the marginal contribution to risk (use the first order condition).</p></li>
<li><p>Show that the total contributions to risk sum to the standard error: <span class="math display">\[\sum_{i=1}^{N}\pi_{i}\frac{\partial{\sigma_{p}}}{\partial \pi_{i}}=\sigma_{p}.\]</span></p></li>
<li><p>Show that in the context of question <span class="math inline">\(6\)</span>, total contributions to risk are equal.</p></li>
<li><p>Some people propose to build portfolios by equalizing total contributions to risk. What do you think of this principle? Is this a credible diversification principle?</p></li>
</ol>
<h2 id="exercice-3">Exercice 3</h2>
<p>We have a multivariate Brownian motion <span class="math inline">\((B_{t})_{t \in \mathbb{R}_{+}}\)</span> of size <span class="math inline">\(N\)</span>. Its covariance matrix is the identity.</p>
<p>There are <span class="math inline">\(N\)</span> risky assets with dynamics given by (for <span class="math inline">\(i=1,\ldots,N\)</span>): <span class="math display">\[d\log(P_{i,t})=\gamma_{i,t}dt+\xi_{i,t}dB_{t},\]</span> where <span class="math inline">\(\xi_{i,t}\)</span> is of size <span class="math inline">\((1,N)\)</span>. The covariance matrix of the risky assets is assumed invertible.</p>
<p>All portfolios are assumed fully invested on risky assets, with all weights strictly positive. It is given by a set of weights <span class="math inline">\(\pi_{t}=(\pi_{i,t})_{i=1,\ldots,N}\)</span>. The value process is <span class="math inline">\(V_{\pi,t}\)</span>. Its dynamics is: <span class="math display">\[d\log(V_{\pi,t})=\gamma_{\pi,t}dt+\xi_{\pi,t}dB_{t}.\]</span></p>
<p>The market is composed of one unit of each asset <span class="math inline">\(i\)</span>. The total value of the market is thus: <span class="math display">\[V_{\mu,t}=\sum_{i=1}^{N}P_{i,t}.\]</span> It is the value of a portfolio characterized by weights <span class="math inline">\(\mu_{t}=(\mu_{i,t})_{i=1,\ldots,N}\)</span> with <span class="math inline">\(\mu_{i,t}=P_{i,t}/V_{\mu,t}\)</span>. We will assume that all these weights are strictly positive for almost all price trajectories (i.e. don’t shy away from dividing by the weights).</p>
<ol type="1">
<li><p>Give the diffusions followed by <span class="math inline">\(dP_{i,t}/P_{i,t}\)</span> and <span class="math inline">\(dV_{\pi,t}/V_{\pi,t}\)</span>. Their respective drifts will be noted <span class="math inline">\(r_{i,t}\)</span> et <span class="math inline">\(r_{\pi,t}\)</span>.</p></li>
<li><p>Show that: <span class="math display">\[d\log(V_{\pi,t})=\sum_{i=1}^{N}\pi_{i,t}d\log(P_{i,t})+\gamma^{*}_{\pi,t}dt,\]</span> and give the expression for <span class="math inline">\(\gamma^{*}_{\pi,t}\)</span>.</p></li>
<li><p>Suppose we have another portfolio <span class="math inline">\(\eta_{t}=(\eta_{i,t})_{i=1,\ldots,N}\)</span>, with value <span class="math inline">\(V_{\eta,t}\)</span>, show that: <span class="math display">\[d\log(V_{\pi,t}/V_{\eta,t})=\sum_{i=1}^{N}\pi_{i,t}d\log(P_{i,t}/V_{\eta,t})+\gamma^{*}_{\pi,t}dt.\]</span></p></li>
<li><p>Show that: <span class="math display">\[\gamma^{*}_{\pi,t}dt=-\sum_{i=1}^{N}\pi_{i,t}d\log(P_{i,t}/V_{\pi,t}).\]</span></p></li>
<li><p>Show that: <span class="math display">\[\gamma^{*}_{\pi,t}dt \geq 0.\]</span></p></li>
<li><p>Show that: <span class="math display">\[d\log(V_{\pi,t}/V_{\mu,t})=\sum_{i=1}^{N}\pi_{i,t}d\log(\mu_{i,t})+\gamma^{*}_{\pi,t}dt.\]</span></p></li>
<li><p>We now choose for <span class="math inline">\(\pi\)</span> the equally weighted portfolio <span class="math inline">\(\pi_{i,t}=1/N\)</span>.Given a vector <span class="math inline">\(x=(x_{i})_{i=1,\ldots,N}\)</span> with strictly positive components, I note: <span class="math display">\[S(x)=\frac{1}{N}\sum_{i=1}^{N}\log(x_{i}).\]</span> Show that <span class="math inline">\(S(\cdot)\)</span> is concave, has a maximum is <span class="math inline">\(\pi\)</span>, and tends to <span class="math inline">\(-\infty\)</span> towards the edges of the simplex (<span class="math inline">\(\{x \in \mathbb{R}^{N}_{+}|\forall i, x_{i}>0,\sum_{i=1}^{N}x_{i}=1\}\)</span>).</p></li>
<li><p>Supposing <span class="math inline">\(\int_{0}^{t}\gamma^{*}_{\pi,u}du\)</span> is negligible, comment on the performance of <span class="math inline">\(\pi\)</span> relative to <span class="math inline">\(\mu\)</span> as a fonction of the evolution of <span class="math inline">\(S(\cdot)\)</span> between <span class="math inline">\(0\)</span> et <span class="math inline">\(t\)</span>. If portfolio <span class="math inline">\(\mu\)</span> is equally weighted at date <span class="math inline">\(0\)</span>, can portfolio <span class="math inline">\(\pi\)</span> outperform the market portfolio?</p></li>
<li><p>Assuming that we can ensure that <span class="math inline">\(S(\mu_{t}) \geq B\)</span> (<span class="math inline">\(B\)</span> est une constante) and <span class="math inline">\(\gamma^{*}_{\pi,t}\geq \epsilon >0\)</span> on almost all price trajectories, show that the equally weighted portfolio outperforms the market portfolio almost surely in finite time.</p></li>
</ol>
Tue, 29 Nov 2016 00:00:00 +0100
https://www.investmentmath.com/ensae/2016/11/29/exam.html
https://www.investmentmath.com/ensae/2016/11/29/exam.htmlSolutions to Exercises<p><em>This post collects the solutions to <a href="/ensae/2015/10/15/exercises.html">the exercises</a> of the ENSAE course.</em></p>
<hr />
<h2 id="mean-variance">Mean-Variance</h2>
<h3 id="exercise-1.1">Exercise 1.1</h3>
<ul>
<li>If you find the following difficult, solve the problem in the context of a single risky asset.</li>
</ul>
<ol type="1">
<li></li>
</ol>
<ul>
<li><p><span class="math inline">\({\cal I}=\{1,2,\ldots,N\}\)</span> (no riskless asset).</p></li>
<li><p><span class="math inline">\(\pmb{\pi}=(\pi_{i})_{i \in \cal{I}}'\)</span> <span class="math display">\[\underset{\pmb{\pi}}{\text{max}} \; E[-\exp(-\alpha \tilde{w})]\]</span> <span class="math display">\[\text{s.t.}:\]</span> <span class="math display">\[\tilde{w}=w_{0}\sum_{i \in \cal{I}}\pi_{i}\tilde{R}_{i}\]</span> <span class="math display">\[\sum_{i \in \cal{I}}\pi_{i}=1,\]</span> with <span class="math inline">\(\alpha>0\)</span>.</p></li>
<li><p>We have: <span class="math inline">\(E[-\exp(-\alpha\tilde{w})] =\; -\exp(-\alpha E[\tilde{w}]+(\alpha^{2}/2)V[\tilde{w}]).\)</span> We can thus maximize <span class="math inline">\(E[\tilde{w}]-(\alpha/2)V[\tilde{w}]\)</span>.</p></li>
<li><p>This function is decreasing in wealth when wealth is large. The investor therefore does not benefit of being wealthier beyond a certain point.</p></li>
<li><p>The criterion can be written: <span class="math display">\[w_{0}\pmb{\pi}'\pmb{\mu}-(\alpha/2)w_{0}^{2}\pmb{\pi}'\Sigma\pmb{\pi},\]</span> where <span class="math inline">\(\pmb{\mu}\)</span> is the expected return vector and <span class="math inline">\(\Sigma\)</span> is the covariance matrix.</p></li>
<li><p>Assuming as usual that <span class="math inline">\(\Sigma\)</span> is positive definite and the criterion is strictly concave.</p></li>
<li><p>In the absence of a budget constraint, we can choose <span class="math inline">\(w_{0}=1\)</span> and leave the vector of weights unconstrained. The first order condition characterizes the solution. It is: <span class="math display">\[\pmb{\mu}=\alpha \Sigma \pmb{\pi},\]</span> <span class="math display">\[\pmb{\pi}=\frac{1}{\alpha}\Sigma^{-1}\pmb{\mu}.\]</span></p></li>
<li><p>The total wealth needed to reach the optimum is: <span class="math display">\[\pmb{e}'\pmb{\pi}=\frac{1}{\alpha}\pmb{e}'\Sigma^{-1}\pmb{\mu}.\]</span> Any additional wealth is useless.</p></li>
</ul>
<ol start="2" type="1">
<li></li>
</ol>
<ul>
<li><p>We now start from an initial wealth level <span class="math inline">\(w_{0}>0\)</span> and impose that the vector of weights sum to <span class="math inline">\(1\)</span>. <span class="math display">\[\underset{\pmb{\pi}}{\text{max}} \; \pmb{\pi}'\pmb{\mu}-(\alpha/2)w_{0}\pmb{\pi}'\Sigma\pmb{\pi}\]</span> <span class="math display">\[\text{s.t.}:\]</span> <span class="math display">\[\pmb{e}'\pmb{\pi}=1.\]</span></p></li>
<li><p>The lagrangian can be written: <span class="math display">\[\pmb{\pi}'\pmb{\mu}-(\alpha/2)w_{0}\pmb{\pi}'\Sigma\pmb{\pi}-\lambda(\pmb{\pi}'\pmb{e}-1),\]</span> and the first order condition: <span class="math display">\[\pmb{\mu}-\alpha w_{0}\Sigma\pmb{\pi}-\lambda\pmb{e}=0,\]</span></p></li>
<li><p>The langrangian multiplier is given by (multiply the first order condition on the right by <span class="math inline">\(\pmb{\pi}'\)</span>): <span class="math display">\[\lambda=\pmb{\pi}'\pmb{\mu}-\alpha w_{0}\pmb{\pi}'\Sigma\pmb{\pi}.\]</span></p></li>
<li><p>The solution splits as follows: <span class="math display">\[w_{0}\pmb{\pi}=\frac{1}{\alpha}\Sigma^{-1}\pmb{\mu}-\frac{\lambda}{\alpha}\Sigma^{-1}\pmb{e}.\]</span> The first term corresponds to the optimal unconstrained solution of question <span class="math inline">\(1\)</span>. The second term ensures that what the whole wealth is invested.</p></li>
</ul>
<ol start="3" type="1">
<li></li>
</ol>
<ul>
<li><p>We have: <span class="math display">\[w_{0}=\frac{1}{\alpha}\pmb{e}'\Sigma^{-1}\pmb{\mu}-\frac{\lambda}{\alpha}\pmb{e}'\Sigma^{-1}\pmb{e}.\]</span></p></li>
<li><p>For <span class="math inline">\(\lambda>0\)</span>, <span class="math inline">\(w_{0}\)</span> is below the optimal wealth level of question <span class="math inline">\(1\)</span>. For <span class="math inline">\(\lambda<0\)</span>, <span class="math inline">\(w_{0}\)</span> is above the optimal wealth level of question <span class="math inline">\(1\)</span>. Since the budget constraint prevents from throwing money away, too much is invested when <span class="math inline">\(\lambda<0\)</span>.</p></li>
<li><p>We know that the utility outcome is measured by: <span class="math display">\[w_{0}\pmb{\pi}'\pmb{\mu}-(\alpha/2)w_{0}^{2}\pmb{\pi}'\Sigma\pmb{\pi}.\]</span> An infinitesimal increase in wealth has an inmpact on utility measured through (using the envelope theorem - one can neglect the infinitesimal change in the optimal portfolio as we change wealth infinitesimally - differentiate with respect to <span class="math inline">\(w_{0}\)</span>): <span class="math display">\[\pmb{\pi}'\pmb{\mu}-\alpha w_{0}\pmb{\pi}'\Sigma\pmb{\pi},\]</span> which is just <span class="math inline">\(\lambda\)</span>. Therefore when <span class="math inline">\(\lambda<0\)</span> indeed, the marginal utility of wealth is negative. This is due to the fact that the utility function decreases beyond a certain level of wealth.</p></li>
</ul>
<ol start="4" type="1">
<li></li>
</ol>
<ul>
<li>In the presence of cash, we know that we can parameterize the optimization problem using the risky asset weights. The optimization is unconstrained and the cash position is deduced from the budget constraint. The risky asset weight solves the problem of question <span class="math inline">\(1\)</span> with <span class="math inline">\(\mu-r^{f}\)</span> in place of <span class="math inline">\(\mu\)</span>. The residual amount of wealth (positive if wealth is high, negative if wealth is low) is invested in the riskless asset. The level of investment in the risky assets is always optimal (i.e. as in question <span class="math inline">\(1\)</span> up to the substitution of <span class="math inline">\(\mu-r^{f}\)</span> for <span class="math inline">\(\mu\)</span>).</li>
</ul>
<h3 id="exercise-1.2">Exercise 1.2</h3>
<ul>
<li>See the notebook, which directly applies the formulas in the section on static optimization.</li>
</ul>
<ol start="3" type="1">
<li></li>
</ol>
<ul>
<li>The tangent portfolio is: <span class="math display">\[\pmb{\pi_{*}}=\frac{1}{\pmb{e}'\Sigma^{-1}(\pmb{\mu}-r^{f}\pmb{e})}\Sigma^{-1}(\pmb{\mu}-r^{f}\pmb{e}),\]</span> while the solution for the given utility function is: <span class="math display">\[\pmb{\pi_{\rho}}=\frac{1}{\rho}\Sigma^{-1}(\pmb{\mu}-r^{f}\pmb{e}).\]</span> Thus the value of <span class="math inline">\(\rho\)</span> that delivers the tangent portfolio is just: <span class="math display">\[\rho_{*}=\pmb{e}'\Sigma^{-1}(\pmb{\mu}-r^{f}\pmb{e}).\]</span></li>
</ul>
<ol start="5" type="1">
<li></li>
</ol>
<ul>
<li><p>The risky asset portfolios along the efficient frontier are all proportional to the tangent portfolio. The proportions across risky assets are thus constant along the efficient frontier. As we move towards more volatile portfolios, efficient portfolios borrow cash to finance positions in risky assets. If borrowing is ruled out, the risky asset positions need to change. The efficient frontier cannot be linear beyond the point where cash borrowing kicks in. Positions in the most volatile risky asset (equities in our case) needs to be financed through lower positions on the least volatile risky asset (in our case bonds). The proportion of bonds to equities falls as we increase volatility.</p></li>
<li><p>The no borrowing constraint does not impact safe portfolios.</p></li>
</ul>
<ol start="6" type="1">
<li></li>
</ol>
<ul>
<li>The efficient proportion of bonds to equities is at least four to one. This holds if bonds are quite attractive relatively to equities. You can play with the program to find specific parameters that match this situation.</li>
</ul>
<h3 id="exercise-1.4">Exercise 1.4</h3>
<ol type="1">
<li></li>
</ol>
<ul>
<li><p>The first order condition is: <span class="math display">\[\pmb{\pi_{\rho}}=\frac{1}{\rho}\Sigma^{-1}(\pmb{\mu}-r^{f}\pmb{e}),\]</span> which can also be written: <span class="math display">\[\Sigma\pmb{\pi_{\rho}}=\frac{1}{\rho}(\pmb{\mu}-r^{f}\pmb{e}).\]</span> We therefore have: <span class="math display">\[\pmb{\pi_{\rho}}'\Sigma\pmb{\pi_{\rho}}=\frac{1}{\rho}\pmb{\pi_{\rho}}'(\pmb{\mu}-r^{f}\pmb{e}).\]</span> <span class="math display">\[\sigma_{\rho}=\frac{1}{\rho}\frac{\pmb{\pi_{\rho}}'(\pmb{\mu}-r^{f}\pmb{e})}{\sigma_{\rho}}=\frac{1}{\rho}\lambda_{\rho}.\]</span> with <span class="math inline">\(\sigma_{\rho}\)</span> being the volatility of the optimal portfolio and <span class="math inline">\(\lambda_{\rho}\)</span> its sharpe ratio.</p></li>
<li><p>We remind that <span class="math inline">\(\lambda_{\rho}\)</span> is independent of <span class="math inline">\(\rho\)</span>. It is given by the Sharpe ratio of the tangent portfolio.</p></li>
</ul>
<ol start="2" type="1">
<li></li>
</ol>
<ul>
<li>We have: <span class="math display">\[\mu_{\rho}=\lambda\sigma_{\rho}=\rho\sigma_{\rho}^{2}.\]</span> In the <span class="math inline">\((\sigma,\mu)\)</span> space, the locus of optimal portfolios attached to a given <span class="math inline">\(\rho\)</span>, as we vary the Sharpe ratio <span class="math inline">\(\lambda\)</span>, is a parabola.</li>
</ul>
<h2 id="dynamics-discrete-time">Dynamics, discrete time</h2>
<h3 id="exercise-2.1">Exercise 2.1</h3>
<ol type="1">
<li></li>
</ol>
<ul>
<li>Directly from the course: <span class="math display">\[\underset{\pmb{\pi}_{[t,T-1]}}{\text{max}}
\; E_{t}\left[\frac{w_{T}^{1-\rho}}{1-\rho}\right]\]</span> <span class="math display">\[\text{s.t.}\]</span> <span class="math display">\[\; w_{k+1}=w_{k}\pi_{k}'R_{k+1},\,\pi_{k}'e=1,\,k=t,\ldots,T-1.\]</span></li>
</ul>
<ol start="2" type="1">
<li></li>
</ol>
<p><span class="math display">\[\underset{\pi}{\text{max}}
\; E_{T-1}\left[\frac{w_{T-1}^{1-\rho}(\pi'R_{T})^{1-\rho}}{1-\rho}\right],\]</span> <span class="math display">\[\text{s.t.}\]</span> <span class="math display">\[\; \pi'e=1.\]</span></p>
<ul>
<li><p>The constraint is linear and the criterion is concave (being a composition of a concave function with a linear one). We are thus in the usual Khün-Tucker context. Through the Lagrangian: <span class="math display">\[{\cal L}=w_{T-1}^{1-\rho}E_{T-1}\left[\frac{(\pi'R_{T})^{1-\rho}}{1-\rho}\right]-\lambda \pi'e,\]</span> we get the first order condition (differentiating with respect to <span class="math inline">\(\pi\)</span>): <span class="math display">\[w_{T-1}^{1-\rho}E[(\pi'R_{T})^{-\rho}R_{T}]=\lambda e.\]</span></p></li>
<li><p>Being in the standard concave case, the first order condition is both necessary and sufficient.</p></li>
</ul>
<ol start="3" type="1">
<li></li>
</ol>
<ul>
<li><p>Consider two levels of initial wealth in date <span class="math inline">\(T-1\)</span>, <span class="math inline">\(w^{0}\)</span> and <span class="math inline">\(w^{1}\)</span>. Suppose the the policy <span class="math inline">\(\pi^{0}\)</span> is optimal for wealth level <span class="math inline">\(w_{0}\)</span> leading to utility level <span class="math inline">\(V(w^{0})\)</span>. Then applying the policy for wealth level <span class="math inline">\(w^{1}\)</span> leads to utility level <span class="math inline">\((w^{1}/w^{0})^{1-\rho}V(w_{0})\)</span>. We thus have <span class="math inline">\(V(w^{1})\ge (w^{1}/w^{0})^{1-\rho}V(w_{0})\)</span>. Inverting the role of <span class="math inline">\(w^{0}\)</span> and <span class="math inline">\(w^{1}\)</span> leads to <span class="math inline">\(V(w^{0})\ge (w^{0}/w^{1})^{1-\rho}V(w_{1})\)</span>. Combining the two inequalities proves the homogeneity of the value function, which can choose to write <span class="math inline">\(w^{1-\rho}V(1)\)</span>. We can thus write: <span class="math display">\[V_{T-1}(w_{T-1})=w_{T-1}^{1-\rho}V_{T-1}(1).\]</span></p></li>
<li><p>The constant of proportionality is the value attached to: <span class="math display">\[\underset{\pi}{\text{max}}
\; E_{T-1}\left[\frac{(\pi'R_{T})^{1-\rho}}{1-\rho}\right],\]</span> <span class="math display">\[\text{s.t.}\]</span> <span class="math display">\[\; \pi'e=1.\]</span></p></li>
<li><p>In other words: <span class="math display">\[V_{T-1}(1)=E\left[\frac{(\pi_{*}'R)^{1-\rho}}{1-\rho}\right],\]</span> which is negative and is a constant.</p></li>
</ul>
<ol start="4" type="1">
<li></li>
</ol>
<ul>
<li><p>At step <span class="math inline">\(t\)</span>, the optimization program is, by recurrence: <span class="math display">\[\underset{\pi}{\text{max}}
\; E_{t}\left[w_{t}^{1-\rho}(\pi'R_{t+1})^{1-\rho}V_{t+1}(1)\right],\]</span> <span class="math display">\[\text{s.t.}\]</span> <span class="math display">\[\; \pi'e=1.\]</span></p></li>
<li><p>We then proceed as in the previous question. The program has the same characteristics (concave negative criterion, linear constraint). The value function is homogenous and we can write it as <span class="math inline">\(w^{1-\rho}V_{t}(1)\)</span>. Because <span class="math inline">\(V_{t+1}(1)\)</span> is a negative constant, the optimization problem actually leads to the same optimal portfolio <span class="math inline">\(\pi_{*}\)</span>. We then have the recurrence relation: <span class="math display">\[V_{t}(1)=V_{t+1}(1)E\left[(\pi_{*}'R)^{1-\rho}\right].\]</span></p></li>
<li><p>The terminal condition implies <span class="math inline">\(V_{T}(1)=1/(1-\rho)\)</span>.</p></li>
</ul>
<ol start="5" type="1">
<li></li>
</ol>
<ul>
<li>We established that the optimal portfolio is the same at each date. That is the main take-away. In this setup, the investor’s choice does not depend on the investment horizon. He rebalanced to the same set of optimal weights at each step.</li>
</ul>
<h3 id="exercise-2.3">Exercise 2.3</h3>
<ol type="1">
<li></li>
</ol>
<ul>
<li>Because the support of <span class="math inline">\(\tilde{R}_{1}\)</span> has <span class="math inline">\(0\)</span> as its lower bound, wealth invested in the risky asset in period <span class="math inline">\(0\)</span> can can lead to nothing in period <span class="math inline">\(1\)</span>. The minimum amount of wealth needed to obtain <span class="math inline">\(\underline{w}_{1}\)</span> in period is: <span class="math display">\[\underline{w}_{0}=\frac{\underline{w}_{1}}{R^{f}}.\]</span></li>
</ul>
<ol start="2" type="1">
<li></li>
</ol>
<ul>
<li><p>According to question <span class="math inline">\(1\)</span>, at least <span class="math inline">\(\underline{w}_{0}\)</span> should be invested in the riskless asset. Thus nothing more than <span class="math inline">\(w_{0}-\underline{w}_{0}\)</span> can be invested in the risky asset. This quantity (the surplus) can be split into the fraction invested in the risky asset and the remaining fraction invested in the riskless asset. Thus the transfer of wealth obeys: <span class="math display">\[w_{1}=\underline{w}_{0}R^{f}+(w_{0}-\underline{w}_{0})(1-\pi_{0})R^{f}+(w_{0}-\underline{w}_{0})\pi_{0}\tilde{R}_{1},\]</span><br />
or given that <span class="math inline">\(\underline{w}_{0}R^{f}=\underline{w}_{1}\)</span>: <span class="math display">\[w_{1}-\underline{w}_{1}=(w_{0}-\underline{w}_{0})(R^{f}+\pi_{0}(\tilde{R}_{1}-R^{f})).\]</span></p></li>
<li><p>To see that <span class="math inline">\(\pi_{0}\)</span> should be positive or zero, note that because the return <span class="math inline">\(\tilde{R}_{1}\)</span> can be arbitrarily large, going short the risky asset can wipe out any level of wealth.</p></li>
</ul>
<ol start="3" type="1">
<li></li>
</ol>
<ul>
<li><p>We have:</p>
<ul>
<li><p>the budget constraint expressed as a function of the surplus is geometric. Multiplying the initial surplus <span class="math inline">\(w_{0}-\underline{w}_{0}\)</span> by <span class="math inline">\(\lambda\)</span> leaving the proportion <span class="math inline">\(\pi_{0}\)</span> unchanged leads to <span class="math inline">\(\lambda\)</span> times <span class="math inline">\(w_{1}-\underline{w}_{1}\)</span> as the final surplus: <span class="math display">\[\lambda (w_{1}-\underline{w}_{1})=\lambda (w_{0}-\underline{w}_{0})(R^{f}+\pi_{0}(\tilde{R}_{1}-R^{f})).\]</span></p></li>
<li><p>the set of feasible investment policies does not depend on the initial surplus.</p></li>
<li><p>for a given investment policy <span class="math inline">\(\pi_{0}\)</span>, if <span class="math inline">\(U(w_{0}-\underline{w}_{0},\pi_{0})\)</span> is the utility level reached starting from a surplus <span class="math inline">\(w_{0}-\underline{w}_{0}\)</span>, the utility level reached starting from <span class="math inline">\(\lambda(w_{0}-\underline{w}_{0})\)</span> is <span class="math inline">\(U(\lambda(w_{0}-\underline{w}_{0}),\pi_{0})=\lambda^{1-\rho}U(w_{0}-\underline{w}_{0},\pi_{0})\)</span>.</p></li>
</ul></li>
<li><p>These facts imply that the value function <span class="math inline">\(V(w_{0}-\underline{w}_{0})\)</span> is homogenous of degree <span class="math inline">\(1-\rho\)</span> in the surplus. Indeed, if <span class="math inline">\(V(\lambda (w_{0}-\underline{w}_{0}))>\lambda^{1-\rho}V(w_{0}-\underline{w}_{0})\)</span>, then using the optimal choice for the initial condition <span class="math inline">\(\lambda (w_{0}-\underline{w}_{0})\)</span>, one can achieve the value: <span class="math display">\[\frac{1}{\lambda^{1-\rho}} V(\lambda (w_{0}-\underline{w}_{0}))>V(w_{0}-\underline{w}_{0}),\]</span> for the utility level reached from the initial conditon <span class="math inline">\(w_{0}-\underline{w}_{0}\)</span>. This is a contradiction. Similarly: <span class="math display">\[V(\lambda (w_{0}-\underline{w}_{0}))<\lambda^{1-\rho}V(w_{0}-\underline{w}_{0}),\]</span> would lead to a contradiction.</p></li>
<li><p>The optimal program for the initial condition <span class="math inline">\(w_{0}-\underline{w}_{0}=1\)</span> is: <span class="math display">\[V(1)=\underset{\pi_{0}}{\text{max}} \; E[\frac{1}{1-\rho}(R^{f}+\pi_{0}(\tilde{R}_{1}-R^{f}))^{1-\rho}]\]</span> <span class="math display">\[\text{s.t.}:\]</span> <span class="math display">\[0 \leq \pi_{0} \leq 1,\]</span> and the solution does not depend on the initial condition.</p></li>
</ul>
<ol start="4" type="1">
<li></li>
</ol>
<ul>
<li><p>We know from the previous questions that in the two period case, the value function in date <span class="math inline">\(0\)</span> reads: <span class="math display">\[V_{T-1}(1)(w_{0}-\underline{w}_{0})^{1-\rho}.\]</span> Note that <span class="math inline">\(V_{T-1}(1)\)</span> has the same sign as <span class="math inline">\(1-\rho\)</span>.</p></li>
<li><p>We can extend the reasoning by recurrence using the dynamic programming principle, and we therefore obtain that the value function at any date <span class="math inline">\(t\)</span> reads: <span class="math display">\[V_{t}(1)(w_{0}-\underline{w}_{0})^{1-\rho}.\]</span> The optimal command is given by: <span class="math display">\[\underset{\pi_{t}}{\text{max}} \; E[V_{t+1}(1)(R^{f}+\pi_{0}(\tilde{R}_{1}-R^{f}))^{1-\rho}]\]</span> <span class="math display">\[\text{s.t.}:\]</span> <span class="math display">\[0 \leq \pi_{t} \leq 1.\]</span> This gives the same result for every date <span class="math inline">\(t\)</span> (we have i.i.d. risky asset returns and a constant cash rate).</p></li>
</ul>
<h2 id="dynamics-continuous-time">Dynamics, continuous time</h2>
<h3 id="exercise-3.1">Exercise 3.1</h3>
<ol type="1">
<li></li>
</ol>
<ul>
<li><p>For <span class="math inline">\(t \in (t_{i},t_{i+1}]\)</span> and <span class="math inline">\(t' \in (t_{k},t_{k+1}]\)</span> (I assume <span class="math inline">\(k>i+1\)</span>, the case where <span class="math inline">\(k=i+1\)</span> follows similar lines): <span class="math display">\[M_{t'}=\int_{0}^{t'}h(u)dB_{u}=\sum_{j=1}^{i-1}F_{j}(B_{t_{j}}-B_{t_{j+1}})+F_{t_{i}}(B_{t}-B_{t_{i}})+\]</span> <span class="math display">\[F_{t_{i}}(B_{t_{i+1}}-B_{t})+\sum_{j=i+1}^{k-1}F_{j}(B_{t_{j}}-B_{t_{j+1}})+F_{t_{k}}(B_{t'}-B_{t_{k}}).\]</span></p></li>
<li><p>Using the properties of the Brownian motion, we have: <span class="math display">\[E_{t}[M_{t'}]=E_{t}[\sum_{j=1}^{i-1}F_{j}(B_{t_{j}}-B_{t_{j+1}})+F_{t_{i}}(B_{t}-B_{t_{i}})]=M_{t}.\]</span> This says that the stochastic integral of a simple process is a martingale.</p></li>
</ul>
<ol start="2" type="1">
<li></li>
</ol>
<ul>
<li><p>For the left hand side, one just needs to develop <span class="math inline">\(M_{t}^2\)</span> and use the fact that: <span class="math display">\[E_{0}[F_{t_{k}}(B_{t_{k+1}}-B_{t_{k}})F_{t_{j}}(B_{t_{j+1}}-B_{t_{j}})]=0,\]</span> when intervals <span class="math inline">\([t_{k},t_{k+1}]\)</span> and <span class="math inline">\([t_{j},t_{j+1}]\)</span> don’t overlap while: <span class="math display">\[E_{0}[F_{t_{k}}^{2}(B_{t_{k+1}}-B_{t_{k}})^{2}]=E_{0}[F_{t_{k}}^{2}(t_{k+1}-t_{k})].\]</span></p></li>
<li><p>For the right-hand side: <span class="math display">\[h(t)=\sum_{i=1}^{n}F_{i}^{2}{\bf 1}_{(t_{i},t_{i+1}]},\]</span> so that: <span class="math display">\[\int_{0}^{t}h(u)^{2}du=\sum_{j=1}^{i-1}F_{j}^{2}(t_{j+1}-t_{j})+F_{t_{i}}^{2}(t-t_{i}).\]</span></p></li>
<li><p>Identification is then immediate.</p></li>
</ul>
<ol start="3" type="1">
<li></li>
</ol>
<ul>
<li><p>We have (<span class="math inline">\(t' \geq t\)</span>): <span class="math display">\[\int_{0}^{t'}h(u)dB_{u}=\int_{0}^{t}h(u)dB_{u}+\int_{t}^{t'}h(u)dB_{u},\]</span> and: <span class="math display">\[E_{t}[|\int_{0}^{t'}h(u)dB_{u}|^{2}]=|\int_{0}^{t}h(u)dB_{u}|^{2}+E_{t}[|\int_{t}^{t'}h(u)dB_{u}|^{2}],\]</span> as the expectation of the cross-product vanishes.</p></li>
<li><p>Similarly: <span class="math display">\[\int_{0}^{t'}h(u)^{2}du=\int_{0}^{t}h(u)^{2}du+\int_{t}^{t'}h(u)^{2}du,\]</span> and: <span class="math display">\[E_{t}[\int_{0}^{t'}h(u)^{2}du]=\int_{0}^{t}h(u)^{2}du+E_{t}[\int_{t}^{t'}h(u)^{2}du].\]</span></p></li>
<li><p>Then we can proceed as in <span class="math inline">\(2\)</span> to get: <span class="math display">\[E_{t}[|\int_{t}^{t'}h(u)dB_{u}|^{2}]-E_{t}[\int_{t}^{t'}h(u)^{2}du]=0,\]</span> so that: <span class="math display">\[E_{t}[|\int_{0}^{t'}h(u)dB_{u}|^{2}]-E_{t}[\int_{0}^{t'}h(u)^{2}du]=|\int_{0}^{t}h(u)dB_{u}|^{2}-\int_{0}^{t}h(u)^{2}du,\]</span> which is what we needed to establish.</p></li>
</ul>
<ol start="4" type="1">
<li></li>
</ol>
<ul>
<li>Because <span class="math inline">\(E_{0}[M_{t}]=0\)</span>, the variance of <span class="math inline">\(M_{t}\)</span> (as seen from date <span class="math inline">\(0\)</span>) is <span class="math inline">\(E_{0}[M_{t}^{2}]\)</span> which is equal to <span class="math inline">\(E_{0}[[M]_{t}]\)</span>, i.e. the expectation of the quadratic variation. When quadratic variation is deterministic, it is equal to the variance (as seen from date <span class="math inline">\(0\)</span>) of <span class="math inline">\(M_{t}\)</span>.</li>
</ul>
<h3 id="exercise-3.2">Exercise 3.2</h3>
<ol type="1">
<li></li>
</ol>
<ul>
<li><p>We just need to apply Ito to <span class="math inline">\(\exp\left(-\int_{0}^{t}r_{u}du\right)P_{t}^{T}\)</span>. The exponential is a finite variation process and the Ito boils down to the standard differential formula in this case: <span class="math display">\[d\left(\exp\left(-\int_{0}^{t}r_{u}du\right)P_{t}^{T}\right)=d\left(\exp\left(-\int_{0}^{t}r_{u}du\right)\right)P_{t}^{T}+\exp\left(-\int_{0}^{t}r_{u}du\right)d(P_{t}^{T}),\]</span> <span class="math display">\[=-\exp\left(-\int_{0}^{t}r_{u}du\right)P_{t}^{T}r_{t}dt+\exp\left(-\int_{0}^{t}r_{u}du\right)P_{t}^{T}r_{t}dt+
\exp\left(-\int_{0}^{t}r_{u}du\right)P_{t}^{T}\sigma_{t}^{T}dB_{t}.\]</span> <span class="math display">\[=\exp\left(-\int_{0}^{t}r_{u}du\right)P_{t}^{T}\sigma_{t}^{T}dB_{t}.\]</span></p></li>
<li><p>Thus <span class="math inline">\(\exp\left(-\int_{0}^{t}r_{u}du\right)P_{t}^{T}\)</span> is a martingale.</p></li>
</ul>
<ol start="2" type="1">
<li></li>
</ol>
<ul>
<li>We therefore have: <span class="math display">\[\exp\left(-\int_{0}^{t}r_{u}du\right)P_{t}^{T}=E_{t}\left[\exp\left(-\int_{0}^{T}r_{u}du\right)P_{T}^{T}\right]\]</span> <span class="math display">\[=E_{t}\left[\exp\left(-\int_{0}^{T}r_{u}du\right)\right].\]</span> Therefore: <span class="math display">\[P_{t}^{T}=E_{t}\left[\exp\left(-\int_{t}^{T}r_{u}du\right)\right].\]</span></li>
</ul>
<ol start="3" type="1">
<li></li>
</ol>
<ul>
<li>Differentiate <span class="math inline">\(\exp(\rho t)r_{t}\)</span>: <span class="math display">\[d\left(\exp(\rho t)(r_{t}-\bar{r})\right)=\rho\exp(\rho t)(r_{t}-\bar{r})dt-\rho\exp(\rho t)(r_{t}-\bar{r})dt+\exp(\rho t)\sigma_{r}dB_{t}.\]</span> <span class="math display">\[=\exp(\rho t)\sigma_{r}dB_{t}.\]</span> Therefore: <span class="math display">\[\exp(\rho t)(r_{t}-\bar{r})-(r_{0}-\bar{r})=\int_{0}^{t}\exp(\rho u)\sigma_{r}dB_{u},\]</span> <span class="math display">\[r_{t}-\bar{r}=\exp(-\rho t)(r_{0}-\bar{r})+\int_{0}^{t}\exp(-\rho (t-u))\sigma_{r}dB_{u}.\]</span></li>
</ul>
<ol start="4" type="1">
<li></li>
</ol>
<ul>
<li><p>One needs to integrate the above equation written between <span class="math inline">\(t\)</span> and <span class="math inline">\(u>t\)</span> instead on <span class="math inline">\(0\)</span> and <span class="math inline">\(t\)</span>. Integrating the term <span class="math inline">\(\exp(-\rho t)(r_{0}-\bar{r})\)</span> leads to: <span class="math inline">\((r_{t}-\bar{r})b(T-t)\)</span> where: <span class="math display">\[b(T-t)=\int_{t}^{T}\exp(-\rho(u-t))du=-\frac{1}{\rho}[\exp(-\rho(u-t))]_{u=t}^{u=T}=\frac{1-\exp(-\rho(T-t))}{\rho}.\]</span></p></li>
<li><p>One then applies Fubini to the following double integral: <span class="math display">\[\int_{t}^{T}\left(\int_{t}^{u}\exp(-\rho (u-v))\sigma_{r}dB_{v}\right)du=\int_{t}^{T}\left(\int_{v}^{T}\exp(-\rho (u-v))du\right)\sigma_{r}dB_{v},\]</span> and observes that: <span class="math display">\[\int_{v}^{T}\exp(-\rho (u-v))du=b(T-v).\]</span> This gives the result.</p></li>
</ul>
<ol start="5" type="1">
<li></li>
</ol>
<ul>
<li>Write: <span class="math display">\[b(h-u)=\frac{1}{\rho^{2}}-\frac{1}{\rho^{2}}\exp(-\rho (h-u))-\frac{1}{\rho}\exp(-\rho (h-u))\frac{1}{\rho}(1-\exp(-\rho (h-u))),\]</span> and observe that: <span class="math display">\[-\frac{1}{\rho}\exp(-\rho (h-u))\frac{1}{\rho}(1-\exp(-\rho (h-u)))=\frac{1}{\rho}b_{u}'(h-u)b(h-u),\]</span> where <span class="math inline">\(b_{u}'(h-u)\)</span> is the <span class="math inline">\(u\)</span> derivative of <span class="math inline">\(b(h-u)\)</span>. The formula then follows by straitghtforward integration.</li>
</ul>
<ol start="6" type="1">
<li></li>
</ol>
<ul>
<li>The variable <span class="math inline">\(\int_{t}^{T}r_{u}du\)</span> is Gaussian with mean <span class="math inline">\(\bar{r}(T-t)+(r_{t}-\bar{r})b(T-t)\)</span> and variance: <span class="math display">\[\int_{t}^{T}b(T-u)^{2}\sigma_{r}^{2}du.\]</span> Thus: <span class="math display">\[P_{t}^{T}=\exp\left(-\bar{r}(T-t)-(r_{t}-\bar{r})b(T-t)+\frac{\sigma_{r}^{2}}{2}\left(\int_{t}^{T}b(T-u)^{2}du\right)\right).\]</span></li>
</ul>
<ol start="7" type="1">
<li></li>
</ol>
<ul>
<li>Applying Ito to the above formula shows that the volatility of the price process is <span class="math inline">\(\sigma_{r}b(T-t)\)</span>.</li>
</ul>
<h3 id="exercise-3.3">Exercise 3.3</h3>
<ol type="1">
<li></li>
</ol>
<ul>
<li>Inserting <span class="math inline">\(dB_{t}=dB^{Q}_{t}-\lambda dt\)</span> into: <span class="math display">\[\frac{dP_{t}^{T}}{P_{t}^{T}}=(r_{t}+\sigma_{t}^{T}\lambda)dt+\sigma_{t}^{T}dB_{t},\]</span> we get: <span class="math display">\[\frac{dP_{t}^{T}}{P_{t}^{T}}=r_{t}dt+\sigma_{t}^{T}dB^{Q}_{t}.\]</span></li>
</ul>
<ol start="2" type="1">
<li></li>
</ol>
<ul>
<li>The SDE followed by the cash rate is: <span class="math display">\[dr_{t}=-\rho(r_{t}-\bar{r}+\frac{\lambda}{\rho})dt+\sigma_{r}dB^{Q}_{t},\]</span> i.e.: <span class="math display">\[dr_{t}=-\rho(r_{t}-\tilde{r})dt+\sigma_{r}dB^{Q}_{t},\]</span> with: <span class="math display">\[\tilde{r}=\bar{r}-\frac{\lambda\sigma_{r}}{\rho}.\]</span> Therefore, the mean cash rate has changed.</li>
</ul>
<ol start="3" type="1">
<li></li>
</ol>
<ul>
<li><p>We now have: <span class="math display">\[P_{t}^{T}=E^{Q}_{t}\left[\exp\left(-\int_{t}^{T}r_{u}du\right)\right].\]</span></p></li>
<li><p>The process <span class="math inline">\((B^{Q}_{t})\)</span> is a Brownian motion. We can thus compute the price as in the previous exercise. This gives: <span class="math display">\[P_{t}^{T}=\exp\left(-\tilde{r}(T-t)-(r_{t}-\tilde{r})b(T-t)+\frac{\sigma_{r}^{2}}{2}\left(\int_{t}^{T}b(T-u)^{2}du\right)\right).\]</span></p></li>
</ul>
<ol start="4" type="1">
<li></li>
</ol>
<ul>
<li>Only the mean short rate has changed. Price volatility is unchanged.</li>
</ul>
Sat, 12 Dec 2015 00:00:00 +0100
https://www.investmentmath.com/ensae/2015/12/12/solexercises.html
https://www.investmentmath.com/ensae/2015/12/12/solexercises.htmlComplete Markets, Discrete Time<p><em>In this post, I present the so-called martingale method in a complete market setup where the time scale is discrete and the probability space is discrete as well. In the absence of arbitrage, there is a strictly positive stochastic discount factor (SDF) and a risk neutral measure can be defined. The market is said to be complete if any consumption stream which is adapted to the underlying filtration can be traded using the available financial instruments. If this is the case, the SDF and the risk neutral measure are both unique. A portfolio optimization problem without labour income is defined. Despite the dynamic context, the maximization problem is essentially static. The gradient of the utility function has to be proportional to the SDF, and the optimal plan is found by varying the coefficient of proportionality to satisfy the intertemporal budget constraint. The optimal consumption plan is thus in principal easily derived. The corresponding portfolio policy has to be identified in a second step however.</em></p>
<hr />
<h2 id="single-period-sdf-and-risk-neutral-probabilities">Single period SDF and risk neutral probabilities</h2>
<ul>
<li><p>What follows should be read after <a href="/ensae/2014/11/16/complete.html">this post</a>.</p></li>
<li><p>Here, I drop the tildas on random variables to avoid overloading the notation.</p></li>
<li><p>The general ideas presented in the static case can be applied to the dynamic case. The easiest extension assumes a discrete time scale and a discrete probability space represented by a tree of events.</p></li>
<li><p>Let the set of time indices be <span class="math inline">\(\{0,1,\ldots,T\}\)</span>. If there is no arbitrage, one can define strictly positive discount factors <span class="math inline">\(z_{t+1}\)</span> such that all pay-offs <span class="math inline">\(x_{\theta_{t},t+1}\)</span> of an investment policy <span class="math inline">\(\theta_{t}\)</span> are priced according to: <span class="math display">\[p_{\theta_{t},t}=E_{t}[z_{t+1}x_{\theta_{t},t+1}].\]</span></p></li>
<li><p>In the absence of arbitrage, the discount factor is strictly positive and we can define risk neutral probabilities with derivative: <span class="math display">\[\psi_{t+1}=R^{f}_{t+1}z_{t+1},\]</span> (<span class="math inline">\(E_{t}[\psi_{t+1}]=1\)</span>) so that for any <span class="math inline">\(x\)</span> that is <span class="math inline">\({\cal F}_{t}\)</span> measurable: <span class="math display">\[E_{t}[\psi_{t+1}x]=\tilde{E}_{t}[x].\]</span></p></li>
<li><p>Under this new measure: <span class="math display">\[p_{\theta_{t},t}=\tilde{E}_{t}\left[\frac{x_{\theta_{t},t+1}}{R^{f}_{t+1}}\right]=\frac{\tilde{E}_{t}\left[x_{\theta_{t},t+1}\right]}{R^{f}_{t+1}}.\]</span></p></li>
</ul>
<h2 id="multiperiod-sdf">Multiperiod SDF</h2>
<ul>
<li><p>One can telescope the period by period discount factors by defining: <span class="math display">\[m_{t}=z_{1}z_{2}\cdots z_{t}\; (t \geq 1),\]</span> <span class="math display">\[m_{0}=1.\]</span></p></li>
<li><p>Considering a self-financed trading rule <span class="math inline">\(\theta[t,t+1]=\{\theta_{t},\theta_{t+1}\}\)</span> defined over the time interval <span class="math inline">\([t,t+1]\)</span>, and assuming that it leads to a pay-off in <span class="math inline">\(t+2\)</span> only, one can write using the rules regarding conditional expectations: <span class="math display">\[p_{\theta_{t+1},t+1}=E_{t+1}[z_{t+2}x_{\theta_{t+1},t+2}],\]</span> <span class="math display">\[p_{\theta_{t+1},t}=E_{t}[z_{t+1}p_{\theta_{t+1},t+1}]=E_{t}[E_{t+1}[z_{t+1}z_{t+2}x_{\theta_{t+1},t+2}]],\]</span> <span class="math display">\[p_{\theta_{t+1},t}=E_{t}[z_{t+1}z_{t+2}x_{\theta_{t+1},t+2}],\]</span> <span class="math display">\[m_{t}p_{\theta_{t+1},t}=E_{t}[m_{t+2}x_{\theta_{t+1},t+2}].\]</span></p></li>
<li><p>When the self-financed trading policy <span class="math inline">\(\theta[t,T]=\{\theta_{t},\ldots,\theta_{T}\}\)</span> leads to pay-offs that accrue at different times, <span class="math inline">\(\{x_{t+1},\ldots,x_{T}\}\)</span>, we just have to sum their discounted values: <span class="math display">\[m_{t}p_{\theta_{t},t}=E_{t}[\sum_{k=t+1}^{T}m_{k}x_{k}].\]</span></p></li>
</ul>
<h2 id="multiperiod-risk-neutral-probabilities">Multiperiod risk neutral probabilities</h2>
<ul>
<li>If we collapse all Radon-Nikodym derivatives into: <span class="math display">\[\Psi_{t}=\psi_{1} \cdots \psi_{t}\; (t \geq 1),\]</span> <span class="math display">\[\Psi_{0}=1.\]</span></li>
</ul>
<p>obviously: <span class="math display">\[E_{0}[\Psi_{t}]=1,\]</span> and: <span class="math display">\[E_{t}[\Psi_{T}]=\Psi_{t}.\]</span></p>
<ul>
<li><p>We can define for an <span class="math inline">\({\cal F}_{T}\)</span> random variable <span class="math inline">\(X\)</span>: <span class="math display">\[\tilde{E}_{0}[X]=E_{0}[\Psi_{T}X],\]</span> and for conditional expectations: <span class="math display">\[\tilde{E}_{0}[X|{\cal F}_{t}]=E_{t}[X]=\frac{E_{0}[\Psi_{T}X|{\cal F}_{t}]}{E_{0}[\Psi_{T}|{\cal F}_{t}]}=\frac{E_{t}[\Psi_{T}X]}{E_{t}[\Psi_{T}]}
=\frac{E_{t}[\Psi_{T}X]}{\Psi_{t}}.\]</span></p></li>
<li><p>Note that we recover the one step ahead risk neutral derivatives. As above, we have: <span class="math display">\[p_{\theta_{t},t}=E_{t}[\psi_{t+1}\frac{x_{\theta_{t},t+1}}{R^{f}_{t+1}}]=\tilde{E}_{t}[\frac{x_{\theta_{t},t+1}}{R^{f}_{t+1}}],\]</span> and more generally for <span class="math inline">\(\theta[t,t+1]=\{\theta_{t},\theta_{t+1}\}\)</span> delivering a pay-off in <span class="math inline">\(t+2\)</span> as above: <span class="math display">\[p_{\theta_{t+1},t}=E_{t}[\frac{m_{t+2}}{m_{t}}x_{\theta_{t+1},t+2}]=\tilde{E}_{t}[\frac{x_{\theta_{t+1},t+2}}{R^{f}_{t+1}R^{f}_{t+2}}].\]</span></p></li>
<li><p>Similarly, when the self-financed trading policy <span class="math inline">\(\theta[t,T]=\{\theta_{t},\ldots,\theta_{T}\}\)</span> leads to pay-offs that accrue at different times, <span class="math inline">\(\{x_{t+1},\ldots,x_{T}\}\)</span>, we just have to sum the risk neutral expectations of discounted values with discount rates being risk free discount rates: <span class="math display">\[p_{\theta_{t},t}=\tilde{E}_{t}\left[\sum_{k=t+1}^{T}\frac{x_{k}}{\Pi_{q=t+1}^{k}R^{f}_{q}}\right].\]</span></p></li>
<li><p>To simplify the notation, we can write: <span class="math display">\[B_{t,k}=\Pi_{q=t+1}^{k}R^{f}_{q}.\]</span> This is the amount generated at date <span class="math inline">\(k\)</span> by investing <span class="math inline">\(1\)</span> dollar at date <span class="math inline">\(t\)</span>. Using this we can rewrite the intertemporal budget constraint above as: <span class="math display">\[p_{\theta_{t},t}=\tilde{E}_{t}\left[\sum_{k=t+1}^{T}B_{t,k}^{-1}x_{k}\right].\]</span></p></li>
<li><p>One can paraphrase this as saying that the price is the risk neutral expectation of cash flows expressed using the cash account as the numeraire.</p></li>
<li><p>Suppose we consider an asset that does not distribute dividends. We initiate an investment in the cash account at date <span class="math inline">\(0\)</span> and this delivers a cash amount <span class="math inline">\(B_{0,t}\)</span> at date <span class="math inline">\(t\)</span>. Expressing the price of the asset in terms of the cash account, we thus define the discounted price: <span class="math display">\[\tilde{P}_{t}=\frac{P_{t}}{B_{0,t}}.\]</span> We have, using risk neutral probabilities: <span class="math display">\[P_{0}=\tilde{P}_{0}=\tilde{E}_{0}[\tilde{P}_{t}].\]</span><br />
Similarly: <span class="math display">\[P_{t}=\tilde{E}_{t}[B_{t,T}^{-1}{P}_{T}],\]</span> and thus (multiplying the equation by <span class="math inline">\(B_{0,t}^{-1}\)</span>): <span class="math display">\[\tilde{P}_{t}=\tilde{E}_{t}[\tilde{P}_{T}].\]</span> We thus see that discounted prices follow a martingale process.</p></li>
<li><p>As a consequence, wealth also follows a martingale process.</p></li>
</ul>
<h2 id="intertemporal-budget-constraints">Intertemporal budget constraints</h2>
<ul>
<li><p>The budget constraints records the way wealth evolves over time along a trajectory of returns (assuming no income and no consumption): <span class="math display">\[W_{t+1}=W_{t}\pi_{t}'R_{T+1}.\]</span></p></li>
<li><p>Multiplying both sides by <span class="math inline">\(m_{t+1}\)</span>, taking expectations and using the relationship between the SDF and returns, we get: <span class="math display">\[E_{t}[m_{t+1}W_{t+1}]=m_{t}W_{t}.\]</span></p></li>
<li><p>Similarly, in the presence of consumption and income, the budget constraint trajectory by trajectory: <span class="math display">\[W_{t+1}+C_{t}\pi_{t}'R_{T+1}=W_{t}\pi_{t}'R_{T+1}+Y_{t+1},\]</span> leads to: <span class="math display">\[E_{t}[m_{t+1}W_{t+1}]+m_{t}C_{t}=m_{t}W_{t}+E_{t}[m_{t+1}Y_{t+1}].\]</span></p></li>
<li><p>Over a sequence <span class="math inline">\(\{t,t+1,\cdots,T\}\)</span> of periods : <span class="math display">\[\sum_{k=t}^{T-1}E_{t}[m_{k}C_{k}]+E_{t}[m_{T}W_{T}]=m_{t}W_{t}+\sum_{k=t+1}^{T}E_{t}[m_{k}Y_{k}].\]</span></p></li>
<li><p>Similarly, one can write the above relationships using risk-neutral probabilities instead of the SDF: <span class="math display">\[\sum_{k=t}^{T-1}\tilde{E}_{t}[B_{t,k}^{-1}C_{k}]+\tilde{E}_{t}[B_{t,T}^{-1}W_{T}]=m_{t}W_{t}+\sum_{k=t+1}^{T}\tilde{E}_{t}[B_{t,k}^{-1}Y_{k}].\]</span></p></li>
</ul>
<h2 id="complete-markets">Complete markets</h2>
<ul>
<li><p>We restrict the problem to a set of times <span class="math inline">\([0,T]\)</span>. We have a fitration <span class="math inline">\({\cal F}_{T}\)</span> and as usual random processes considered are supposed to be adapted to that filtration.</p></li>
<li><p>In the static case, completeness meant that the traded assets allowed to synthesize all Arrow-Debreu securities. One can then transfer wealth exclusively to any state of nature. There needs to be as many traded assets as there are states of nature, and the matrix of pay-offs needs to have full rank.</p></li>
<li><p>In this context, any pay-off function <span class="math inline">\(\tilde{x}(\cdot)\)</span> from the set of states of nature to <span class="math inline">\(\mathbb{R}_{+}\)</span> can be obtained as the pay-off of a portfolio.</p></li>
<li><p>In our dynamic context, we say that the market is complete if any pay-off <span class="math inline">\(C_{t}\)</span> (a function from the states of nature of time <span class="math inline">\(t\)</span> to <span class="math inline">\(\mathbb{R}_{+}\)</span>) for any <span class="math inline">\(t \in [0,T]\)</span> can be obtained as the pay-off of a given trading policy. In particular, we need to be able to synthesize all Arrow Debreu securities of all dates <span class="math inline">\(t \in [0,T]\)</span>.</p></li>
<li><p>In a market without arbitrage, there is at least one strictly positive SDF and therefore one risk neutral probability measure. If markets are complete, there is necessarily only one SDF and only one risk neutral measure.</p></li>
<li><p>Indeed, consider the price of the Arrow Debreu security <span class="math inline">\(e_{t,k}\)</span> that pays <span class="math inline">\(1\)</span> in state <span class="math inline">\(\omega_{t,k}\)</span> of date <span class="math inline">\(t\)</span> is: <span class="math display">\[P_{0}(e_{t,k})=E_{0}[m_{t}(\omega_{t,\cdot})e_{t,k}(\omega_{t,\cdot})]=p_{0}(\omega_{t,k})m_{t}(\omega_{t,k}),\]</span> where <span class="math inline">\(p_{0}(\omega_{t,k})\)</span> is the probability as seen from date <span class="math inline">\(0\)</span> of state <span class="math inline">\(\omega_{t,k}\)</span>. Thus, the value of the SDF is fixed by probabilities as of time <span class="math inline">\(0\)</span> and time <span class="math inline">\(0\)</span> prices.</p></li>
</ul>
<h2 id="the-martingale-method">The martingale method</h2>
<ul>
<li><p>In a general context, checking that a certain consumption stream over <span class="math inline">\([0,T]\)</span> can be finance by trading involves a complex investigation of the structure that markets impose through the intertemporal budget constraint to the ability to transfer wealth across time and states of nature.</p></li>
<li><p>In a complete market, there is no limit to the ability to transfer wealth. All consumption streams are tradables. In the end thus, whether a certain consumption stream can be financed is just a matter of having enough wealth at time <span class="math inline">\(0\)</span>. This is true regardless of whether we receive income or not.</p></li>
<li><p>In what follows, I assume as a simplification that there is no income.</p></li>
<li><p>In the complete market case, the feasibility of a consumption stream is encapsulated in the budget constraint: <span class="math display">\[\sum_{t=0}^{T}E_{0}[m_{t}C_{t}]+E_{0}[m_{T}W_{T}]=m_{0}W_{0}.\]</span></p></li>
<li><p>Whereas this equation necessarily holds in incomplete markets, a consumption stream that satisfies this equation is not necessarily actually feasible. One would indeed need to verify that a trading strategy using available assets can finance the consumption stream.. In a complete market, the existence of such a trading strategy is ensured.</p></li>
<li><p>The structure of a complete markets portfolio optimization problem is as follows: we maximize a utility function under a constraint which is defined by a linear functional on the consumption function. This is entirely analogous to the static multigood consumption problem of traditional microeconomic theory and we can therefore say that the optimization problem is static.</p></li>
<li><p>We assume that the optimization problem is: <span class="math display">\[\underset{(C_{0},\ldots,C_{T})}{\text{max}}
\; E_{0}\left[\sum_{t=0}^{T} \delta^{t}u_{t}(C_{t})\right],\]</span> subject to: <span class="math display">\[W_{0}=\sum_{t=0}^{T}E_{0}[m_{t}C_{t}],\]</span> assuming <span class="math inline">\(u_{t}(\cdot)\)</span> has range <span class="math inline">\(\mathbb{R}_{+}^{*}\)</span> and is strictly increasing and concave, with <span class="math inline">\(u_{t}^{\prime}\)</span> ranging from <span class="math inline">\(+\infty\)</span> to <span class="math inline">\(0\)</span> as consumption varies in <span class="math inline">\(\mathbb{R}_{+}^{*}\)</span>.</p></li>
<li><p>The command is the set of consumption values for all times and states of nature. This is a finite set of numbers since we assume discrete time, a finite horizon and a discrete probability state. The system is solved as usual using the Lagrangian, the first order condition being: <span class="math display">\[\delta^{t}u_{t}'(C_{t}(\omega_{t,k}))=\lambda m_{t}(\omega_{t,k}).\]</span></p></li>
<li><p>As in the static case, we can thus take: <span class="math display">\[C_{t}(\omega_{t,k})=u_{t}^{\prime -1}(\lambda \delta^{-t} m_{t}(\omega_{t,k})),\]</span> and one picks the value of <span class="math inline">\(\lambda\)</span> which implies that the budget constraint is satisfied.</p></li>
<li><p>The assumptions on marginal utilities are designed to ensure that there is a unique solution <span class="math inline">\(\lambda^{*}\)</span> for any initial level of wealth.</p></li>
</ul>
<h2 id="conclusion">Conclusion</h2>
<ul>
<li><p>Completeness (and absence of arbitrage) thus implies that the optimization problem is static. It can be solved under the right technical assumption as in the two period case, and as in the standard microeconomic multi-good consumption problem.</p></li>
<li><p>The key point is that the gradient of the utility function has to be, at the optimum, proportional to the unique SDF.</p></li>
<li><p>To apply this in practice, one needs to set up a complete market model such as the binomial model for stock prices.</p></li>
<li><p>Note that the solution directly gives the consumption function. How the consumption plan is practically financed requires a separate investigation. What we know is that it can be financed for sure.</p></li>
<li><p>One could describe the optimization process using the risk neutral measure instead of the SDF. Because under this measure, the properly discounted wealth process (i.e. discounted using the cash account) is a martingale, this method is usually called the martingale method.</p></li>
</ul>
Sat, 14 Nov 2015 00:00:00 +0100
https://www.investmentmath.com/ensae/2015/11/14/complete-dyn.html
https://www.investmentmath.com/ensae/2015/11/14/complete-dyn.htmlUsing Jupyter notebooks<p><em>This post explains how to use the IPython/Jupyter notebooks which are provided in this blog through Github. The notebooks can easily be uploaded on a personal Sagemathcloud account. This avoids having to install a local implementation of Jupyter.</em></p>
<hr />
<h2 id="ipyhtonjupyter-notebooks-github-and-sagemathcloud">IPyhton/Jupyter notebooks, Github and Sagemathcloud</h2>
<p>Python has become a credible option for scientific programming. Resources on the use of python in the economic context can be found <a href="http://www.kevinsheppard.com/Python_for_Econometrics">here</a>.</p>
<p>Notebooks are a convenient way of using Python in education/teaching contexts. Notebooks provide a webbased programming environment. It relies on IPython, which has very recently morphed into the Jupyter project (see <a href="http://jupyter.readthedocs.org/">here</a>). Notebooks allow to mix code, illustrations, latex commands, html, markdown… One can find interesting resources and notebook examples <a href="https://github.com/ipython/ipython/wiki/A-gallery-of-interesting-IPython-Notebooks">here</a>.</p>
<p>The notebooks referenced in this blog are posted on Github which has been recently updated to allow notebook visualization. Notebooks can be downloaded locally from Gihub by the readers of this blog. What is then required to use the notebooks is a Jupyter environment.</p>
<p>I recommend <a href="https://cloud.sagemath.com/">Sagemathcloud</a> as a webbased platform to run Jupyter notebooks. An account needs to be created. Once this is done, a project has to be added. A Jupyter notebook can then be created or uploaded. The notebook can then be run and amended.</p>
Sat, 17 Oct 2015 00:00:00 +0200
https://www.investmentmath.com/ensae/2015/10/17/ipython.html
https://www.investmentmath.com/ensae/2015/10/17/ipython.html