<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Win-Vector Blog &#187; Sharpe Ratio</title>
	<atom:link href="http://www.win-vector.com/blog/tag/sharpe-ratio/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.win-vector.com/blog</link>
	<description>The Applied Theorist&#039;s Point of View</description>
	<lastBuildDate>Thu, 29 Jul 2010 17:09:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>&#8220;Easy&#8221; Portfolio Allocation</title>
		<link>http://www.win-vector.com/blog/2010/01/easy-portfolio-allocation/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=easy-portfolio-allocation</link>
		<comments>http://www.win-vector.com/blog/2010/01/easy-portfolio-allocation/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 20:09:13 +0000</pubDate>
		<dc:creator>John Mount</dc:creator>
				<category><![CDATA[Finance]]></category>
		<category><![CDATA[Mathematics]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Lagrange Multipliers]]></category>
		<category><![CDATA[Mathematical Bedside Reading]]></category>
		<category><![CDATA[Portfolio Theory]]></category>
		<category><![CDATA[Sharpe Ratio]]></category>

		<guid isPermaLink="false">http://www.win-vector.com/blog/?p=1342</guid>
		<description><![CDATA[This is an elementary mathematical finance article. This means if you know some math (linear algebra, differential calculus) you can find a quick solution to a simple finance question. The topic was inspired by a recent article in The American Mathematical Monthly (Volume 117, Number 1 January 2010, pp. 3-26): &#8220;Find Good Bets in the [...]


Related posts:<ol><li><a href='http://www.win-vector.com/blog/2008/09/a-quick-appreciation-of-the-sharpe-ratio/' rel='bookmark' title='Permanent Link: A Quick Appreciation of the Sharpe Ratio'>A Quick Appreciation of the Sharpe Ratio</a></li>
<li><a href='http://www.win-vector.com/blog/2009/09/a-discrete-model-gauging-market-efficiency/' rel='bookmark' title='Permanent Link: A Discrete Model Gauging Market Efficiency'>A Discrete Model Gauging Market Efficiency</a></li>
<li><a href='http://www.win-vector.com/blog/2009/10/what-is-the-gamblers-equivalent-of-amdahls-law/' rel='bookmark' title='Permanent Link: What is the gambler&#8217;s equivalent of Amdahl&#8217;s Law?'>What is the gambler&#8217;s equivalent of Amdahl&#8217;s Law?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This is an elementary mathematical finance article. This means if you know some math (linear algebra, differential calculus) you can find a quick solution to a simple finance question. The topic was inspired by a recent article in The American Mathematical Monthly (Volume 117, Number 1 January 2010, pp. 3-26): &#8220;Find Good Bets in the Lottery, and Why You Shouldn&#8217;t Take Them&#8221; by Aaron Abrams and Skip Garibaldi which said optimal asset allocation is now an undergraduate exercise. That may well be, but there are a lot of people with very deep mathematical backgrounds that have yet to have seen this. We will fill in the details here. The style is terse, but the content should be about what you would expect from one day of lecture in a mathematical finance course.</p>
<p><span id="more-1342"></span></p>
<p>Portfolio allocation is not the &#8220;magic predict the future&#8221; part of finance, it is the scheme for correctly applying magic predictions of the future. The idea is that if you had an prediction of future returns of a number of assets, the naive thing to do would be to invest everything into the asset with highest predicted return. Portfolio theory, while still taking the predictions at face value, picks an investment pattern that will (in risk-adjusted dollars) outperform the naive strategy even if the predictions are correct and is a bit safer when the predictions are wrong.</p>
<p>Suppose you had <img width="14" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg1.png" alt="$ n$"> different assets you could invest in. For the <img width="10" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg2.png" alt="$ i$"> -th asset there is an expected excess relative return of <img width="19" height="28" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg3.png" alt="$ \mu_i$"> and an estimated variance of <img width="17" height="28" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg4.png" alt="$ s_i$"> (for a definition of relative return see <a href="http://www.win-vector.com/blog/2010/01/relative-returns-a-banker-versus-trader-paradox/">Relative returns: a banker versus trader paradox</a> and for a definition of variance see <a href="http://www.win-vector.com/blog/2008/09/a-quick-appreciation-of-the-sharpe-ratio/">A Quick Appreciation of the Sharpe Ratio</a>). Let the vector <img width="16" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg5.png" alt="$ w$"> be such that <img width="23" height="29" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg6.png" alt="$ X_i$"> represents the number of dollars we invest in the <img width="10" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg2.png" alt="$ i$"> -th asset. If <img width="23" height="29" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg6.png" alt="$ X_i$"> is positive then our plan is &#8220;to go long&#8221; or buy some of the <img width="10" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg2.png" alt="$ i$"> -th asset. If <img width="23" height="29" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg6.png" alt="$ X_i$"> is negative our plan is &#8220;to short&#8221; or sell some of the <img width="10" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg2.png" alt="$ i$"> -th asset to somebody else (It is called going short as we actually sell something we do not have. This is often allowed in finance; as long as we make the same pay-outs to the buyer that the buyer would receive if we really had the item to sell).</p>
<p>When we appeal to the idea of optimizing the portfolio Sharpe Ratio (again, see <a href="http://www.win-vector.com/blog/2008/09/a-quick-appreciation-of-the-sharpe-ratio/">A Quick Appreciation of the Sharpe Ratio</a>) then we say a good portfolio is one that doesn&#8217;t just maximize expected relative returns (which is <img width="39" height="34" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg11.png" alt="$ X^{\top} \mu$"> ) but maximizes the ratio of expected relative return to standard deviation:</p>
</p>
<div align="center"><img width="73" height="56" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg8.png" alt="$\displaystyle \frac{X^{\top} \mu}{\sqrt{X^{\top} C X}} $"></div>
<p>where (for now) <img width="17" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg9.png" alt="$ C$"> is the matrix <img width="30" height="17" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg10.png" alt="$ s s^{\top}$"> . This ratio is called a &#8220;risk adjusted return&#8221; (versus the un-adjusted form <img width="39" height="34" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg11.png" alt="$ X^{\top} \mu$"> ). Also notice that the ratio is homogeneous in <img width="19" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg12.png" alt="$ X$"> (doubling <img width="19" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg12.png" alt="$ X$"> does not change the ratio as it simultaneously doubles the numerator and the denominator) so an optimal solution <img width="19" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg12.png" alt="$ X$"> describes not how much to invest, but what pattern to invest in. This allows us to introduce an important practical constraint: we are only going to allow ourselves to risk a total of <img width="16" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg13.png" alt="$ T$"> dollars (both long and short). That is: we insist <img width="105" height="33" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg14.png" alt="$ \sum_{i=1}^{n} \vert X_i\vert = T$"> . We will ignore this total investment constraint until the end when we can satisfy the constraint by simply re-scaling an partial solution.</p>
<p>To solve for <img width="19" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg12.png" alt="$ X$"> we introduce an old friend: <a href="http://en.wikipedia.org/wiki/Lagrange_multipliers">Lagrange Multipliers</a> (or equivalently the Karush-Kuhn-Tucker conditions of optimality). Since the fraction we are trying to optimize is homogeneous in <img width="19" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg12.png" alt="$ X$"> we can convert the denominator into a constraint and arbitrarily insist that <img width="99" height="38" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg15.png" alt="$ \sqrt{X^{\top} C X} = 1$"> without changing the nature of the problem. We are now trying to maximize <img width="39" height="34" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg11.png" alt="$ X^{\top} \mu$"> subject to <img width="99" height="38" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg15.png" alt="$ \sqrt{X^{\top} C X} = 1$"> . The Lagrangian conditions of optimality state at the optimum we must have the gradient of the objective is proportional to the gradient of the constraint or:</p>
</p>
<div align="center"><img width="225" height="40" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg16.png" alt="$\displaystyle \nabla_X X^{\top} \mu = \lambda \nabla_X ( \sqrt{X^{\top} C X} - 1 ) $"></div>
<p>for some (to be determined) constant <img width="13" height="15" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg17.png" alt="$ \lambda$"> . Pushing the gradient operator through we get:</p>
<div align="center"><img width="213" height="37" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg18.png" alt="$\displaystyle \mu = \lambda (1/2) ( X^{\top} C X )^{-1/2} 2 C X . $"></div>
<p>A similar equation could be gotten by appealing to a Rayleigh Quotient argument.</p>
<p>We do not yet know <img width="19" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg12.png" alt="$ X$"> (that is what we are trying to solve for), so we do not know what <img width="56" height="17" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg19.png" alt="$ X^{\top} C X$"> is. However, this is just a scalar and since we are just trying to solve up to a multiple we can throw it out and introduce a new multiple and see that it is enough to solve:</p>
</p>
<div align="center"><img width="76" height="33" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg20.png" alt="$\displaystyle \mu = \lambda' C X $"></div>
<p>where <img width="18" height="16" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg21.png" alt="$ \lambda'$"> is new (still unknown) scalar. This means we have:</p>
<div align="center"><img width="121" height="35" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg22.png" alt="$\displaystyle X = (1/\lambda') C^{-1} \mu $"></div>
<p>so our desired solution is some re-scaling of <img width="43" height="33" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg23.png" alt="$ C^{-1} \mu$"> .</p>
<p>As we stated earlier we have a total investment constraint of <img width="105" height="33" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg14.png" alt="$ \sum_{i=1}^{n} \vert X_i\vert = T$"> . We can achieve this with the following adjusted solution:</p>
</p>
<div align="center"><img width="189" height="51" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg24.png" alt="$\displaystyle X = \frac{T}{\sum_{i=1}^{n} \vert(C^{-1} \mu)_i\vert} C^{-1} \mu $"></div>
<p>as our desired optimal portfolio allocation. In the end we can solve for the optimal portfolio by merely solving a linear system (we don&#8217;t need anything as expensive as a general purpose optimizer in this case).</p>
<p>These are very old results (going back as long as there has been Sharpe Ratios and portfolio theory). A good example reference is: &#8220;The Valuation of Risk Assets and the Selection of Risky Investments in Stock Portfolios and Capital Budgets,&#8221; John Lintner, The Review of Economics and Statistics (1965) vol. 47 (1) pp. 13-37. These results are the basis for advice like: &#8220;diversify.&#8221; Without modeling risk you would tend to put all of your money in the predicted highest paying asset. When modeling risk you tend to put some of your money in each high paying asset and as long as they do not all fail at the same time you have some safety. Another (very different) route to diversification is the Kelly Criterion (discussed in <a href="http://www.win-vector.com/blog/2009/10/what-is-the-gamblers-equivalent-of-amdahls-law/">What is the gambler&#8217;s equivalent of Amdahl&#8217;s Law?</a>).</p>
<p>A very important risk we have not yet modeled is that our assets may have a tendency to fail at the same time (meaning we may not have really diversified usefully). The notion of assets may fail at the same time brings us to the ideas of correlation and covariance. When we took <img width="64" height="17" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg25.png" alt="$ C = s s^{\top}$"> we were implicitly assuming (or modeling), without justification, that each possible asset was independent of all the others (that there was no correlation between asset returns). This is, of course, not going to be anywhere near true in practice. Instead we should take <img width="17" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg9.png" alt="$ C$"> to be the <a href="http://en.wikipedia.org/wiki/Covariance_matrix">Covariance Matrix</a> that represent our estimate of the assent to asset correlations. In this case the solution methods above all work exactly as before. Companies such as MSCI Barra have made complete businesses out of producing and selling estimates of <img width="17" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg9.png" alt="$ C$"> .</p>
<p>Another issue is when we do not allow ourselves to &#8220;short&#8221; (or take a negative allocation of) assets. In this case we have the additional constraints <img width="48" height="29" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg26.png" alt="$ X \ge 0$"> which complicates our solution. For the special case where the asset variances are assumed to be independent (i.e. <img width="64" height="17" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg25.png" alt="$ C = s s^{\top}$"> ) it is enough to solve as above and merely replace any negative allocations with zero when inspecting and scaling the final step of the solution. When the covariances are non-trivial (<img width="17" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg9.png" alt="$ C$"> has non-zero off-diagonal entries) this solution may not be optimal. In this case the Karush-Kuhn-Tucker conditions are more complicated and at the point of optimal solution we have the following conditions:</p>
<p></p>
<div align="center">
<table cellpadding="0" align="center">
<tr valign="middle">
<td nowrap align="right"><img width="145" height="60" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg27.png" alt="$\displaystyle \mu + \lambda C X - \sum_{i=1}^{n} \tau_i E^i$"></td>
<td width="10" align="center" nowrap><img width="17" height="28" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg28.png" alt="$\displaystyle =$"></td>
<td align="left" nowrap>0</td>
<td width="10" align="right">&nbsp;</td>
</tr>
<tr valign="middle">
<td nowrap align="right"><img width="19" height="29" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg29.png" alt="$\displaystyle X$"></td>
<td width="10" align="center" nowrap><img width="17" height="28" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg30.png" alt="$\displaystyle \ge$"></td>
<td align="left" nowrap>0</td>
<td width="10" align="right">&nbsp;</td>
</tr>
<tr valign="middle">
<td nowrap align="right"><img width="48" height="60" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg31.png" alt="$\displaystyle \sum_{i=1}^{n} X_i$"></td>
<td width="10" align="center" nowrap><img width="17" height="28" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg28.png" alt="$\displaystyle =$"></td>
<td align="left" nowrap><img width="16" height="29" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg32.png" alt="$\displaystyle T$"></td>
<td width="10" align="right">&nbsp;</td>
</tr>
<tr valign="middle">
<td nowrap align="right"><img width="13" height="28" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg33.png" alt="$\displaystyle \tau$"></td>
<td width="10" align="center" nowrap><img width="17" height="28" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg30.png" alt="$\displaystyle \ge$"></td>
<td align="left" nowrap>0</td>
<td width="10" align="right">&nbsp;</td>
</tr>
<tr valign="middle">
<td nowrap align="right"><img width="38" height="36" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg34.png" alt="$\displaystyle \tau^{\top} X$"></td>
<td width="10" align="center" nowrap><img width="17" height="28" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg28.png" alt="$\displaystyle =$"></td>
<td align="left" nowrap>0</td>
<td width="10" align="right">&nbsp;</td>
</tr>
</table>
</div>
<p><br clear="all"><br />
where <img width="19" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg12.png" alt="$ X$"> is the allocation vector we wish to solve for, <img width="13" height="15" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg17.png" alt="$ \lambda$"> is an unknown scalar, <img width="13" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg35.png" alt="$ \tau$"> is a new unknown vector and <img width="22" height="16" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg36.png" alt="$ E^i$"> is the vector with <img width="69" height="34" align="middle" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg37.png" alt="$ (E^i)_i = 1$"> and zeroes elsewhere. Using the Karush-Kuhn-Tucker conditions has allowed us to again almost linearize the problem, but we know have sign constraints on <img width="19" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg12.png" alt="$ X$"> and <img width="13" height="14" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg35.png" alt="$ \tau$"> and what is called a complementarity constraint: <img width="67" height="17" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg38.png" alt="$ \tau^{\top} X = 0$"> . This sort of problem essentially called a &#8220;Linear Complementarity Problem&#8221; and is about as hard as solving a linear program (the typical solution method is a variation of the simplex method called &#8220;Lemke&#8217;s algorithm&#8221;). (Technically the <img width="13" height="15" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg17.png" alt="$ \lambda$"> prevents the problem from being in the right form, but <img width="13" height="15" align="bottom" border="0" src="http://www.win-vector.com/blog/wp-content/uploads/2010/01/EPAimg17.png" alt="$ \lambda$"> can be inspected out of the problem.) The problem can still be solved, you just need a bit more software. If we can not short assets (or at least simulate shorting assets) we not only eliminate many possible portfolios from consideration (so we likely end up with a less profitable portfolio than we would like) we also make the mathematics and computation a bit harder.</p>
<p>The goal of this writeup has been to show how to systematically convert investment advice like &#8220;this stock is going to really take off&#8221; into an allocation of assets (which in turn implies a pattern of trades). We take as unexamined premises where to get such advice and whether to use the Sharpe ratio or some other notion of risk and/or utility. The point is that even though it may be complicated, from this point it is just calculation and calculation is easy to automate.</p>


<p>Related posts:<ol><li><a href='http://www.win-vector.com/blog/2008/09/a-quick-appreciation-of-the-sharpe-ratio/' rel='bookmark' title='Permanent Link: A Quick Appreciation of the Sharpe Ratio'>A Quick Appreciation of the Sharpe Ratio</a></li>
<li><a href='http://www.win-vector.com/blog/2009/09/a-discrete-model-gauging-market-efficiency/' rel='bookmark' title='Permanent Link: A Discrete Model Gauging Market Efficiency'>A Discrete Model Gauging Market Efficiency</a></li>
<li><a href='http://www.win-vector.com/blog/2009/10/what-is-the-gamblers-equivalent-of-amdahls-law/' rel='bookmark' title='Permanent Link: What is the gambler&#8217;s equivalent of Amdahl&#8217;s Law?'>What is the gambler&#8217;s equivalent of Amdahl&#8217;s Law?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.win-vector.com/blog/2010/01/easy-portfolio-allocation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Quick Appreciation of the Sharpe Ratio</title>
		<link>http://www.win-vector.com/blog/2008/09/a-quick-appreciation-of-the-sharpe-ratio/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=a-quick-appreciation-of-the-sharpe-ratio</link>
		<comments>http://www.win-vector.com/blog/2008/09/a-quick-appreciation-of-the-sharpe-ratio/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 03:15:07 +0000</pubDate>
		<dc:creator>John Mount</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Expository Writing]]></category>
		<category><![CDATA[Finance]]></category>
		<category><![CDATA[Mathematical Bedside Reading]]></category>
		<category><![CDATA[Sharpe Ratio]]></category>

		<guid isPermaLink="false">http://www.win-vector.com/blog/?p=22</guid>
		<description><![CDATA[The current state of the global financial markets has gotten more people than usual worrying about the technical aspects of finance. One method for reasoning about investment returns and risk is a tool called the Sharpe Ratio. It is well worth reviewing this measure and seeing how, if used properly, it doesn&#8217;t favor any of [...]


Related posts:<ol><li><a href='http://www.win-vector.com/blog/2010/01/easy-portfolio-allocation/' rel='bookmark' title='Permanent Link: &#8220;Easy&#8221; Portfolio Allocation'>&#8220;Easy&#8221; Portfolio Allocation</a></li>
<li><a href='http://www.win-vector.com/blog/2009/10/what-is-the-gamblers-equivalent-of-amdahls-law/' rel='bookmark' title='Permanent Link: What is the gambler&#8217;s equivalent of Amdahl&#8217;s Law?'>What is the gambler&#8217;s equivalent of Amdahl&#8217;s Law?</a></li>
<li><a href='http://www.win-vector.com/blog/2009/03/what-does-the-market-think/' rel='bookmark' title='Permanent Link: What does the Market Think?'>What does the Market Think?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The current state of the global financial markets has gotten more people than usual worrying about the technical aspects of finance.  One method for reasoning about investment returns and risk is a tool called the Sharpe Ratio.  It is well worth reviewing this measure and seeing how, if used properly, it doesn&#8217;t favor any of the mistakes that underly our current financial crisis.<span id="more-22"></span></p>
<p>The Sharpe ratio is a famous measure of &#8220;risk adjusted return&#8221; and is defined as &#8220;the ratio of the expected excess return from an investment divided by standard deviation of the excess return.&#8221;  It is most easily demonstrated by an example (which we work in pieces).</p>
<p>If an investment is expected to generate a profit of 15% in the next year and an insured bank account would generate 10% profit then the expected excess return invested is 15% &#8211; 10% = 5%.  A rational investor would never take a risky investment that did not have a positive excess return (else they would expect to make more money at a bank). &#8220;Expected&#8221; is a technical term which means the average return of the investment averaged over all possible outcomes (weighted by the odds of each outcome), we can explain this by working a couple of examples.</p>
<p>Consider investment &#8220;A&#8221; which is a generally good idea that returns a 20% profit in half the possible years and a 10% profit in the other half of the years.  Investment A has an expected return of 0.5*20% + 0.5*10% = 15%.  Investment &#8220;A&#8221; has 15% &#8211; 10% = 5% excess return.</p>
<p>Also consider another investment &#8220;B&#8221; which is a risky bet that returns 20% profit most years (around 95.8% of them) and goes bankrupt in the other years.  The expected return of investment &#8220;B&#8221; is 0.958*20% + 0.042*(-100%) = 14.96%, or essentially 15%.   Investment &#8220;B&#8221; has 15% &#8211; 10% = 5% excess return.</p>
<p>As we can see &#8220;expectation&#8221; alone can not really tell these two investments apart.  That is why the second component of the Sharpe ratio is something called the standard deviation.  The standard deviation is defined as the square-root of the squared deviations of the return from the target value of 15%.  What we do is measure for each possible outcome how far off the return is from the target of 15%, multiply this number by itself (called squaring it) and then take the square-root of the sum of all such values.  Again, this is best explained by an example.</p>
<p>Investment &#8220;A&#8221; has a standard deviation of:<br />
square-root(  0.5 * (20% &#8211; 15%)*(20% &#8211; 15%) +  0.5 * (10% &#8211; 15%)*(10% &#8211; 15%)  ) = 5%</p>
<p>And investment &#8220;B&#8221; has a standard deviation of:<br />
square-root( 0.958 *( 20% &#8211; 15%)*( 20% &#8211; 15%) + 0.042*(-100% &#8211; 15%)*(-100% &#8211; 15%) ) = 24%</p>
<p>Just like in the calculation of expectation we are taking every possible situation and summing (weighted by the likelihood) our value of interest (in this case the squared variation).</p>
<p>The standard deviation&#8217;s opinion is that investment &#8220;B&#8221; is about five times riskier than investment &#8220;A.&#8221;  And this is the grace of the Sharpe ratio: it says that investment &#8220;A&#8221;&#8216;s value is (15% &#8211; 10%)/5% =  1 and &#8220;B&#8221;&#8216;s value is (15% &#8211; 10%)/24% = 0.2.</p>
<p>An interesting feature of the Sharpe ratio is that, unlike Wall Street, it does not believe that leveraging increases profitability.  A common desperation move is to take an investment that has a moderate return and borrow money to simulate larger returns by having larger exposure.  For instance an investment that returns 15% can try to simulate a higher return by borrowing.   If for every $1,000 invested we borrow another $1,000 to invest (paying the risk rate of 10% for the money) one can show an apparent rate of return of ($2000*15% &#8211; $1000*10%)/$1000 or 20%.  However, this is not free money- the investor is taking on twice as much risk for only half as much more return.  In fact with sufficient leverage (three times, for times, thirty times) one can convert a safe investment into a risky investment that could even go bankrupt.  The Sharpe ratio (by design) is not fooled by this sort of manipulation.  Investing $1000 in investment A has the exact same Sharpe ratio as investing $1000 plus $1000 more borrowed at the risk-free rate (this is part of the cleverness of using excess returns instead of un-adjusted returns).</p>
<p>Unfortunately to use the Sharpe ratio you need good estimates of three things:</p>
<p>1) The expected return of the investment.</p>
<p>2) The risk-less available in the market (to compute excess).</p>
<p>3) The standard deviation of the investment.</p>
<p>All three of these facts are about the future, so we don&#8217;t really know any of them.  The historic returns of an investment are not the same thing as the expected returns in the future, interest rates can change and the standard deviation is especially hard to estimate.  However, if you have a model (or at least a theory) of what your investments are supposed to do then you can plug in estimates for these three quantities and use the Sharpe ratio to determine which investments really are best.</p>
<p>If you knew how investment &#8220;A&#8221; worked and could estimate that it returned 20% about half the time and 10% the other times you could estimate its Sharpe ratio as 1.  And if you knew investment &#8220;B&#8221; was a gamble that almost always paid off at 20% with a single rare event that causes bankruptcy you could estimate its Sharpe ratio as 0.2.  Even if your estimates were inaccurate (say you estimate investment &#8220;A&#8221;&#8216;s Sharpe ratio is 0.7 and investment &#8220;B&#8221;&#8216;s Sharpe ratio as 0.3) the indication is to stay away from investment &#8220;B.&#8221;</p>
<p>This is in stark contrast to the conclusion you would draw if you thought of these investments as a &#8220;black box&#8221; (like a fund of funds does) and looked only at their historic performance.  If you looked at around 5 years of historic performance of both investments you would (incorrectly) think the following:</p>
<p>Investment A looks kind of noisy, some years it returns 10% and some years it return 20%.  You would estimate (correctly) the return as averaging to 15% and you can even get a historic estimate of its standard deviation that is actually about right (5%)</p>
<p>Investment B looks like easy money.  With about 80% chance you would not have seen a bankruptcy, just 5 years of 20% returns.  You would mis-estimate the return as being 20% (all you have ever seen) and further mis-estimate the standard deviation as 0%.</p>
<p>Based on historic data alone you would fire the manager of investment &#8220;A&#8221;, give the manager of investment &#8220;B&#8221; a huge bonus and invest all of your money.  And a few years later you would go bankrupt.</p>
<p>What is going on is very well explained by Nassim Nicholas Taleb as &#8220;the turkey paradox.&#8221;  Domestic turkeys are all killed at about the exact same age (say 60 days).  For somebody that understands commercial poultry farming there is not any mystery or uncertainty about it.  60 days before you want to sell a turkey carcass you buy a turkey chick.  There is an inevitability and reverse causality- the desire for the turkey&#8217;s carcass funds and causes the turkey&#8217;s start of life 60 days earlier.  Now if the turkey is a statistical empiricist (perhaps with a PhD in machine learning) things look good.  The turkey sets up a model of each day having an unknown chance of being good or bad.  The turkey figures that each day&#8217;s outcome is an independent trial drawn from this single unknown probability.  The turkey collects evidence: every day it gets fed.  Each day is more evidence that all days will be good.  And then on day 60 the turkey gets a nasty surprise.  The turkey&#8217;s life was a bad investment from day one, all of the &#8220;evidence&#8221; the turkey collects along the way was irrelevant because the model was wrong.  And the model was wrong because the turkey guessed at the model instead of investigating the nature of poultry farming.</p>
<p>Much is the same in many investments.  There are investments that look like investment &#8220;B&#8221; when you open the hood.  Many of them involve writing &#8220;out of the money options&#8221; and &#8220;default swaps.&#8221;  These are essentially selling insurance on events that nobody thinks are likely.  Selling insurance that usually is not used is profitable, until the insurance gets used.   This is why insurance companies (if they are ethical) don&#8217;t treat the entirety of collected payments as profit- but as a stockpile that must be kept to pay the claims that will inevitably some day come true.</p>
<p>It is important to point out the Sharpe ratio will give you incorrect results if you plug bad estimates into it.  Overall the Sharpe ratio prefers good investments and diversification but it can be led astray.  In fact that is the whole point: no amount of smart math will undo the inevitable consequences of wrong models that are used because &#8220;you need something you can solve&#8221; (like the turkey) or &#8220;everybody else is getting rich using them&#8221; (like investment &#8220;B&#8221;).</p>


<p>Related posts:<ol><li><a href='http://www.win-vector.com/blog/2010/01/easy-portfolio-allocation/' rel='bookmark' title='Permanent Link: &#8220;Easy&#8221; Portfolio Allocation'>&#8220;Easy&#8221; Portfolio Allocation</a></li>
<li><a href='http://www.win-vector.com/blog/2009/10/what-is-the-gamblers-equivalent-of-amdahls-law/' rel='bookmark' title='Permanent Link: What is the gambler&#8217;s equivalent of Amdahl&#8217;s Law?'>What is the gambler&#8217;s equivalent of Amdahl&#8217;s Law?</a></li>
<li><a href='http://www.win-vector.com/blog/2009/03/what-does-the-market-think/' rel='bookmark' title='Permanent Link: What does the Market Think?'>What does the Market Think?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.win-vector.com/blog/2008/09/a-quick-appreciation-of-the-sharpe-ratio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
