{"id":40890435,"date":"2024-07-11T10:16:04","date_gmt":"2024-07-11T04:46:04","guid":{"rendered":"https:\/\/stockviz.biz\/index.php\/?p=40890435"},"modified":"2024-07-11T10:16:05","modified_gmt":"2024-07-11T04:46:05","slug":"svm-for-momentum","status":"publish","type":"post","link":"https:\/\/stockviz.biz\/index.php\/2024\/07\/11\/svm-for-momentum\/","title":{"rendered":"SVM for Momentum"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Previously, we explored if Meta&#8217;s Prophet library could be used to drive a momentum portfolio (<a href=\"https:\/\/stockviz.biz\/2024\/04\/08\/prophet-for-momentum\/\">Prophet for Momentum<\/a>, <a href=\"https:\/\/stockviz.biz\/2024\/04\/27\/prophet-for-momentum-part-ii\/\">Prophet for Momentum, Part II<\/a>). We found that a simple (na\u00efve) momentum strategy outperformed whatever we did with Prophet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">More generally, using a Neural Network or an SVM to drive portfolios have been a disappointment in live scenarios (<a href=\"https:\/\/stockviz.biz\/themes\/ML\">Machine Learning Themes<\/a>). Their after cost performance trail benchmarks. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Moreover, a big problem with these models is that there are a million different ways to specify them and a few of them will go on to outperform in a forward-test simply because they load on a factor that is working for that moment in time. So, you never know if you found the &#8220;right&#8221; set of specs (because there is none) and if you are not careful, you will forever be tuning the model based on what worked in the recent past.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Even simple SVMs come with so many different ways to specify them: classification vs. regression, polynomial degree, cost (static vs. auto-tune), feature selection, feature tuning, etc. And, since we don&#8217;t know which ones work beforehand, we try most of them and settle on those specs that output the results we wanted.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, an SVM can be trained with a time-series of previous month&#8217;s returns to predict the next month&#8217;s returns. A momentum portfolio can be created by ranking these predictions. Rebalance every month and you have something that works.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/github.com\/stockviz\/blog\/blob\/master\/momentum\/svm-simple\/simple-svm.5.pre.gross.png?raw=true\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The problem is that to arrive at this model, we went through a fair amount of parameter and feature tweaking\/tuning which may or may not work in the future.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/github.com\/stockviz\/blog\/blob\/master\/momentum\/svm-simple\/simple-svm.5.post.gross.png?raw=true\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here, we published the charts of an SVM that uses a 5th degree polynomial kernel because it worked (higher Sharpe!) and not because there is a strong theoretical reason why 5 is better than 1. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For every model that is published, be rest assured that there are thousands hidden away in a drawer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is why we remain skeptical of &#8220;A.I.&#8221; investment strategies. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Code and charts on <a href=\"https:\/\/github.com\/stockviz\/blog\/tree\/master\/momentum\/svm-simple\">github<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Previously, we explored if Meta&#8217;s Prophet library could be used to drive a momentum portfolio (Prophet for Momentum, Prophet for Momentum, Part II). We found that a simple (na\u00efve) momentum strategy outperformed whatever we did with Prophet. More generally, using a Neural Network or an SVM to drive portfolios have been a disappointment in live &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":[3783,3491,3551],"class_list":["post-40890435","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-investing-insight","tag-machine-learning","tag-momentum","tag-support-vector-machine","entry"],"_links":{"self":[{"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/posts\/40890435","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=40890435"}],"version-history":[{"count":0,"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/posts\/40890435\/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=40890435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/categories?post=40890435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stockviz.biz\/index.php\/wp-json\/wp\/v2\/tags?post=40890435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}