{"id":2095453,"date":"2018-12-26T13:00:09","date_gmt":"2018-12-26T07:30:09","guid":{"rendered":"http:\/\/stockviz.biz\/index.php\/?p=2095453"},"modified":"2018-12-26T13:00:09","modified_gmt":"2018-12-26T07:30:09","slug":"sma-distance-part-iii-backtest","status":"publish","type":"post","link":"https:\/\/stockviz.biz\/index.php\/2018\/12\/26\/sma-distance-part-iii-backtest\/","title":{"rendered":"SMA Distance, Part III &#8211; Backtest"},"content":{"rendered":"<p>In <a href=\"https:\/\/stockviz.biz\/index.php\/2018\/12\/25\/sma-distance-part-ii\/\">Part II<\/a>, we saw that when the 50- and 100-day <em>SMA Distance<\/em> is in the first quintile, subsequent 20-day returns have smaller left tails. Can that observation be turned into a market-timing system?<\/p>\n<h3>The backtest<\/h3>\n<p>We setup two long-only portfolios: one that goes long S&amp;P 500 if either of the 50-day or 100-day SMA Distance is in the first quintile and another that, in addition to the 50- and 100-day being in the first quintile, also makes sure that the 200-day SMA Distance is not in the first quintile. These are L1 and L2 in the chart below:<br \/>\n<a href=\"https:\/\/github.com\/stockviz\/blog\/raw\/master\/technical\/sma\/SP500.cumulative.2006-.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/github.com\/stockviz\/blog\/raw\/master\/technical\/sma\/SP500.cumulative.2006-.png\" width=\"1400\" height=\"800\" class=\"alignnone size-full\" \/><\/a><\/p>\n<p>Using SMA Distance is a poor long-term strategy. However, it does help avoid deep drawdowns. It is not very useful as a standalone indicator but perhaps could be used to confirm other signals.<\/p>\n<p>Code and charts are on <a href=\"https:\/\/github.com\/stockviz\/blog\/tree\/master\/technical\/sma\" rel=\"noopener\" target=\"_blank\">github<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Part II, we saw that when the 50- and 100-day SMA Distance is in the first quintile, subsequent 20-day returns have smaller left tails. Can that observation be turned into a market-timing system? The backtest We setup two long-only portfolios: one that goes long S&amp;P 500 if either of the 50-day or 100-day SMA &hellip; <\/p>\n","protected":false},"author":2,"featured_media":2066301,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3471],"tags":[3541,3963],"class_list":["post-2095453","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-investing-insight","tag-backtest","tag-sma","entry"],"_links":{"self":[{"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/posts\/2095453","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/comments?post=2095453"}],"version-history":[{"count":0,"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/posts\/2095453\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/media\/2066301"}],"wp:attachment":[{"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/media?parent=2095453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/categories?post=2095453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/tags?post=2095453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}