{"id":16,"date":"2022-01-15T02:01:55","date_gmt":"2022-01-15T02:01:55","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/carltjoh\/?p=16"},"modified":"2022-01-15T02:43:03","modified_gmt":"2022-01-15T02:43:03","slug":"algorithmic-trading-strategies-with-machine-learning","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/carltjoh\/2022\/01\/15\/algorithmic-trading-strategies-with-machine-learning\/","title":{"rendered":"Algorithmic Trading Strategies with Machine Learning"},"content":{"rendered":"\n<p class=\"has-medium-font-size\"><strong>What is Algorithmic Trading?<\/strong><\/p>\n\n\n\n<p>For millennia, people have invested capital in productive endeavors in the hope of earning a return on their investment.&nbsp; Over time, standards of financial accounting emerged, which provided insight into the operation and performance of such enterprises.&nbsp; Eventually markets were established in which investors could buy and sell financial assets based upon their assessments of fundamental value.&nbsp; These innovations have yielded a mechanism by which entrepreneurs seeking capital may coordinate with willing investors to allocate resources in a very efficient way.<\/p>\n\n\n\n<p>Even a few decades ago these markets were driven by mostly manual analysis of financial statements and other inputs which might reveal the fundamental value of the underlying asset.\u00a0 However, the abundance of market data which is now available in real time lends itself to a plethora of automated trading strategies.\u00a0 Recent assessments indicate that more than 60 percent of the total trading volume on US public markets is now driven by algorithmic trading.<\/p>\n\n\n\n<p>The most famous form of algorithmic trading is probably high frequency trading (HFT), in which market participants seek a slight edge on competitors (often measured in milliseconds) by exploiting small, temporal inefficiencies in the market.\u00a0 In order to beat competitors to these opportunities, the major players implement fairly complex rules which are often executed on platforms located as close to exchanges as possible in the interest of speed.\u00a0 This has sparked a FinTech arms race of sorts as market participants compete to secure the best locations, fastest equipment and most efficient algorithms.\u00a0 However, like any arms race, this obsession with fastest execution carries a certain level of risk.<\/p>\n\n\n\n<p>Perhaps the best example of this is the Flash Crash of 2010.\u00a0 At approximately 2:32pm EDT on May 6, a large trader initiated the sell of a single type of asset valued in excess of $4 billion.\u00a0 This transaction was large enough to look like a trend to various algorithms, which started trading in a dynamically unstable manner.\u00a0 During the ensuing 36 minutes, the market logged its second largest intraday swing in history, even though there was no rational motivation for such behavior.\u00a0 In the end, more than a trillion dollars of capital was wiped out and both the public and regulators became aware of the potential risks of algorithmic trading.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"511\" height=\"329\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5096\/files\/2022\/01\/image.png\" alt=\"\" class=\"wp-image-17\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5096\/files\/2022\/01\/image.png 511w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5096\/files\/2022\/01\/image-300x193.png 300w\" sizes=\"auto, (max-width: 511px) 100vw, 511px\" \/><\/figure><\/div>\n\n\n\n<p class=\"has-text-align-center\"><em>Figure 1 \u2013 Dow Jones tracker from May 6, 2010<\/em><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Momentum Trading<\/strong><\/p>\n\n\n\n<p>Our project will not enter the foray of HFT, but rather will seek to capitalize on a more stable strategy of momentum investing.\u00a0  In short, momentum trading recognizes that stocks which have been outperforming the market during the past several months, typically tend to do so over an ensuing period of similar duration.\u00a0 Similar logic applies to stocks which have been underperforming the market as well.\u00a0 In truth, the correlation only tends to prevail a little more than 50 percent of the time, but the distribution of performance tends to be skewed towards larger winners than losers, which often leads to momentum strategies out performing the market overall.<\/p>\n\n\n\n<p>Several studies have shown that momentum investing is one of the few strategies which regularly delivers better returns than the market as a whole, although there are multiple opinions and no consensus about why the viability of this method persists. According to the efficient market theory, once a market bias is understood, it should be exploited and thus disappear, but this has not been the case with momentum-based trading. Several theories about the continuing success of momentum methods seem to revolve around persistent behavioral biases of market participants.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Universe Selection<\/strong><\/p>\n\n\n\n<p>Trying to apply optimization strategy to the market as a whole can be dauting at best and untenable at worst due to the sheer volume of potential investments available.\u00a0 As such, it is typical to apply some coarse screening criteria to identify a manageable quantity of qualified investments which merit further analysis.\u00a0 This group of pre-qualified assets is considered to be the investible universe, and deeper analysis will be applied to these assets in order to generate a list of trades.<\/p>\n\n\n\n<p>Our project will focus predominantly on universe selection, and will integrate with existing modules which generate buy and sell signals for based on a broader automated strategy.\u00a0 We will mostly seek to choose risky (i.e., volatile) assets which have demonstrated favorable momentum over the preceding period.\u00a0 We will also seek to determine an optimal time window to evaluate, but our initial estimate (based largely on our sponsor\u2019s experience) is that the optimal window to review will be approximately 3 to 6 months.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Asset Selection Criteria<\/strong><\/p>\n\n\n\n<p>For the first version, we will choose from roughly ten frequently traded ETFs by assessing growth and volatility over the preceding period.&nbsp; Using this model, we will develop a module and integrate it with existing software which generates actual buy and sell signals for assets from the selected universe.&nbsp; We will then seek more complex and nuanced logic which will provide better performance.<\/p>\n\n\n\n<p>We will assess our code&#8217;s performance based on its ability to choose risky assets with strong returns.\u00a0 For the initial version with approximately ten assets to choose from, we will check the performance over another period based on each of the ten assets available, and then see how the preferred asset (based on the criteria from our algorithm) performed in comparison to the others.\u00a0 This will give a coarse, directional indication only, but we will look to tailor a more sophisticated testing regime before implementing more complex (and hopefully effective) strategies.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is Algorithmic Trading? For millennia, people have invested capital in productive endeavors in the hope of earning a return on their investment.&nbsp; Over time, standards of financial accounting emerged, which provided insight into the operation and performance of such enterprises.&nbsp; Eventually markets were established in which investors could buy and sell financial assets based [&hellip;]<\/p>\n","protected":false},"author":11946,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-16","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/carltjoh\/wp-json\/wp\/v2\/posts\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/carltjoh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/carltjoh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/carltjoh\/wp-json\/wp\/v2\/users\/11946"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/carltjoh\/wp-json\/wp\/v2\/comments?post=16"}],"version-history":[{"count":3,"href":"https:\/\/blogs.oregonstate.edu\/carltjoh\/wp-json\/wp\/v2\/posts\/16\/revisions"}],"predecessor-version":[{"id":22,"href":"https:\/\/blogs.oregonstate.edu\/carltjoh\/wp-json\/wp\/v2\/posts\/16\/revisions\/22"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/carltjoh\/wp-json\/wp\/v2\/media?parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/carltjoh\/wp-json\/wp\/v2\/categories?post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/carltjoh\/wp-json\/wp\/v2\/tags?post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}