{"id":40890153,"date":"2023-03-16T10:18:00","date_gmt":"2023-03-16T04:48:00","guid":{"rendered":"https:\/\/stockviz.biz\/index.php\/?p=40890153"},"modified":"2023-03-16T10:18:09","modified_gmt":"2023-03-16T04:48:09","slug":"mahalanobis-distance","status":"publish","type":"post","link":"https:\/\/stockviz.biz\/index.php\/2023\/03\/16\/mahalanobis-distance\/","title":{"rendered":"Mahalanobis Distance"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">We are big fans on using distance measures while prospecting for investment strategies. Previously:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/stockviz.biz\/2020\/11\/17\/euclidean-distance-for-pattern-matching\/\" target=\"_blank\" rel=\"noreferrer noopener\">Euclidean Distance for Pattern Matching<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/stockviz.biz\/2021\/11\/27\/hamming-distance\/\" target=\"_blank\" rel=\"noreferrer noopener\">Hamming Distance<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/stockviz.biz\/2021\/12\/18\/euclid-vs-hamming-distance\/\" target=\"_blank\" rel=\"noreferrer noopener\">Euclid vs. Hamming Distance<\/a><\/li>\n\n\n\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/stockviz.biz\/2021\/12\/11\/beta-vs-hamming\/\" target=\"_blank\">Beta vs. Hamming<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Recently, we came across an interesting paper, <em><strong>Skulls, Financial Turbulence, and Risk Management<\/strong>, Mark Kritzman, CFA, and Yuanzhen Li<\/em>, that uses the Mahalanobis distance to construct a <em>turbulence index<\/em>. The basic idea is that the more asset returns break from the past, the more &#8220;significant&#8221; a market event.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We took the basic intuition behind this and constructed a portfolio that switches between equities and bonds based on the Mahalanobis distance between them.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/stockviz\/blog\/master\/mahalanobis\/NIFTY%2050%20TR.long-only.validate.cumulative.png\" alt=\"\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/stockviz\/blog\/master\/mahalanobis\/NIFTY%20MIDCAP%20150%20TR.long-only.validate.cumulative.png\" alt=\"\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/stockviz\/blog\/master\/mahalanobis\/NIFTY%20SMALLCAP%20250%20TR.long-only.validate.cumulative.png\" alt=\"\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/stockviz\/blog\/master\/mahalanobis\/NIFTY500%20MULTICAP%2050_25_25%20TR.long-only.validate.cumulative.png\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The out-of-sample results, factoring in transaction costs, look promising but doesn&#8217;t really stand out compared to other, more dumber, strategies that avoid steep drawdowns. However, two points over the Midcap buy &amp; hold cannot be dismissed outright.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The code, charts and paper are on <a href=\"https:\/\/github.com\/stockviz\/blog\/tree\/master\/mahalanobis\" target=\"_blank\" rel=\"noreferrer noopener\">github<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are big fans on using distance measures while prospecting for investment strategies. Previously: Recently, we came across an interesting paper, Skulls, Financial Turbulence, and Risk Management, Mark Kritzman, CFA, and Yuanzhen Li, that uses the Mahalanobis distance to construct a turbulence index. The basic idea is that the more asset returns break from the &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":[2761],"class_list":["post-40890153","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-investing-insight","tag-quant","entry"],"_links":{"self":[{"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/posts\/40890153","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=40890153"}],"version-history":[{"count":0,"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/posts\/40890153\/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=40890153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/categories?post=40890153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/tags?post=40890153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}