InvestmentMathMaths for Portfolio Management
https://www.investmentmath.com/
The 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.htmlExercises<p><em>This post collects exercises for the ENSAE course. See <a href="/ensae/2015/12/12/solexercises.html">this post</a> for the solutions.</em></p>
<hr />
<h2 id="mean-variance">Mean-Variance</h2>
<h3 id="exercise-1.1">Exercise 1.1</h3>
<p>Take the CARA normal set up (see <a href="/ensae/2014/10/07/static.html">this post</a>) without labour income. Assume that there is no riskless asset.</p>
<ol type="1">
<li><p>Solve the unconstrained optimization problem (no budget constraint). What is odd about the quadratic utility function?</p></li>
<li><p>Solve the constrained optimization problem (i.e. including the budget constraint).</p></li>
<li><p>Compare the two solutions, concentrating on the achieved utility level. Why is the investor in 2. frustrated for high levels of wealth.</p></li>
<li><p>Suppose now that we have a riskless asset. How does that affect the paradox identified in question 3 ?</p></li>
</ol>
<h3 id="exercise-1.2">Exercise 1.2</h3>
<p>See <a href="https://github.com/investmentmath/ENSAE/blob/master/efffront_exercise.ipynb">here</a> for the corresponding Jupyter/IPython notebook. See also <a href="/ensae/2015/10/17/ipython.html">this post</a> for some indications on how to use this resource.</p>
<p>We consider an investment universe comprising three assets, cash, a bond and equities. The cash rate is <span class="math inline">\(r^{f}=2\%\)</span>. The volatility of bonds is <span class="math inline">\(\sigma_{b}=7\%\)</span>, that of equities is <span class="math inline">\(\sigma_{e}=25\%\)</span>. The Sharpe ratio of bonds is assumed to be very low at <span class="math inline">\(0.05\)</span> and that of equities is chosen to be <span class="math inline">\(0.25\)</span>. Finally, the correlation of bonds and equities is assumed negative, at <span class="math inline">\(-0.2\)</span>. Thus bonds generate low returns, but they have hedging properties against equities (bonds tend to make gains when equities make losses).</p>
<ol type="1">
<li><p>Solve for the efficient frontier of the risky assets. Compute the minimum variance portfolio and its volatility.</p></li>
<li><p>Determine the efficient frontier for the whole universe of assets. Compute the tangent portfolio, its volatility and its Sharpe ratio.</p></li>
<li><p>We consider the following utility functions: <span class="math display">\[r^{f}+\pi'(\mu-r^{f}e)-\frac{\rho}{2}\pi'\Sigma \pi.\]</span> To what value <span class="math inline">\(\rho_{\star}\)</span> does the tangent portfolio correspond ?</p></li>
<li><p>We consider two other values for <span class="math inline">\(\rho\)</span>, namely <span class="math inline">\(\rho_{l}=(3/5)*\rho_{\star}\)</span> and <span class="math inline">\(\rho_{h}=1.5\rho_{\star}\)</span>. Compute the corresponding portfolios and their volatilities.</p></li>
<li><p>Show that the bond to equities proportion is constant along the efficient frontier. Suppose we added a no borrowing constraint. How would that constraint affect the high risk portfolio ?</p></li>
<li><p>Most financial advisors propose ranges of multi-asset portfolios which contain no cash. In particular a ‘safe’ portfolio containing <span class="math inline">\(20\%\)</span> equities would typically have <span class="math inline">\(80\%\)</span> in bonds. What conditions concerning bonds’ expected returns would be required for such portfolios to be on the efficient frontier ?</p></li>
</ol>
<h3 id="exercise-1.3">Exercise 1.3</h3>
<p>In the previous exercise, we mention the possibility of adding a ‘no borrowing constraint’ to the initial mean-variance setup. This says that all portfolio weights should be positive. Solving such problems requires the use of quadratic programming techniques. The following <a href="https://github.com/investmentmath/ENSAE/blob/master/usingcvxopt.ipynb">notebook</a> uses this <a href="http://cvxopt.org/">package</a> to deal with this.</p>
<h3 id="exercise-1.4">Exercise 1.4</h3>
<p>The context is that studied in the section on mean variance efficiency with a riskless asset (see <a href="/ensae/2014/10/07/static.html">this post</a>). We consider an investor with the following utility function: <span class="math display">\[r^{f}+\pi'(\mu-r^{f}e)-\frac{\rho}{2}\pi'\Sigma \pi.\]</span></p>
<ol type="1">
<li><p>Give the first order condition statisfied by the vector of risky asset positions. Derive a relationship relating the volatility of the optimal portfolio and its Sharpe ratio.</p></li>
<li><p>How does the risk budget consumed by the investor change with the Sharpe ratio of the tangent portfolio ? Describe the shape of the locus (in the mean standard-deviation space) of optimal portfolios (for our investor) as a function of the Sharpe ratio of the tangent portfolio.</p></li>
</ol>
<h2 id="dynamics-discrete-time">Dynamics, discrete time</h2>
<h3 id="exercise-2.1">Exercise 2.1</h3>
<p>We consider the discrete time optmization problem with no interim consumption, CRRA terminal utility (date <span class="math inline">\(T\)</span>) of wealth with <span class="math inline">\(\rho > 1\)</span>, no consumption and no income and finally i.i.d. returns (this is the first example of the course). The command is the set of portfolio proportions <span class="math inline">\(\pi_{t}\)</span> at each date <span class="math inline">\(t\)</span>. We assume that there is a portfolio such that: <span class="math display">\[E\left[\frac{(\pi'R)^{1-\rho}}{1-\rho}\right]>-\infty,\]</span> and in particular almost surely: <span class="math display">\[(\pi'R)^{1-\rho}>0.\]</span></p>
<ol type="1">
<li><p>Write the optimization program as of date <span class="math inline">\(t\)</span> for a given initial wealth <span class="math inline">\(w_{t}\)</span>.</p></li>
<li><p>Consider the optimization program as of date <span class="math inline">\(T-1\)</span>, as a function of <span class="math inline">\(w_{T-1}\)</span>. Comment on the convexity/concavity of the objective function and that of the constraint. Describe the first order condition. Is it sufficient? We assume below that there is a solution.</p></li>
<li><p>Show that <span class="math inline">\(V_{T-1}(w)\)</span> is proportional to <span class="math inline">\(w^{1-\rho}\)</span>. Determine the constant of proportionality as a function of the optimal portfolio.</p></li>
<li><p>Solve for the value function and the optimal portfolio at any date <span class="math inline">\(t\)</span> by recurrence.</p></li>
<li><p>Does the optimal portfolio depend on the investment horizon? Why?</p></li>
</ol>
<h3 id="exercise-2.2">Exercise 2.2</h3>
<p>Take the same context as in 2.1, changing the utility function to log-utility. Solve the model following the same steps as above.</p>
<h3 id="exercise-2.3">Exercise 2.3</h3>
<p>We consider initially a two period framework. Investment takes place in date <span class="math inline">\(t=0\)</span> and utility of wealth is measured in <span class="math inline">\(t=1\)</span>. There are two assets, a riskless asset with return <span class="math inline">\(R^{f}\)</span> and a risky asset with return <span class="math inline">\(\tilde{R_{1}}\)</span>, <span class="math inline">\(E[\tilde{R}_{1}]=\mu_{1}\)</span>, <span class="math inline">\(\tilde{R}_{1} \geq 0\)</span> almost surely. We assume that the support of the distribution of <span class="math inline">\(\tilde{R}_{1}\)</span> is <span class="math inline">\(]0,+\infty[\)</span>. The investor maximizes the following utility function (<span class="math inline">\(\rho>1\)</span>): <span class="math display">\[E\left[\frac{\tilde{(w_{1}}-\underline{w}_{1})^{1-\rho}}{1-\rho}\right],\]</span> starting from an initial wealth <span class="math inline">\(w_{0}\)</span> to be invested in the two assets. The variable <span class="math inline">\(\underline{w}_{1}\)</span> is a floor the investor ascribes to wealth. We restrict the admissible portfolios to those which ensure that <span class="math inline">\(\tilde{w_{1}} \geq \underline{w}_{1}\)</span> almost surely.</p>
<ol type="1">
<li><p>Define the minimum wealth level <span class="math inline">\(\underline{w}_{0}\)</span> required to ensure that the set of admissible portfolios is not empty. We now assume <span class="math inline">\(w_{0} \geq \underline{w}_{0}\)</span> and we call <span class="math inline">\(w_{t}-\underline{w}_{t}\)</span> the surplus of date <span class="math inline">\(t\)</span> (<span class="math inline">\(t=0,1\)</span> at this stage).</p></li>
<li><p>Assume that at date <span class="math inline">\(0\)</span>, a fraction <span class="math inline">\(\pi_{0}\)</span> of the surplus is invested in the risky asset. Explain why <span class="math inline">\(\pi_{0}\)</span> should be lower than <span class="math inline">\(1\)</span> and greater than zero. Show that: <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>The value function, i.e. the utility level reached at the optimum is noted <span class="math inline">\(V_{0}(\cdot)\)</span> and should be seen as a function of the surplus. Show that this function is homogenous of degree <span class="math inline">\(1-\rho\)</span> and give the program that determines the optimal weight <span class="math inline">\(\pi^{\star}_{0}\)</span>.</p></li>
<li><p>Assume now that we have a whole sequence of dates <span class="math inline">\(t=0, 1,\ldots,T\)</span> with utility measured at date <span class="math inline">\(t\)</span>: <span class="math display">\[E\left[\frac{\tilde{(w_{T}}-\underline{w}_{T})^{1-\rho}}{1-\rho}\right].\]</span> Returns are as above, with a constant cash return and i.i.d. risky asset returns. Explain why the optimal investment <span class="math inline">\(\pi^{\star}_{t}\)</span> (<span class="math inline">\(t=0,\ldots,T-1\)</span>) is stationary in time.</p></li>
</ol>
<h3 id="exercise-2.4">Exercise 2.4</h3>
<p>We consider the discrete time program with i.i.d. returns and CRRA terminal utility of wealth (<span class="math inline">\(\rho>1\)</span>):<br />
<span class="math display">\[E_{t}\left[\frac{\tilde{w}_{T}^{1-\rho}}{1-\rho}\right],\]</span> as expected from date <span class="math inline">\(t\)</span>. Final wealth is required to be strictly positive. We have a riskless asset with return <span class="math inline">\(R^{f}\)</span> (constant across time), and a single risky asset with log-normal return <span class="math inline">\(\tilde{R}_{t+1}=\exp(\mu(\tilde{x}_{t})+\sigma \tilde{x}_{t+1})\)</span> where <span class="math inline">\((\tilde{x}_{t})\)</span> is a sequence of i.i.d. <span class="math inline">\({\cal N}(0,1)\)</span> variables.</p>
<p>As of date <span class="math inline">\(t\)</span>, the realization <span class="math inline">\(x_{t}\)</span> of <span class="math inline">\(\tilde{x}_{t}\)</span> is known. The return <span class="math inline">\(\tilde{R}_{t+1}\)</span> thus has a lognormal distribution <span class="math inline">\({\cal LN}(\mu(x_{t}),\sigma)\)</span>. We can write <span class="math inline">\(\mu(x_{t})=\mu_{t}\)</span>. We will assume the <span class="math inline">\(\mu(x)\)</span> is a monotonous function of <span class="math inline">\(x\)</span>. When <span class="math inline">\(\mu\)</span> is constant, the price of the risky asset follows a geometric random walk.</p>
<p>Wealth in date <span class="math inline">\(t\)</span> is denoted <span class="math inline">\(\tilde{w}_{t}\)</span> (random variable) or <span class="math inline">\(w_{t}\)</span>.</p>
<p>Remark: don’t hesitate to exchange derivation and integration in this problem.</p>
<ol type="1">
<li><p>State the optimization program to be solved at date <span class="math inline">\(T-1\)</span>, assuming that the command variable is the weight invested in the risky asset, <span class="math inline">\(\pi_{T-1}\)</span>.</p></li>
<li><p>Show that the derivative of the criterion to be maximized reads: <span class="math display">\[w_{T-1}^{1-\rho}E_{T-1}[(\tilde{R}_{T}-R^{f})(R^{f}+\pi(\tilde{R}_{T}-R^{f}))^{-\rho}].\]</span> In a similar way, show that the second derivative is negative and that therefore the function to be maximized is concave.</p></li>
<li><p>Why can we assume <span class="math inline">\(0 \leq \pi_{T-1} \leq 1\)</span> ? Show that the optimal quantity of risky assets is strictly positive when <span class="math inline">\(\exp(\mu_{T-1}+\sigma^{2}/2) > R^{f}\)</span>.</p></li>
<li><p>(Optional) Noting that the first order condition implies: <span class="math display">\[E_{T-1}[(\tilde{R}_{T}-R^{f})(wR^{f}+w\pi^{\star}(\tilde{R}_{T}-R^{f}))^{-\rho}]=0,\]</span> for all <span class="math inline">\(w>0\)</span>, establish: <span class="math display">\[\frac{\pi^{\star}}{R^{f}}=-\frac{E_{T-1}[(\tilde{R}_{T}-R^{f})(R^{f}+\pi^{\star}(\tilde{R}_{T}-R^{f}))^{-\rho-1}]}
{E_{T-1}[(\tilde{R}_{T}-R^{f})^{2}(R^{f}+\pi^{\star}(\tilde{R}_{T}-R^{f}))^{-\rho-1}]}.\]</span></p></li>
<li><p>(Optional) We consider an increase <span class="math inline">\(d\theta > 0\)</span> in the mean of the lognormal return <span class="math inline">\(\tilde{R}_{T}\)</span>. The new return is <span class="math inline">\(\tilde{R}_{T}+d\theta\)</span>. The induced change in the optimal position in the risky asset is <span class="math inline">\(d\pi^{\star}\)</span>. Show that the relationship between <span class="math inline">\(d\theta\)</span> and <span class="math inline">\(d\pi^{\star}\)</span> is: <span class="math display">\[\frac{d\pi^{\star}}{d\theta}=\frac{1}{\rho}\frac{E_{T-1}[(R^{f}+\pi(\tilde{R}_{T}-R^{f}))^{-\rho}]}
{E_{T-1}[(\tilde{R}_{T}-R^{f})^{2}(R^{f}+\pi(\tilde{R}_{T}-R^{f}))^{-\rho-1}]}+\frac{(\pi^{\star})^{2}}{1+R^{f}}.\]</span> Deduce that the demand in risky asset is increasing in <span class="math inline">\(d\theta\)</span>. Why can’t we conclude from this that an increase in <span class="math inline">\(\mu_{T-1}\)</span> increases the demand from the risky asset?</p></li>
<li><p>Show that the value function <span class="math inline">\(V_{T-1}(w_{T-1},x_{T-1})\)</span> can be written: <span class="math display">\[V_{T-1}(w_{T-1},x_{T-1})=\psi_{T-1}(x_{T-1})\frac{w_{T-1}^{1-\rho}}{1-\rho},\]</span> and give the expression for <span class="math inline">\(\psi_{T-1}(\cdot)\)</span> as a function of <span class="math inline">\(\pi_{T-1}^{\star}(x_{T-1})\)</span>. Note that <span class="math inline">\(\psi_{T-1}\)</span> is positive.</p></li>
<li><p>The derivative of the value function with <span class="math inline">\(V_{T-1}(w_{T-1},x_{T-1})\)</span> with respect to the parameter <span class="math inline">\(\mu_{T-1}(x_{T-1})\)</span> can be computed as if the optimal portfolio <span class="math inline">\(\pi_{T-1}^{\star}(\mu_{T-1})\)</span> was fixed (envelope theorem). Assuming one can exchange derivation and integration, show that <span class="math inline">\(\psi_{T-1}(x_{T-1})\)</span> is an increasing function of <span class="math inline">\(\mu_{T-1}(x_{T-1})\)</span>.</p></li>
</ol>
<p>Remark: if <span class="math inline">\(\mu(x)\)</span> is decreasing in <span class="math inline">\(x\)</span>, it means that a negative return shock enhances the prospective return. In that case, <span class="math inline">\(\psi(x)\)</span> is an increasing function of <span class="math inline">\(x\)</span>.</p>
<ol start="8" type="1">
<li><p>Define the optimization program as of date <span class="math inline">\(T-2\)</span> using the dynamic programming principle. Check that the function to be optimized is concave so that the optimization program is well defined.</p></li>
<li><p>(In progress) Derive the first order condition of this problem. Assuming that the sign of: <span class="math display">\[(1-\rho)\text{Cov}[\psi(\tilde{x}_{T-1}),(\tilde{R}_{T-1}-R^{f})(R^{f}+\pi(\tilde{R}_{T-1}-R^{f}))^{-\rho}],\]</span> is well defined uniformly in <span class="math inline">\(\pi\)</span> and reflecting the monotonicity in <span class="math inline">\(\psi(\cdot)\)</span>, discuss the impact of <span class="math inline">\(\psi(\cdot)\)</span> on the optimal investment level <span class="math inline">\(\pi^{\star}\)</span>.</p></li>
</ol>
<h2 id="dynamics-continuous-time">Dynamics continuous time</h2>
<h3 id="exercise-3.1">Exercise 3.1</h3>
<p>We consider a Brownian motion <span class="math inline">\((B_{t})_{[0,T]}\)</span> with its natural filtration <span class="math inline">\({\cal F}\)</span>. We are given a set of times dates <span class="math inline">\(0 \leq t_{1} < t_{2} < \cdots < t_{n+1} \leq T\)</span>. We consider a process <span class="math inline">\(h(t)=\sum_{i=1}^{n}F_{i}{\bf 1}_{(t_{i},t_{i+1}]}\)</span>, (<span class="math inline">\(h(t)=0\)</span> on <span class="math inline">\([0,t_{1}]\)</span>) where <span class="math inline">\(F_{i}\)</span> is <span class="math inline">\({\cal F}_{t_{i}}\)</span>-measurable.</p>
<p>The stochastic integral is, for <span class="math inline">\(t \in (t_{i},t_{i+1}]\)</span>: <span class="math display">\[M_{t}=\int_{0}^{t}h(u)dB_{u}=\sum_{j=1}^{i-1}F_{j}(B_{t_{j+1}}-B_{t_{j}})+F_{t_{i}}(B_{t}-B_{t_{i}}).\]</span></p>
<ol type="1">
<li><p>Show that for <span class="math inline">\(0 \leq t < t'\leq T\)</span>: <span class="math display">\[E_{t}[\int_{0}^{t'}h(u)dB_{u}]=\int_{0}^{t}h(u)dB_{u}.\]</span> Name this property.</p></li>
<li><p>Show that for <span class="math inline">\(0 \leq t \leq T\)</span>: <span class="math display">\[E_{0}\left[|\int_{0}^{t}h(u)dB_{u}|^{2}\right]=E_{0}\left[\int_{0}^{t}h(u)^{2}du\right].\]</span></p></li>
<li><p>The quadratic variation <span class="math inline">\([M]_{t}\)</span> of <span class="math inline">\(M_{t}\)</span> is defined as: <span class="math display">\[[M]_{t}=\int_{0}^{t}h(u)^{2}du.\]</span> Show that <span class="math inline">\(M_{t}^{2}-[M]_{t}\)</span> is a martingale.</p></li>
<li><p>What is the relationship between the variance of <span class="math inline">\(M_{t}\)</span> and its quadratic variation.</p></li>
</ol>
<h3 id="exercise-3.2">Exercise 3.2</h3>
<p>Consider a security which pays <span class="math inline">\(1\)</span> at date <span class="math inline">\(T\)</span>. Its price at date <span class="math inline">\(t\)</span> is <span class="math inline">\(P_{t}^{T}\)</span>. Assume the price follows the SDE: <span class="math display">\[\frac{dP_{t}^{T}}{P_{t}^{T}}=r_{t}dt+\sigma_{t}^{T}dB_{t},\]</span> where <span class="math inline">\((B_{t})\)</span> is a scalar Brownian motion.</p>
<ol type="1">
<li>Show that: <span class="math display">\[\exp\left(-\int_{0}^{t}r_{u}du\right)P_{t}^{T}\]</span> is a martingale.</li>
<li>Deduce the representation: <span class="math display">\[P_{t}^{T}=E_{t}\left[\exp\left(-\int_{t}^{T}r_{u}du\right)\right].\]</span></li>
</ol>
<p>Assume <span class="math inline">\((r_{t})\)</span> follows an Ornstein Uhlenbeck process: <span class="math display">\[dr_{t}=-\rho(r_{t}-\bar{r})dt+\sigma_{r}dB_{t}.\]</span></p>
<ol start="3" type="1">
<li><p>Prove that: <span class="math display">\[r_{t}-\bar{r}=(r_{0}-\bar{r})\exp(-\rho t)+\int_{0}^{t}\exp(-\rho (t-u))\sigma_{r} dB_{u}.\]</span></p></li>
<li><p>Prove that: <span class="math display">\[\int_{t}^{T}r_{u}du=\bar{r}(T-t)+(r_{t}-\bar{r})b(T-t)+\int_{t}^{T}b(T-u)\sigma_{r}dB_{u},\]</span> with: <span class="math display">\[b(h)=\frac{1-\exp(-\rho h)}{\rho}.\]</span></p></li>
<li><p>Prove that: <span class="math display">\[\int_{t}^{h}b(h-u)^{2}du=\frac{1}{\rho^{2}}\left[(h-t)-b(h-t)\right]-\frac{1}{2\rho}b(h-t)^{2}.\]</span></p></li>
<li><p>Compute the price <span class="math inline">\(P_{t}^{T}\)</span>.</p></li>
<li><p>Give its volatility.</p></li>
</ol>
<h3 id="exercise-3.3">Exercise 3.3</h3>
<p>The setup is that of the previous exercise. We now modify the diffusion followed by the price as follows: <span class="math display">\[\frac{dP_{t}^{T}}{P_{t}^{T}}=(r_{t}+\sigma_{t}^{T}\lambda)dt+\sigma_{t}^{T}dB_{t},\]</span> where <span class="math inline">\(\lambda\)</span> is a constant. We admit that we can find a new probability measure <span class="math inline">\(Q\)</span> (called the risk neutral measure) such that under this probability measure, <span class="math inline">\(dB_{t}=dB^{Q}_{t}-\lambda dt\)</span> and <span class="math inline">\((B^{Q}_{t})\)</span> is a Brownian motion.</p>
<ol type="1">
<li><p>Give the SDE followed by the price under the new probability measure as a function of <span class="math inline">\((B^{Q}_{t})\)</span>.</p></li>
<li><p>Determine the SDE followed by the cash rate as a function of <span class="math inline">\((B^{Q}_{t})\)</span>. What has changed ?</p></li>
<li><p>Explain how the steps carried out in the previous exercise can be carried out here reasoning under the risk neutral measure.</p></li>
<li><p>Give the price function and price volatility. What has changed versus the previous exercise.</p></li>
</ol>
<h3 id="exercise-3.4">Exercise 3.4</h3>
<p>Consider the familiar “budget” equation relating the value of a portfolio <span class="math inline">\(V_{\pi}\)</span> and the price of its constituents <span class="math inline">\(P_{i}\)</span>: <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> We assume prices and portfolio values are strictly positive. Take another asset price <span class="math inline">\(N_{t}\)</span> also assumed to be strictly positive. Take <span class="math inline">\(N_{t}\)</span> as the new numeraire and express values in terms of it: <span class="math display">\[\tilde{V}_{\pi,t}=\frac{V_{\pi,t}}{N_{t}},\]</span> <span class="math display">\[\tilde{P}_{i,t}=\frac{P_{i,t}}{N_{t}},\]</span> It is natural to expect the first “budget” equation to hold under the new numeraire.</p>
<ol type="1">
<li><p>Assume standard differential calculus applies to all quantities. Show that the above conjecture holds.</p></li>
<li><p>Same under Ito calculus.</p></li>
</ol>Thu, 15 Oct 2015 00:00:00 +0200
https://www.investmentmath.com/ensae/2015/10/15/exercises.html
https://www.investmentmath.com/ensae/2015/10/15/exercises.htmlAllocating risk across periods<p><em>In the cross section, portfolio returns are a weighted sum of securities’ returns. This opens up the door to diversification gains when returns are imperfectly correlated. Optimal diversification is reached when the independent underlying factors are weighted proportionately to their prospective Sharpe ratios. It is perhaps less well known that the same principle holds across periods. When returns are independent from one period to another (the benchmark case), efficiency requires that the risk budget be allocated proportionately to the prospective Sharpe ratio of the period. This leads to constant volatility strategies, when the portfolio’s Sharpe ratio is constant over time. Constant volatility strategies can be contrasted with policies which hold the weight of the risky asset constant. The latter are efficient when the incentive to invest is proportional to volatility. Choosing between the two types of policies requires an empirical investigation of the link between volatility and the prospective Sharpe ratio.</em></p>
<hr />
<h2 id="discrete-time">Discrete time</h2>
<p>In this paragraph, I consider an investor who has access to a risky asset and to cash. The risky asset provides a Sharpe ratio which I take to be constant <span class="math inline">\(\lambda>0\)</span> in a first step. I assume that its return distribution is lognormal, with volatility <span class="math inline">\(\sigma_{t}\)</span>. I assume volatility changes with time but is deterministic. I also assume that the cash rate <span class="math inline">\(r^{f}\)</span> is constant (this is just a simplification). The dynamics of the risky asset is spelled out in discrete time: <span class="math display">\[\frac{P_{t+1}}{P_{t}}=\exp(r^{f}+\sigma_{t+1}\lambda+\sigma_{t+1}\epsilon_{t+1}-\frac{1}{2}\sigma_{t+1}^{2}),\]</span> where the shocks <span class="math inline">\((\epsilon_{t})\)</span> are i.i.d., normally distributed <span class="math inline">\({\cal N}(0,1)\)</span>.</p>
<p>If the proportion allocated to the risky asset is <span class="math inline">\(\pi_{t}\)</span>, the portfolio return between date <span class="math inline">\(t\)</span> and date <span class="math inline">\(t+1\)</span> is: <span class="math display">\[\frac{W_{t+1}}{W_{t}}=\exp(r^{f}+\pi_{t}\sigma_{t+1}\lambda+\pi_{t}\sigma_{t+1}\epsilon_{t+1}-\frac{1}{2}\pi_{t}^{2}\sigma_{t+1}^{2}).\]</span> The cumulated change in wealth from date <span class="math inline">\(0\)</span> to date <span class="math inline">\(T\)</span> is: <span class="math display">\[\frac{W_{T}}{W_{0}}=\exp\left(r^{f}T+\sum_{k=0}^{T-1}\pi_{k}\sigma_{k+1}\lambda+\sum_{k=0}^{T-1}\pi_{k}\sigma_{k+1}\epsilon_{k+1}-\frac{1}{2}\sum_{k=0}^{T-1}\pi_{k}^{2}\sigma_{k+1}^{2}\right).\]</span></p>
<p>The expected cumulated change in wealth is: <span class="math display">\[E_{0}\left[\frac{W_{T}}{W_{0}}\right]=\exp\left(r^{f}T+\sum_{k=0}^{T-1}\pi_{k}\sigma_{k+1}\lambda\right),\]</span> since: <span class="math display">\[E_{t}\left[\exp\left(\sigma_{t+1}\epsilon_{t+1}-\frac{1}{2}\sigma_{t+1}^{2}\right)\right]=1,\]</span> and <span class="math inline">\(r^{f}\)</span>, <span class="math inline">\(\sigma_{t}\)</span> and <span class="math inline">\(\lambda\)</span> are deterministic. The variance of the cumulated return is that of the lognormal variable: <span class="math display">\[\exp\left(\sum_{k=0}^{T-1}\pi_{k}\sigma_{k+1}\epsilon_{k+1}-\frac{1}{2}\sum_{k=0}^{T-1}\pi_{k}^{2}\sigma_{k+1}^{2}\right).\]</span></p>
<p>In the context of a holding interval <span class="math inline">\([0,T]\)</span>, a portfolio will be efficient for a given expected return if it minimizes variance while controlling the return <span class="math inline">\(\mu_{p}\)</span>, i.e. (the factor <span class="math inline">\(1/2\)</span> is included to simplify the lagrangian): <span class="math display">\[\underset{(\pi_{k})_{k=0,\ldots,T-1}}{\text{min}} \; \frac{1}{2}\sum_{k=0}^{T-1}\pi_{k}^{2}\sigma_{k+1}^{2}\]</span> <span class="math display">\[\text{s.t.}: \;\; r^{f}+\sum_{k=0}^{T-1}\pi_{k}\sigma_{k+1}\lambda=\mu_{p}.\]</span> The expected return <span class="math inline">\(\mu_{p}\)</span> is assumed to exceed the cumulated cash return. The first order condition of this constrained optimization program is: <span class="math display">\[\pi_{k}\sigma_{k+1}=\gamma\lambda,\]</span> where <span class="math inline">\(\gamma\)</span> is a positive constant (<span class="math inline">\(\lambda>0)\)</span> i.e. the risk budget should be equal in all periods.</p>
<p>Given that the incentive to take risk is constant, risk is minimized when the risk budget is evenly spread across periods. This result is the counterpart in the time dimension of the cross sectional rule that says that if the covariance matrix is diagonal and Sharpe ratios equal across securities, risk budgets should be equalized. The constrained optimization problem has exactly the same form as above in this case.</p>
<p>It is easy to introduce a time varying deterministic Sharpe ratio, in which case the condition becomes: <span class="math display">\[\pi_{k}\sigma_{k+1}=\gamma\lambda_{k},\]</span> where <span class="math inline">\(\lambda_{k}\)</span> is the incentive to take exposure to the shock <span class="math inline">\(\epsilon_{k+1}\)</span>. It is useful to think of this equation as saying that the investment policy is such that the sensitivities to the shocks are proportional (with a common constant of proportionality) to the Sharpe ratio of each shock.</p>
<p>We have thus seen that efficiency in the time dimension can be analyzed as efficiency in the cross sectional dimension, provided the covariance matrix is properly mapped from one problem to another. We now want to mix the time and cross sectional dimensions in a single problem. To be able to do so, we have to move to continuous time.</p>
<h2 id="continuous-time">Continuous time</h2>
<p>The weighted average of two lognormal processes is not a lognormal process (unless one of them is constant, as above). As a consequence, we cannot introduce several risky assets and preserve log-normality. In continuous time, this problem disappears. We can thus consider a set of <span class="math inline">\(N\)</span> risky assets following diffusion processes: <span class="math display">\[\frac{dP_{i,t}}{P_{i,t}}=r^{f}dt+\sigma_{i,t}\lambda_{t}+\sigma_{i,t}dB_{t}.\]</span> We have an <span class="math inline">\(N\)</span> dimensional Brownian motion <span class="math inline">\((B_{t})\)</span> with covariance matrix equal to the identity and <span class="math inline">\(\sigma_{i,t}\)</span> is an <span class="math inline">\((1,N)\)</span> matrix os sensitivities. The <span class="math inline">\((N,N)\)</span> matrix <span class="math inline">\(\sigma_{t}\)</span> obtained by stacking the rows <span class="math inline">\((1,N)\)</span> is assumed to be invertible. It is such that <span class="math inline">\(\Sigma_{t}=\sigma_{t}^{\prime}\sigma_{t}\)</span> is the covariance matrix of the risky assets. All quantities above are assumed to be deterministic.</p>
<p>If <span class="math inline">\(\pi_{t}\)</span> is the <span class="math inline">\((N,1)\)</span> vector of risky asset weights, the wealth process is such that: <span class="math display">\[\frac{W_{T}}{W_{0}}=\exp\left(r^{f}T+\int_{0}^{T}\pi_{u}'\sigma_{u}\lambda_{u} du+\int_{0}^{T}\pi_{u}'\sigma_{u}dB_{u}-\frac{1}{2}\int_{0}^{T}\pi_{u}'\Sigma_{u}\pi_{u}du\right).\]</span></p>
<p>As in the discrete time case, the expected cumulated return is: <span class="math display">\[E_{0}\left[\frac{W_{T}}{W_{0}}\right]=\exp\left(r^{f}T+\int_{0}^{T}\pi_{u}'\sigma_{u}\lambda_{u} du\right).\]</span> The variance of the cumulated return is that of the lognormal variable: <span class="math display">\[\exp\left(\int_{0}^{T}\pi_{u}'\sigma_{u}dB_{u}-\frac{1}{2}\int_{0}^{T}\pi_{u}'\Sigma_{u}\pi_{u}du\right).\]</span> Efficient portfolios can be found through solving: <span class="math display">\[\underset{(\pi_{u})_{u \in [0,T]}}{\text{min}} \; \frac{1}{2}\int_{0}^{T}\pi_{u}'\Sigma_{u}\pi_{u}du\]</span> <span class="math display">\[\text{s.t.}: \;\; \int_{0}^{T}\pi_{u}'\sigma_{u}\lambda_{u} du=\mu_{p}.\]</span></p>
<p>No constraints apply to the collection of risky asset portfolios. The first order condition of the problem is: <span class="math display">\[\Sigma_{u}\pi_{u}=\gamma\sigma_{u}\lambda_{u},\]</span> or multiplying by <span class="math inline">\(\sigma_{u}^{-1}\)</span> on both sides: <span class="math display">\[\sigma_{u}'\pi_{u}=\gamma\lambda_{u}.\]</span> This condition entails <span class="math inline">\(N\)</span> equations, one for each component of the Brownian motion. Each equation stipulates that at a given point in time, the sensitivity to the infinitesimal shock over the next infinitesimal period is proportionate to its specific Sharpe ratio. However, these conditions also hold across periods with the same constant of proportionality.</p>
<p>There is thus one single proportionality condition in the cross sectional and in the time dimension, once the shocks affecting the portfolio are arranged so as to form an orthogonal set. In our case, the different Brownian motions are orthogonal to one another and of course, increments of the Brownian motions pertaining to different time intervals are orthogonal as well. Variance is naturally additive in the time dimension. It is additive in the cross sectional dimension as well if one works with orthogonal factors as opposed to the original correlated assets.</p>
<p>Finally, let’s just note that: <span class="math display">\[\Sigma_{u}\pi_{u}=\gamma\sigma_{u}\lambda_{u},\]</span> implies: <span class="math display">\[\sqrt{\pi_{u}'\Sigma_{u}\pi_{u}}=\gamma\frac{\pi_{u}'\sigma_{u}\lambda_{u}}{\sqrt{\pi_{u}'\Sigma_{u}\pi_{u}}},\]</span> or: <span class="math display">\[\sigma_{p,u}=\gamma\lambda_{p,u}.\]</span> This gives the relationship between portfolio risk and its prospective Sharpe ratio.</p>
<h2 id="constant-volatility-strategies-and-constant-proportion-strategies">Constant volatility strategies and constant proportion strategies</h2>
<p>Constant volatility strategies (CVS) obtain from the above analysis when the portfolio’s prospective Sharpe ratio is constant over time. Constant volatility strategies rebalance so as to keep their risk budget constant. This is a response to constant incentives to invest. The relevance of constant volatility strategies hinges on the assumption of a constant incentive to invest. It is clear that if volatility and expected returns do not move in locksteps so as to keep the prospective Sharpe ratio constant, they lose their relevance.</p>
<p>Constant volatility strategies are an alternative to strategies which hold the risky asset weight constant. The risk budget consumed by the constant asset weight strategy (CAWS) is <span class="math inline">\(\omega \sigma_{t}\)</span> where <span class="math inline">\(\omega\)</span> is the chosen proportion. CAWS is efficient if the prospective Sharpe ratio is proportional to volatility.</p>
<p>In the end, choosing between CVS and CAWS requires an empirical investigation of the correlation between the prospective Sharpe ratio and volatility.</p>Wed, 11 Mar 2015 00:00:00 +0100
https://www.investmentmath.com/finance/2015/03/11/time-diversification.html
https://www.investmentmath.com/finance/2015/03/11/time-diversification.htmlSolution of the Exam (2015)<p><em>This is the solution of the exam for the 2015 ensae course.</em></p>
<hr />
<h2 id="exercise-1">Exercise 1</h2>
<h3 id="part-1">Part 1</h3>
<ol type="1">
<li><span class="math inline">\(\sum_{i=1}^{N} \pi_{i}=1.\)</span></li>
<li><span class="math inline">\(W_{1}=W_{0}R_{p}\)</span> with <span class="math inline">\(R_{p}=\sum_{i=1}^{N}\pi_{i}R_{i}\)</span> or <span class="math inline">\(r_{p}=\sum_{i=1}^{N}\pi_{i}r_{i}\)</span>.</li>
<li><span class="math inline">\(\mu_{p}=\sum_{i=1}^{N}\pi_{i}\mu_{i}=\pi'\mu\)</span> and <span class="math inline">\(\sigma^{2}_{p}=\pi'\Sigma\pi\)</span>.</li>
<li><span class="math display">\[ \underset{\pi}{\text{min}} \; \pi'\Sigma\pi\]</span> <span class="math display">\[\text{s.t.}: \;\; \pi'e=1.\]</span> Lagrangian: <span class="math inline">\(\frac{1}{2}\pi'\Sigma\pi-\gamma (\pi'e-1)\)</span>. First order condition: <span class="math inline">\(\Sigma \pi^{1}=\gamma e\)</span>. Value of the Lagrange multiplier and solution: <span class="math display">\[\gamma =\frac{1}{e'\Sigma e},\; \pi^{1}=\frac{\Sigma^{-1}e}{e'\Sigma e}.\]</span> All risky asset portfolios which are efficient must have a rate of return in excess of: <span class="math display">\[\mu^{1}=\frac{\mu'\Sigma^{-1}e}{e'\Sigma e}=\frac{e'\Sigma^{-1}\mu}{e'\Sigma e}.\]</span></li>
<li><span class="math display">\[ \underset{\pi}{\text{min}} \; \pi'\Sigma\pi\]</span> <span class="math display">\[\text{s.t.}: \;\; \pi'e=1,\; \pi'\mu=\mu_{p}.\]</span> Lagrangian: <span class="math inline">\(\frac{1}{2}\pi'\Sigma\pi-\gamma (\pi'e-1)-\delta (\pi'\mu-\mu_{p})\)</span>. First order condition: <span class="math inline">\(\Sigma \pi^{p}=\gamma e+\delta \mu\)</span> or <span class="math inline">\(\pi^{p}=\gamma \Sigma^{-1}e+\delta\Sigma^{-1}\mu\)</span>. The linear system which determines the multipliers comprises two equations which correspond to the constraints in which the value of <span class="math inline">\(\pi^{p}\)</span> has been injected: <span class="math display">\[\delta \mu' \Sigma^{-1}\mu+\gamma \mu' \Sigma^{-1}e=\mu_{p},\]</span> <span class="math display">\[\delta e'\Sigma^{-1}\mu+\gamma e'\Sigma^{-1}e=1.\]</span></li>
<li>The determinant of the linear system is: <span class="math inline">\((\mu'\Sigma^{-1}\mu)(e'\Sigma^{-1}e)-(\mu'\Sigma^{-1}e)^{2}\)</span>. Under the conditions quoted in the text, it is strictly positive.</li>
<li>The linear system has a unique solution for each <span class="math inline">\(\mu_{p}\)</span>. If <span class="math inline">\(\gamma\)</span> is zero, we must have <span class="math inline">\(\delta=\frac{1}{e'\Sigma^{-1}\mu}\)</span>. As a consequence: <span class="math display">\[\mu^{\mu}=\frac{\mu'\Sigma^{-1}\mu}{e'\Sigma^{-1}\mu}.\]</span> We have: <span class="math display">\[\pi^{\mu}=\frac{\Sigma^{-1}\mu}{e'\Sigma^{-1}\mu}.\]</span></li>
<li>The formula for <span class="math inline">\(\pi^{p}\)</span> can be written: <span class="math display">\[\gamma (e'\Sigma^{-1}e) \frac{\Sigma^{-1}e}{e'\Sigma^{-1}e}+\delta (\mu'\Sigma^{-1}\mu)\frac{\Sigma^{-1}\mu}{\mu'\Sigma^{-1}\mu}.\]</span> Thus: <span class="math display">\[\gamma (e'\Sigma^{-1}e) \pi^{1}+\delta (\mu'\Sigma^{-1}\mu)\pi^{\mu}.\]</span> We have: <span class="math display">\[\gamma (e'\Sigma^{-1}e)+\delta (\mu'\Sigma^{-1}\mu)=\lambda+(1-\lambda)=1,\]</span> from the linear system, using <span class="math inline">\(\lambda=\gamma (e'\Sigma^{-1}e)\)</span>. When the required rate of return increases from <span class="math inline">\(\mu^{1}\)</span> to <span class="math inline">\(\mu^{\mu}\)</span>, <span class="math inline">\(\lambda\)</span> decreases from <span class="math inline">\(1\)</span> to <span class="math inline">\(0\)</span>. The Lagrange multiplier of the budget constraint decreases until it reaches <span class="math inline">\(0\)</span>. When the required rate of return exceeds <span class="math inline">\(\mu^{\mu}\)</span>, the solution consists in selling the minimum variance portfolio so as to leverage <span class="math inline">\(\pi^{\mu}\)</span>. The Lagrange mutliplier of the budget constraint measures the price of the constraint. The price is high for the minimum variance portfolio because lowering the sum of weights below one would obviously allow to lower the variance further. When a rate of return constraint is imposed (<span class="math inline">\(\mu_{p}>\mu^{1}\)</span>), the latter constraint prevents from lowering the variance. The price of the budget constraint comes down.</li>
<li>The linear system delivers the Lagrange multipliers as a function of <span class="math inline">\(A=\mu'\Sigma^{-1}\mu,B=\mu'\Sigma^{-1}e,C=e'\Sigma^{-1}e\)</span>: <span class="math display">\[\sigma_{p}^{2}=\frac{A-2B\mu_{p}+C\mu_{p}^{2}}{AC-B^2}.\]</span> The efficient frontier is the trace in the half plane <span class="math inline">\(\sigma_{p}>0\)</span> of the geometric locus of the quadratic equation: <span class="math display">\[C\mu_{p}^{2}-(AC-B^2)\sigma_{p}^{2}-2B\mu_{p}+A=0.\]</span> This defines a hyperbola (see conic sections).</li>
<li>Two distinct efficient portfolios: <span class="math display">\[\pi_{p_{1}}=\lambda_{p_{1}}\pi^{1}+(1-\lambda_{p_{1}})\pi^{\mu},\]</span> <span class="math display">\[\pi_{p_{2}}=\lambda_{p_{2}}\pi^{1}+(1-\lambda_{p_{2}})\pi^{\mu}.\]</span> The matrix that maps <span class="math inline">\(\pi^{1}\)</span> and <span class="math inline">\(\pi^{\mu}\)</span> to the new efficient portfolios is invertible as soon as <span class="math inline">\(\lambda_{p_{1}} \neq \lambda_{p_{2}}\)</span>.</li>
</ol>
<h3 id="part-2">Part 2</h3>
<ol start="10" type="1">
<li><p>The Sharpe ratio of a portfolio is inherited from the risky asset subportfolio. Take two portfolios. They have risky asset subportfolios. If the two subportfolios are proportional to one another, the original portfolios have the same Sharpe ratio. Indeed, the Sharpe ratio of a portfolio <span class="math inline">\((\pi_{0},\pi)\)</span> satisfies: <span class="math display">\[\frac{\pi'(\mu-r^{f})}{Vol(\pi'\tilde{r})}=\frac{\theta\pi'(\mu-r^{f})}{Vol(\theta\pi'\tilde{r})},\]</span> for any real number <span class="math inline">\(\theta>0\)</span>. By adjusting the cash level and changing in a proportionate way the risky asset portfolio (so as to preserve <span class="math inline">\(\pi_{0}+e'\pi=1\)</span>), one can reach any level of volatility without changing the Sharpe ratio of the initial portfolio. One can thus ‘port’ a given Sharpe ratio over the whole volatility range. Thus, starting from two portfolios, <span class="math inline">\(P_{1}\)</span> and $P_{2} $with distinct Sharpe ratios, we can choose the one with the highest Sharpe ratio (say <span class="math inline">\(P_{1}\)</span>), adjust its cash holding and risky asset subportfolio (in a proportionate way) so as to build a new portfolio which matches the volatility of <span class="math inline">\(P_{2}\)</span>, and has the Sharpe ratio of <span class="math inline">\(P_{1}\)</span>. Thus <span class="math inline">\(P_{2}\)</span> cannot be mean variant efficient if it has a Sharpe ratio that is strictly lower that that of <span class="math inline">\(P_{1}\)</span>. From a geometric standpoint, the efficient frontier is a half-line in the standard deviation/expected return space. It goes through the point <span class="math inline">\((0,r^{f})\)</span> and through a point on the risky asset efficient frontier.</p></li>
<li><p>Consider the half-lines which satisfy the criteria established in the previous questions. These half-lines can be ordered because for any pair of such distinct half-lines, one is necessarily above the other. The ranking metric is the Sharpe ratio. The upper enveloppe of the set of half-lines is the efficient frontier <span class="math inline">\({\cal F}\)</span>. It is necessarily tangent to the risky asset efficient frontier <span class="math inline">\({\cal E}\)</span>. To see this, one has to realize that the efficient frontier <span class="math inline">\({\cal E}\)</span> is vertical at <span class="math inline">\((\mu^{1},\sigma^{1})\)</span>, that it is concave: its slope in the <span class="math inline">\((\sigma,\mu)\)</span> space is decreasing in <span class="math inline">\(\sigma\)</span>; finally this slope converges to zero asymptotically. In this configuration, the half-line which maximizes the Sharpe ratio has to intersect the efficient frontier <span class="math inline">\(\cal{E}\)</span> at an ‘interior’ point, at a point with volatility <span class="math inline">\(\sigma\)</span> satisfying <span class="math inline">\(\sigma^{1}<\sigma<\infty\)</span>.</p></li>
<li>The optimization program reads: <span class="math display">\[ \underset{\pi}{\text{min}} \; \pi'\Sigma\pi\]</span> <span class="math display">\[\text{s.t.}: \;\; \pi_{0}+\pi'e=1,\; \pi'(\mu-r^{f})=\mu_{p}-r^{f}.\]</span> This is equivalent to: <span class="math inline">\({\cal P}(\mu_{p}-r^{f})\)</span>: <span class="math display">\[ \underset{\pi}{\text{min}} \; \pi'\Sigma\pi\]</span> <span class="math display">\[\text{s.t.}: \;\; \pi'(\mu-r^{f})=\mu_{p}-r^{f},\]</span> imposing <span class="math inline">\(\pi_{0}=1-\pi'e\)</span>.</li>
<li><p>If <span class="math inline">\(\pi\)</span> is a portfolio that satisfies the contraint <span class="math inline">\(\pi'(\mu-r^{f})=\mu_{p,1}-r^{f}\)</span>, <span class="math inline">\(\hat{\pi}=\theta\pi\)</span> with <span class="math inline">\(\theta=(\mu_{p,2}-r^{f})/(\mu_{p,1}-r^{f})\)</span> satisfies <span class="math inline">\(\hat{\pi}'(\mu-r^{f})=\mu_{p,2}-r^{f}\)</span>. <span class="math inline">\({\cal P}(\mu_{p,1}-r^{f})\)</span> can be written: <span class="math display">\[ \underset{\pi}{\text{min}} \; \theta^{2}\pi'\Sigma\pi\]</span> <span class="math display">\[\text{s.t.}: \;\; \pi'(\mu-r^{f})=\mu_{p,1}-r^{f},\]</span> since <span class="math inline">\(\theta\)</span> is a constant. Thanks to this transformation, this program becomes: <span class="math display">\[ \underset{\hat{\pi}}{\text{min}} \; \hat{\pi}'\Sigma\hat{\pi}\]</span> <span class="math display">\[\text{s.t.}: \;\; \hat{\pi}'(\mu-r^{f})=\mu_{p,2}-r^{f},\]</span> which is just <span class="math inline">\({\cal P}(\mu_{p,2}-r^{f})\)</span>. Thus if <span class="math inline">\(\pi^{*}\)</span> is the solution of <span class="math inline">\({\cal P}(\mu_{p,1}-r^{f})\)</span>, <span class="math inline">\(\theta\pi^{*}\)</span> is the solution of <span class="math inline">\({\cal P}(\mu_{p,2}-r^{f})\)</span>. This works backwards as well. If the two corresponding optimal portfolios are proportional via <span class="math inline">\(\theta\)</span>, their excess-returns and their volatility are both multiplied by the same factor. As a consequence, the Sharpe ratio is conserved. It is maximized at the optimum since the program minimizes variance and thus volatility for a given excess return. The programs <span class="math inline">\({\cal P}\)</span> identify the unique portfolio of maximum Sharpe ratio. This portfolio corresponds to point <span class="math inline">\(I\)</span>.</p></li>
</ol>
<h2 id="exercise-2">Exercise 2</h2>
<ol type="1">
<li><p>I assume <span class="math inline">\(\gamma<>1\)</span>, the log case being very similar. The dynamics of the wealth process is: <span class="math display">\[\frac{dW_{u}}{W_{u}}=r^{f}du+\pi_{u}'(\mu-r^{f}e)du+\pi_{u}'\sigma dB_{u}.\]</span> It is a geometric process. If <span class="math inline">\(W_{t}\)</span> is multiplied by <span class="math inline">\(\theta\)</span>, the value of <span class="math inline">\(W_{T}\)</span> is multiplied by <span class="math inline">\(\theta\)</span> as well <strong>for any trajectory of the Brownian motion and all portfolio choices</strong> <span class="math inline">\(\pi_{[t,T]}\)</span>. The criterion to be maximized for the starting point <span class="math inline">\(\hat{W_{t}}=\theta W_{t}\)</span> is thus <span class="math inline">\(E_{t}[u(\theta W_{T})]=\theta^{1-\gamma}E_{t}[u(W_{T})]\)</span> for <span class="math inline">\(\gamma\neq 1\)</span>. The investment process that is optimal for <span class="math inline">\(W_{t}\)</span> still is for the initial condition <span class="math inline">\(\hat{W_{t}}\)</span> and <span class="math inline">\(V(t,\hat{W_{t}})=\theta^{1-\gamma}V(t,W_{t})\)</span>.</p></li>
<li><p>We have: <span class="math display">\[V(t+\Delta,W_{t+\Delta})-V(t,W_{t})=\]</span> <span class="math display">\[\int_{t}^{t+\Delta}[V_{1}(u,W_{u})du+V_{2}(u,W_{u})dB_{u}]+\frac{1}{2}\int_{t}^{t+\Delta}V_{2,2}(u,W_{u})d[B]_{t}.\]</span> Taking the expectation: <span class="math display">\[\int_{t}^{t+\Delta}[V_{1}(u,W_{u})du+V_{2}(u,W_{u})W_{u}(r^{f}du+\pi_{u}'(\mu-r^{f}e)du)]+\]</span> <span class="math display">\[\frac{1}{2}\int_{t}^{t+\Delta}V_{2,2}(u,W_{u})W_{u}^{2}
\pi_{u}'\Sigma\pi_{u}du.\]</span></p></li>
<li>We have: <span class="math display">\[ \underset{\pi_{t}}{\text{max}} \; \Big\{V_{1}(t,W_{t})+V_{2}(t,W_{t})W_{t}(r^{f}+\pi_{t}'(\mu-r^{f}e))+\frac{1}{2}V_{2,2}(t,W_{t})W_{t}^{2}
\pi_{t}'\Sigma\pi_{t}\Big\}=0.\]</span></li>
<li>The function to be maximized: <span class="math display">\[V_{2}(t,W_{t})W_{t}\pi_{t}'(\mu-r^{f}e)+\frac{1}{2}V_{2,2}(t,W_{t})W_{t}^{2}
\pi_{t}'\Sigma\pi_{t}.\]</span> Since <span class="math inline">\(V\)</span> is concave in <span class="math inline">\(W_{t}\)</span>, the second derivative is negative and the maximimum of the quadratic form is characterized by the first order condition: <span class="math display">\[\pi^{*}_{t}=-\frac{V_{2}(t,W_{t})}{W_{t}V_{2,2}(t,W_{t})}\Sigma^{-1}(\mu-r^{f}e).\]</span> Given question <span class="math inline">\(1\)</span>, on have: <span class="math display">\[-\frac{V_{2}(t,W_{t})}{W_{t}V_{2,2}(t,W_{t})}=\frac{1}{\gamma}.\]</span> The solution depends neither on <span class="math inline">\(t\)</span> nor on <span class="math inline">\(T\)</span>.</li>
<li>We have: <span class="math display">\[\Sigma \pi^{\star}=\frac{1}{\gamma}(\mu-r^{f}e),\]</span> which gives the first equation. We have as well: <span class="math display">\[\sigma\sigma'\pi^{\star}=\frac{1}{\gamma}(\mu-r^{f}e),\]</span> <span class="math display">\[\sigma'\pi^{\star}=\frac{1}{\gamma}\lambda,\]</span> <span class="math display">\[\pi^{\star\prime}\sigma=\frac{1}{\gamma}\lambda',\]</span> <span class="math display">\[\pi^{\star\prime}=\frac{1}{\gamma}\lambda'\sigma^{-1},\]</span> and this gives the second equation by multiplying by <span class="math inline">\((\mu-r^{f}e)\)</span> on the right.</li>
<li><span class="math display">\[d\log(W^{\gamma,\star}_{u})=r^{f}du+(1-\frac{1}{2\gamma})\frac{1}{\gamma}\kappa^{2}du+\frac{1}{\gamma}\lambda'dB_{u},\]</span> <span class="math display">\[W^{\gamma,\star}_{T}=W_{0}\exp\left(r^{f}T+(1-\frac{1}{2\gamma})\frac{1}{\gamma}\kappa^{2}T+\frac{1}{\gamma}\lambda'B_{T}\right).\]</span></li>
<li><span class="math display">\[\frac{\log(W^{\gamma,*}_{T})-\log(W_{1})}{T}=\]</span> <span class="math display">\[r^{f}+(1-\frac{1}{2\gamma})\frac{1}{\gamma}\kappa^{2}+\frac{1}{\gamma}\frac{\lambda'B_{T}}{T}.\]</span> The last term converges almost surely to <span class="math inline">\(0\)</span> when <span class="math inline">\(T\)</span> goes to <span class="math inline">\(+\infty\)</span> (law of large numbers). The asymptotic rate of log growth reads: <span class="math display">\[r^{f}+(1-\frac{1}{2\gamma})\frac{1}{\gamma}\kappa^{2}.\]</span> It increases as <span class="math inline">\(\gamma\)</span> rises up to <span class="math inline">\(1\)</span> and then decreases beyond that point.</li>
<li><p>For a finite <span class="math inline">\(T\)</span>, the level of risk taken enters the picture whereas it does not enter into account in the asymptotic ranking of growth. Preference for risk matters for finite <span class="math inline">\(T\)</span>. The maximum growth portfolio is not optimal for <span class="math inline">\(\gamma<>1\)</span>. For <span class="math inline">\(\gamma<1\)</span>, the investor likes risk so much that he finds the max growth portfolio too safe. The investor wants to gamble more. For <span class="math inline">\(\gamma>1\)</span>, the investor finds the max growth portfolio too risky.</p></li>
</ol>Sat, 31 Jan 2015 00:00:00 +0100
https://www.investmentmath.com/ensae/2015/01/31/solexam.html
https://www.investmentmath.com/ensae/2015/01/31/solexam.html