{"id":40890399,"date":"2023-12-31T11:43:02","date_gmt":"2023-12-31T06:13:02","guid":{"rendered":"https:\/\/stockviz.biz\/index.php\/?p=40890399"},"modified":"2023-12-31T11:43:02","modified_gmt":"2023-12-31T06:13:02","slug":"multiple-mads","status":"publish","type":"post","link":"https:\/\/stockviz.biz\/index.php\/2023\/12\/31\/multiple-mads\/","title":{"rendered":"Multiple MADs"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Our <a rel=\"noreferrer noopener\" href=\"https:\/\/stockviz.biz\/2023\/12\/20\/mad-moving-average-distance\/\" target=\"_blank\">previous<\/a> post introduced a paper that used a moving average crossover to create a portfolio of stocks. While the backtest using the parameters in the paper looks good, the presence of these &#8220;magic&#8221; lookback parameters gives us pause. Did the authors just try a bunch of different parameters and published what worked? What if we do an exhaustive search through all possible combinations?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here are the annualized returns and Sharpe ratios <strong>pre-COVID<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/github.com\/stockviz\/blog\/blob\/master\/technical\/MAD-trend\/mad-multi-ret.pre.png?raw=true\" alt=\"\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/github.com\/stockviz\/blog\/blob\/master\/technical\/MAD-trend\/mad-multi-best.pre.png?raw=true\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The magic 21\/200 lookbacks look legit. However, the <strong>post-COVID<\/strong> picture looks different:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/github.com\/stockviz\/blog\/blob\/master\/technical\/MAD-trend\/mad-multi-ret.post.png?raw=true\" alt=\"\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/github.com\/stockviz\/blog\/blob\/master\/technical\/MAD-trend\/mad-multi-best.post.png?raw=true\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The magic parameters don&#8217;t quite figure in the top 5. However, even if you used the data-mined set, you would be ok?<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/github.com\/stockviz\/blog\/blob\/master\/technical\/MAD-trend\/mad-top-cum-ret.15.200.post-2020.png?raw=true\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Also, the paper used a &#8220;sigma&#8221; parameter as a threshold to activate the crossover. Getting rid of it seemed to have lopped 10% off the post-COVID returns.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can follow along the live version of the original strategy here:\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/stockviz.biz\/theme-eq\/3BD48C76-BE52-4158-84FA-2C22355AEC22\" target=\"_blank\">MAD 21\/200<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Code and charts on&nbsp;<a href=\"https:\/\/github.com\/stockviz\/blog\/tree\/master\/technical\/MAD-trend\" target=\"_blank\" rel=\"noreferrer noopener\">github<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Our previous post introduced a paper that used a moving average crossover to create a portfolio of stocks. While the backtest using the parameters in the paper looks good, the presence of these &#8220;magic&#8221; lookback parameters gives us pause. Did the authors just try a bunch of different parameters and published what worked? What if &hellip; <\/p>\n","protected":false},"author":2,"featured_media":2106273,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3471],"tags":[3541,3491,3793],"class_list":["post-40890399","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-investing-insight","tag-backtest","tag-momentum","tag-trend-following","entry"],"_links":{"self":[{"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/posts\/40890399","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=40890399"}],"version-history":[{"count":0,"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/posts\/40890399\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/media\/2106273"}],"wp:attachment":[{"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/media?parent=40890399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/categories?post=40890399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/tags?post=40890399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}