{"id":13,"date":"2022-05-17T23:21:13","date_gmt":"2022-05-18T06:21:13","guid":{"rendered":"https:\/\/blogs.ubc.ca\/sumitm\/?p=13"},"modified":"2022-06-07T10:17:09","modified_gmt":"2022-06-07T17:17:09","slug":"simple-moving-average-trading-strategy","status":"publish","type":"post","link":"https:\/\/blogs.ubc.ca\/sumitm\/2022\/05\/17\/simple-moving-average-trading-strategy\/","title":{"rendered":"Simple Moving Average Trading Strategy"},"content":{"rendered":"<p>A <strong>simple moving average (SMA)<\/strong> calculates the average of a selected range of prices, usually closing prices, by the number of periods in that range.<br \/>\nThe SMA is a technical indicator that can aid in determining if an asset price will continue or reverse a bull or bear trend.<br \/>\nStrategy<\/p>\n<p>The agent buys the AMZN stock when the SMA for 5 days, is greater than the SMA for 9 days. The agent sells vice versa.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"wp-image-17 aligncenter\" src=\"https:\/\/blogs.ubc.ca\/sumitm\/files\/2022\/05\/Unknown-300x214.png\" alt=\"\" width=\"433\" height=\"309\" srcset=\"https:\/\/blogs.ubc.ca\/sumitm\/files\/2022\/05\/Unknown-300x214.png 300w, https:\/\/blogs.ubc.ca\/sumitm\/files\/2022\/05\/Unknown-1024x731.png 1024w, https:\/\/blogs.ubc.ca\/sumitm\/files\/2022\/05\/Unknown-768x549.png 768w, https:\/\/blogs.ubc.ca\/sumitm\/files\/2022\/05\/Unknown.png 1344w\" sizes=\"auto, (max-width: 433px) 100vw, 433px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><!--more--><\/p>\n<p><strong>Example<\/strong><br \/>\nBob wants to make money of the stock market, he descides to invest his $100,000 using a simple SMA strategy.<\/p>\n<p>He plots the stock chart with the SMAs and decides to buy when the red line crosses the blue line and sell the stocks when the blue line crosses the red line.<br \/>\nHe is happy because he is riding the trends and making money by buying and selling AMZN stocks. So he decides to always reinvest his returns in AMZN.<br \/>\nVisualizations.<\/p>\n<p>Shown below are the plots of Bob\u2019s portfolio balance starting with a mere $100,000 and his AMZN stock holdings.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-18 aligncenter\" src=\"https:\/\/blogs.ubc.ca\/sumitm\/files\/2022\/05\/Unknown-2-300x214.png\" alt=\"\" width=\"443\" height=\"316\" srcset=\"https:\/\/blogs.ubc.ca\/sumitm\/files\/2022\/05\/Unknown-2-300x214.png 300w, https:\/\/blogs.ubc.ca\/sumitm\/files\/2022\/05\/Unknown-2-1024x731.png 1024w, https:\/\/blogs.ubc.ca\/sumitm\/files\/2022\/05\/Unknown-2-768x549.png 768w, https:\/\/blogs.ubc.ca\/sumitm\/files\/2022\/05\/Unknown-2.png 1344w\" sizes=\"auto, (max-width: 443px) 100vw, 443px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-16 aligncenter\" src=\"https:\/\/blogs.ubc.ca\/sumitm\/files\/2022\/05\/Unknown-3-300x214.png\" alt=\"\" width=\"405\" height=\"289\" srcset=\"https:\/\/blogs.ubc.ca\/sumitm\/files\/2022\/05\/Unknown-3-300x214.png 300w, https:\/\/blogs.ubc.ca\/sumitm\/files\/2022\/05\/Unknown-3-1024x731.png 1024w, https:\/\/blogs.ubc.ca\/sumitm\/files\/2022\/05\/Unknown-3-768x549.png 768w, https:\/\/blogs.ubc.ca\/sumitm\/files\/2022\/05\/Unknown-3.png 1344w\" sizes=\"auto, (max-width: 405px) 100vw, 405px\" \/><br \/>\n\ufffc\ufffc<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A simple moving average (SMA) calculates the average of a selected range of prices, usually closing prices, by the number of periods in that range. The SMA is a technical indicator that can aid in determining if an asset price will continue or reverse a bull or bear trend. Strategy The agent buys the AMZN &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blogs.ubc.ca\/sumitm\/2022\/05\/17\/simple-moving-average-trading-strategy\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Simple Moving Average Trading Strategy&#8221;<\/span><\/a><\/p>\n","protected":false},"author":62544,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.ubc.ca\/sumitm\/wp-json\/wp\/v2\/posts\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ubc.ca\/sumitm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ubc.ca\/sumitm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ubc.ca\/sumitm\/wp-json\/wp\/v2\/users\/62544"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ubc.ca\/sumitm\/wp-json\/wp\/v2\/comments?post=13"}],"version-history":[{"count":4,"href":"https:\/\/blogs.ubc.ca\/sumitm\/wp-json\/wp\/v2\/posts\/13\/revisions"}],"predecessor-version":[{"id":75,"href":"https:\/\/blogs.ubc.ca\/sumitm\/wp-json\/wp\/v2\/posts\/13\/revisions\/75"}],"wp:attachment":[{"href":"https:\/\/blogs.ubc.ca\/sumitm\/wp-json\/wp\/v2\/media?parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ubc.ca\/sumitm\/wp-json\/wp\/v2\/categories?post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ubc.ca\/sumitm\/wp-json\/wp\/v2\/tags?post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}