<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/lets-talk-drawdowns-and-affiliates/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://quantstrattrader.wordpress.com/2017/08/01/lets-talk-drawdowns-and-affiliates/"> R – QuantStrat TradeR</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>This post will be directed towards those newer in investing, with an explanation of drawdowns–in my opinion, a simple and highly important risk statistic.</p>
<p>Would you invest in this?</p>
<p><img data-orig-file="https://quantstrattrader.files.wordpress.com/2017/08/sp500ew1.jpeg?w=456" data-orig-size="668,622" data-medium-file="https://quantstrattrader.files.wordpress.com/2017/08/sp500ew1.jpeg?w=456?w=300" data-attachment-id="1068" data-image-meta="{" data-image-description="" src="https://quantstrattrader.files.wordpress.com/2017/08/sp500ew1.jpeg?w=456" data-permalink="https://quantstrattrader.wordpress.com/2017/08/01/lets-talk-drawdowns-and-affiliates/sp500ew/#main" data-large-file="https://quantstrattrader.files.wordpress.com/2017/08/sp500ew1.jpeg?w=456?w=640" alt="SP500ew" data-image-title="SP500ew" sizes="(max-width: 640px) 100vw, 640px" data-comments-opened="1" class="wp-image-1068" data-recalc-dims="1"></p>
<p>As it turns out, millions of people do, and did. That is the S&amp;P 500, from 2000 through 2012, more colloquially referred to as “the stock market”. Plenty of people around the world invest in it, and for a risk to reward payoff that is very bad, in my opinion. This is an investment that, in ten years, lost half of its value–twice!</p>
<p>At its simplest, an investment–placing your money in an asset like a stock, a savings account, and so on, instead of spending it, has two things you need to look at.</p>
<p><img data-orig-file="https://quantstrattrader.files.wordpress.com/2017/08/cagr.jpg?w=456" data-orig-size="531,405" data-medium-file="https://quantstrattrader.files.wordpress.com/2017/08/cagr.jpg?w=456?w=300" data-attachment-id="1108" data-image-meta="{" data-image-description="" src="https://quantstrattrader.files.wordpress.com/2017/08/cagr.jpg?w=456" data-permalink="https://quantstrattrader.wordpress.com/2017/08/01/lets-talk-drawdowns-and-affiliates/cagr/#main" data-large-file="https://quantstrattrader.files.wordpress.com/2017/08/cagr.jpg?w=456?w=531" alt="cagr" data-image-title="cagr" sizes="(max-width: 531px) 100vw, 531px" data-comments-opened="1" class="wp-image-1108" data-recalc-dims="1"></p>
<p>First, what’s your reward? If you open up a bank CD, you might be fortunate to get 3%. If you invest it in the stock market, you might get 8% per year (on average) if you held it for 20 years. In other words, you stow away $100 on January 1st, and you might come back and find $108 in your account on December 31st. This is often called the compound annualized growth rate (CAGR)–meaning that if you have $100 one year, earn 8%, you have 108, and then earn 8% on that, and so on.</p>
<p>The second thing to look at is the risk. What can you lose? The simplest answer to this is “the maximum drawdown”. If this sounds complicated, it simply means “the biggest loss”. So, if you had $100 one month, $120 next month, and $90 the month after that, your maximum drawdown (that is, your maximum loss) would be 1 – 90/120 = 25%.</p>
<p><img data-orig-file="https://quantstrattrader.files.wordpress.com/2017/08/maximum-drawdown.jpg?w=456" data-orig-size="444,271" data-medium-file="https://quantstrattrader.files.wordpress.com/2017/08/maximum-drawdown.jpg?w=456?w=300" data-attachment-id="1110" data-image-meta="{" data-image-description="" src="https://quantstrattrader.files.wordpress.com/2017/08/maximum-drawdown.jpg?w=456" data-permalink="https://quantstrattrader.wordpress.com/2017/08/01/lets-talk-drawdowns-and-affiliates/maximum-drawdown/#main" data-large-file="https://quantstrattrader.files.wordpress.com/2017/08/maximum-drawdown.jpg?w=456?w=444" alt="Maximum-Drawdown" data-image-title="Maximum-Drawdown" sizes="(max-width: 444px) 100vw, 444px" data-comments-opened="1" class="wp-image-1110" data-recalc-dims="1"></p>
<p>When you put the reward and risk together, you can create a ratio, to see how your rewards and risks line up. This is called a Calmar ratio, and you get it by dividing your CAGR by your maximum drawdown. The Calmar Ratio is a ratio that I interpret as “for every dollar you lose in your investment’s worst performance, how many dollars can you make back in a year?” For my own investments, I prefer this number to be at least 1, and know of a strategy for which that number is above 2 since 2011, or higher than 3 if simulated back to 2008.</p>
<p>Most stocks don’t even have a Calmar ratio of 1, which means that on average, an investment makes more than it can possibly lose in a year. Even Amazon, the company whose stock made Jeff Bezos now the richest man in the world, only has a Calmar Ratio of less than 2/5, with a maximum loss of more than 90% in the dot-com crash. The S&amp;P 500, again, “the stock market”, since 1993, has a Calmar Ratio of around 1/6. That is, the worst losses can take *years* to make back.</p>
<p>A lot of wealth advisers like to say that they recommend a large holding of stocks for young people. In my opinion, whether you’re young or old, losing half of everything hurts, and there are much better ways to make money than to simply buy and hold a collection of stocks.</p>
<p>****</p>
<p>For those with coding skills, one way to gauge just how good or bad an investment is, is this:</p>
<p>An investment has a history–that is, in January, it made 3%, in February, it lost 2%, in March, it made 5%, and so on. By shuffling that history around, so that say, January loses 2%, February makes 5%, and March makes 3%, you can create an alternate history of the investment. It will start and end in the same place, but the journey will be different. For investments that have existed for a few years, it is possible to create many different histories, and compare the Calmar ratio of the original investment to its shuffled “alternate histories”. Ideally, you want the investment to be ranked among the highest possible ways to have made the money it did.</p>
<p>To put it simply: would you rather fall one inch a thousand times, or fall a thousand inches once? Well, the first one is no different than jumping rope. The second one will kill you.</p>
<p>Here is some code I wrote in R (if you don’t code in R, don’t worry) to see just how the S&amp;P 500 (the stock market) did compared to how it could have done.</p>
<pre>
require(downloader)
require(quantmod)
require(PerformanceAnalytics)
require(TTR)
require(Quandl)
require(data.table)

SPY &lt;- Quandl(&quot;EOD/SPY&quot;, start_date=&quot;1990-01-01&quot;, type = &quot;xts&quot;)
SPYrets &lt;- na.omit(Return.calculate(SPY$Adj_Close))

spySims &lt;- list()
set.seed(123)
for(i in 1:999) {
  simulatedSpy &lt;- xts(sample(coredata(SPYrets), size = length(SPYrets), replace = FALSE), order.by=index(SPYrets))
  colnames(simulatedSpy) &lt;- paste(&quot;sampleSPY&quot;, i, sep=&quot;_&quot;)
  spySims[[i]] &lt;- simulatedSpy
}
spySims &lt;- do.call(cbind, spySims)
spySims &lt;- cbind(spySims, SPYrets)
colnames(spySims)[1000] &lt;- &quot;Original SPY&quot;

dailyReturnCAGR &lt;- function(rets) {
  return(prod(1+rets)^(252/length(rets))-1)
}

rets &lt;- sapply(spySims, dailyReturnCAGR)
drawdowns &lt;- maxDrawdown(spySims)
calmars &lt;- rets/drawdowns
ranks &lt;- rank(calmars)
plot(density(as.numeric(calmars)), main = 'Calmars of reshuffled SPY, realized reality in red')
abline(v=as.numeric(calmars[1000]), col = 'red')
</pre>
<p> This is the resulting plot:</p>
<p><img data-orig-file="https://quantstrattrader.files.wordpress.com/2017/08/spycalmars.jpeg?w=456" data-orig-size="668,622" data-medium-file="https://quantstrattrader.files.wordpress.com/2017/08/spycalmars.jpeg?w=456?w=300" data-attachment-id="1150" data-image-meta="{" data-image-description="" src="https://quantstrattrader.files.wordpress.com/2017/08/spycalmars.jpeg?w=456" data-permalink="https://quantstrattrader.wordpress.com/2017/08/01/lets-talk-drawdowns-and-affiliates/spycalmars/#main" data-large-file="https://quantstrattrader.files.wordpress.com/2017/08/spycalmars.jpeg?w=456?w=640" alt="spyCalmars" data-image-title="spyCalmars" sizes="(max-width: 640px) 100vw, 640px" data-comments-opened="1" class="wp-image-1150" data-recalc-dims="1"></p>
<p>That red line is the actual performance of the S&amp;P 500 compared to what could have been. And of the 1000 different simulations, only 91 did worse than what happened in reality.</p>
<p>This means that the stock market isn’t a particularly good investment, and that you can do much better using tactical asset allocation strategies.</p>
<p>****</p>
<p>One site I’m affiliated with, is <a rel="nofollow" href="http://www.allocatesmartly.com/?aff=177" target="_blank">AllocateSmartly</a>. It is a cheap investment subscription service ($30 a month) that compiles a collection of asset allocation strategies that perform better than many wealth advisers. When you combine some of those strategies, the performance is better still. To put it into perspective, one model strategy I’ve come up with has this performance:<br>
<img data-orig-file="https://quantstrattrader.files.wordpress.com/2017/08/allocatesmartlymodelportfolio.jpg?w=456" data-orig-size="705,849" data-medium-file="https://quantstrattrader.files.wordpress.com/2017/08/allocatesmartlymodelportfolio.jpg?w=456?w=249" data-attachment-id="1168" data-image-meta="{" data-image-description="" src="https://quantstrattrader.files.wordpress.com/2017/08/allocatesmartlymodelportfolio.jpg?w=456" data-permalink="https://quantstrattrader.wordpress.com/2017/08/01/lets-talk-drawdowns-and-affiliates/allocatesmartlymodelportfolio/#main" data-large-file="https://quantstrattrader.files.wordpress.com/2017/08/allocatesmartlymodelportfolio.jpg?w=456?w=640" alt="allocateSmartlyModelPortfolio" data-image-title="allocateSmartlyModelPortfolio" sizes="(max-width: 640px) 100vw, 640px" data-comments-opened="1" class="wp-image-1168" data-recalc-dims="1"></p>
<p>In this case, the compound annualized growth rate is nearly double that of the maximum loss. For those interested in something a bit more aggressive, this strategy ensemble uses some fairly conservative strategies in its approach.</p>
<p>****</p>
<p>In conclusion, when considering how to invest your money, keep in mind both the reward, and the risk. One very simple and important way to understand risk is how much an investment can possibly lose, from its highest, to its lowest value following that peak. When you combine the reward and the risk, you can get a ratio that tells you about how much you can stand to make for every dollar lost in an investment’s worst performance.</p>
<p>Thanks for reading.</p>
<p>NOTE: I am interested in networking opportunities, projects, and full-time positions related to my skill set. If you are looking to collaborate, please contact me on my LinkedIn <a rel="nofollow" href="https://www.linkedin.com/in/ilyakipnis/" target="_blank">here.</a></p>
<p> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/quantstrattrader.wordpress.com/1057/" target="_blank"><img border="0" alt="" src="http://feeds.wordpress.com/1.0/comments/quantstrattrader.wordpress.com/1057/"></a> <img border="0" alt="" src="https://i1.wp.com/pixel.wp.com/b.gif?resize=1%2C1&ssl=1" data-recalc-dims="1"></p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://quantstrattrader.wordpress.com/2017/08/01/lets-talk-drawdowns-and-affiliates/"> R – QuantStrat TradeR</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/-Db77jgZYJA" height="1"></a></div>