{"id":2549,"date":"2019-10-13T01:21:09","date_gmt":"2019-10-13T01:21:09","guid":{"rendered":"http:\/\/intelligentonlinetools.com\/blog\/?p=2549"},"modified":"2019-10-19T18:54:12","modified_gmt":"2019-10-19T18:54:12","slug":"comparing-strategies-detecting-buy-signal","status":"publish","type":"post","link":"http:\/\/intelligentonlinetools.com\/blog\/2019\/10\/13\/comparing-strategies-detecting-buy-signal\/","title":{"rendered":"Comparing Strategies for Detecting Buy Signal with BackTrader"},"content":{"rendered":"<p>In the post  <a href=https:\/\/blog.rmotr.com\/bitcoin-trading-with-python-bollinger-bands-strategy-analysis-b1a223385a89 target=\"_blank\">Bitcoin trading with Python \u2014 Bollinger Bands strategy analysis<\/a>  the author reported  34% returns over the initial investment on back test. Does it work all the time? Is it the best strategy? <\/p>\n<p>Let us use backtrader platform and compare several strategies just for buy signal. Backtrader is a feature-rich Python framework for backtesting and trading. Backtrader allows you to focus on writing reusable trading strategies, indicators and analyzers instead of having to spend time building infrastructure.<\/p>\n<p>We will use the following strategies:<\/p>\n<p><strong>Crossover<\/strong> &#8211; based on two simple moving averages (SMA) with periods 10 and 30 days. Buy if fast SMA line crosses slow to the upside.<\/p>\n<p><strong>Consecutive 2 prices<\/strong> (Simple1) &#8211; Buy if two consecutive prices are decreasing &#8211;  if current price is less than previous price and previous price is also less than previous price <\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n  if self.dataclose[0] &lt; self.dataclose[-1]:\r\n                    if self.dataclose[-1] &lt; self.dataclose[-2]:\r\n                         self.log('BUY CREATE {0:8.2f}'.format(self.dataclose[0]))\r\n                         self.order = self.buy()\r\n<\/pre>\n<p><strong>Consecutive 4 prices<\/strong> (Simple2) &#8211; Buy if within 4 price windows we have decrease more than 5% of original price between any two prices from this window:<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n   if tr_str == &quot;simple2&quot;:\r\n            # since there is no order pending, are we in the market?    \r\n            if not self.position: # not in the market\r\n                if (self.dataclose[0] - self.dataclose[-1]) &lt; -0.05*self.dataclose[0] or (self.dataclose[0] - self.dataclose[-2]) &lt; -0.05*self.dataclose[0] or (self.dataclose[0] - self.dataclose[-3]) &lt; -0.05*self.dataclose[0] or (self.dataclose[0] - self.dataclose[-4]) &lt; -0.05*self.dataclose[0]:\r\n                    #if self.dataclose[-1] &lt; self.dataclose[-2]:\r\n                        self.log('BUY CREATE {0:8.2f}'.format(self.dataclose[0]))\r\n                        self.order = self.buy() \r\n<\/pre>\n<p><strong>Bollinger Bands<\/strong> &#8211; Buy when the price cross the bottom band.<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n  if self.data.close &lt; self.boll.lines.bot:\r\n                self.log('BUY CREATE {0:8.2f}'.format(self.dataclose[0]))\r\n                self.order = self.buy()     \r\n<\/pre>\n<p>Our starting asset value is 10000. We use daily prices.<br \/>\nAfter running above strategies we get results like below:<\/p>\n<p><img data-attachment-id=\"2565\" data-permalink=\"http:\/\/intelligentonlinetools.com\/blog\/2019\/10\/13\/comparing-strategies-detecting-buy-signal\/backtrader-comparing-buy-strategies\/#main\" data-orig-file=\"http:\/\/intelligentonlinetools.com\/blog\/wp-content\/uploads\/2019\/10\/backtrader-comparing-buy-strategies-e1571510154800.jpg\" data-orig-size=\"720,336\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Leo&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1571491812&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"backtrader &#8211; comparing buy strategies\" data-image-description=\"&lt;p&gt;Backtrader &#8211; comparing strategies for buy signal&lt;\/p&gt;\n\" data-image-caption=\"\" data-medium-file=\"http:\/\/intelligentonlinetools.com\/blog\/wp-content\/uploads\/2019\/10\/backtrader-comparing-buy-strategies-300x140.jpg\" data-large-file=\"http:\/\/intelligentonlinetools.com\/blog\/wp-content\/uploads\/2019\/10\/backtrader-comparing-buy-strategies-1024x478.jpg\" decoding=\"async\" loading=\"lazy\" src=\"http:\/\/intelligentonlinetools.com\/blog\/wp-content\/uploads\/2019\/10\/backtrader-comparing-buy-strategies-e1571510154800.jpg\" alt=\"\" width=\"720\" height=\"336\" class=\"alignnone size-full wp-image-2565\" \/><\/p>\n<p>Final Vaues for Strategies<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\ncross 9999.06  \r\nsimple1 9999.31  \r\nsimple2 9999.91  \r\nBB 10011.099999999999  \r\n<\/pre>\n<p>Thus we see that Bollinger Band looks more promising comparing with other strategies that we tried. However we did not do any optimization &#8211; using different parameters to improve performance of strategy.  We learned how to set different strategies with backtrader and got understanding  how to issue buy signal. Below you can find full source code.<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n# -*- coding: utf-8 -*-\r\nimport matplotlib\r\nimport matplotlib.pyplot as plt\r\n\r\nfrom datetime import datetime\r\nimport backtrader as bt\r\n\r\nmatplotlib.use('Qt5Agg')\r\nplt.switch_backend('Qt5Agg')\r\n\r\n# Create a subclass of Strategy to define the indicators and logic\r\nclass SmaCross(bt.Strategy):\r\n    # parameters which are configurable for the strategy\r\n    params = dict(\r\n        pfast=10,  # period for the fast moving average\r\n        pslow=30,   # period for the slow moving average\r\n    )\r\n     params['tr_strategy'] = None\r\n\r\n    def __init__(self):\r\n          \r\n        self.boll = bt.indicators.BollingerBands(period=50, devfactor=2)\r\n        self.dataclose= self.datas[0].close    # Keep a reference to \r\n        self.sma1 = bt.ind.SMA(period=self.p.pfast)  # fast moving average\r\n        self.sma2 = bt.ind.SMA(period=self.p.pslow)  # slow moving average\r\n        self.crossover = bt.ind.CrossOver(self.sma1, self.sma2)  # crossover signal\r\n        self.tr_strategy = self.params.tr_strategy\r\n\r\n    def next(self, strategy_type=&quot;&quot;):\r\n        tr_str = self.tr_strategy\r\n        print (self.tr_strategy)\r\n       \r\n        # Log the closing prices of the series\r\n        self.log(&quot;Close, {0:8.2f} &quot;.format(self.dataclose[0]))\r\n        self.log('sma1, {0:8.2f}'.format(self.sma1[0]))\r\n        \r\n        if tr_str == &quot;cross&quot;:\r\n            if not self.position:  # not in the market\r\n                if self.crossover &gt; 0:  # if fast crosses slow to the upside\r\n                    self.buy()  # enter long\r\n\r\n              \r\n        if tr_str == &quot;simple1&quot;:\r\n          \r\n            if not self.position: # not in the market\r\n                if self.dataclose[0] &lt; self.dataclose[-1]:\r\n                    if self.dataclose[-1] &lt; self.dataclose[-2]:\r\n                        self.log('BUY CREATE {0:8.2f}'.format(self.dataclose[0]))\r\n                        self.order = self.buy()\r\n                        \r\n        if tr_str == &quot;simple2&quot;:\r\n           \r\n            if not self.position: # not in the market\r\n                if (self.dataclose[0] - self.dataclose[-1]) &lt; -0.05*self.dataclose[0] or (self.dataclose[0] - self.dataclose[-2]) &lt; -0.05*self.dataclose[0] or (self.dataclose[0] - self.dataclose[-3]) &lt; -0.05*self.dataclose[0] or (self.dataclose[0] - self.dataclose[-4]) &lt; -0.05*self.dataclose[0]:\r\n                  \r\n                        self.log('BUY CREATE {0:8.2f}'.format(self.dataclose[0]))\r\n                        self.order = self.buy()                \r\n                        \r\n        if tr_str == &quot;BB&quot;:\r\n            #if self.data.close &gt; self.boll.lines.top:\r\n            #self.sell(exectype=bt.Order.Stop, price=self.boll.lines.top[0], size=self.p.size)\r\n            if self.data.close &lt; self.boll.lines.bot:\r\n                self.log('BUY CREATE {0:8.2f}'.format(self.dataclose[0]))\r\n                self.order = self.buy()     \r\n                \r\n        print('Current Portfolio Value: %.2f' % cerebro.broker.getvalue())            \r\n        \r\n    def log(self, txt, dt=None):\r\n        # Logging function for the strategy.  'txt' is the statement and 'dt' can be used to specify a specific datetime\r\n        dt = dt or self.datas[0].datetime.date(0)\r\n        print('{0},{1}'.format(dt.isoformat(),txt))\r\n     \r\n        \r\n    def notify_trade(self,trade):\r\n        if not trade.isclosed:\r\n            return\r\n        \r\n        self.log('OPERATION PROFIT, GROSS {0:8.2f}, NET {1:8.2f}'.format(\r\n            trade.pnl, trade.pnlcomm))    \r\n \r\n        \r\nstrategy_final_values=[0,0,0,0]\r\nstrategies = [&quot;cross&quot;, &quot;simple1&quot;, &quot;simple2&quot;, &quot;BB&quot;]\r\n\r\n\r\nfor tr_strategy in strategies:         \r\n\r\n    cerebro = bt.Cerebro()  # create a &quot;Cerebro&quot; engine instance\r\n       \r\n    data = bt.feeds.GenericCSVData(\r\n        dataname='GE.csv',\r\n    \r\n        fromdate=datetime(2019, 1, 1),\r\n        todate=datetime(2019, 9, 13),\r\n  \r\n        nullvalue=0.0,\r\n    \r\n        dtformat=('%Y-%m-%d'),\r\n  \r\n        datetime=0,\r\n        high=2,\r\n        low=3,\r\n        open=1,\r\n        close=4,\r\n        adjclose=5,\r\n        volume=6,\r\n        openinterest=-1\r\n      \r\n    )\r\n    \r\n\r\n    print (&quot;data&quot;)\r\n    print (data )\r\n    cerebro.adddata(data)  # Add the data feed\r\n\r\n    # Print out the starting conditions\r\n    print('Starting Portfolio Value: %.2f' % cerebro.broker.getvalue())\r\n    \r\n    \r\n    cerebro.addstrategy(SmaCross, tr_strategy=tr_strategy)  # Add the trading strategy\r\n    result=cerebro.run()  # run it all\r\n    figure=cerebro.plot(iplot=False)[0][0]  \r\n    figure.savefig('example.png')\r\n    \r\n    # Print out the final result\r\n    print('Final Portfolio Value: %.2f' % cerebro.broker.getvalue())\r\n    ind=strategies.index(tr_strategy)\r\n    strategy_final_values[ind] = cerebro.broker.getvalue()\r\n    \r\nprint (&quot;Final Vaues for Strategies&quot;)\r\nfor tr_strategy in strategies: \r\n    ind=strategies.index(tr_strategy)\r\n    print (&quot;{} {}  &quot;. format(tr_strategy, strategy_final_values[ind]))     \r\n \r\n<\/pre>\n<p><strong>References<\/strong><br \/>\n1. <a href=\"https:\/\/www.backtrader.com\/\" target=\"_blank\">Backtrader<\/a><br \/>\n2. <a href=\"https:\/\/www.backtrader.com\/docu\/quickstart\/quickstart\/\" target=\"_blank\">         BackTrader Documentation &#8211; Quickstart<\/a><br \/>\n3. <a href=\"https:\/\/backtest-rookies.com\/2018\/02\/23\/backtrader-bollinger-mean-reversion-strategy\/\" target=\"_blank\">Backtrader: Bollinger Mean Reversion Strategy<\/a><br \/>\n4. <a href=https:\/\/blog.rmotr.com\/bitcoin-trading-with-python-bollinger-bands-strategy-analysis-b1a223385a89 target=\"_blank\">Bitcoin trading with Python \u2014 Bollinger Bands strategy analysis<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the post Bitcoin trading with Python \u2014 Bollinger Bands strategy analysis the author reported 34% returns over the initial investment on back test. Does it work all the time? Is it the best strategy? Let us use backtrader platform and compare several strategies just for buy signal. Backtrader is a feature-rich Python framework for &#8230; <a title=\"Comparing Strategies for Detecting Buy Signal with BackTrader\" class=\"read-more\" href=\"http:\/\/intelligentonlinetools.com\/blog\/2019\/10\/13\/comparing-strategies-detecting-buy-signal\/\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":[]},"categories":[127,3],"tags":[128,131,130,129],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Comparing Strategies for Detecting Buy Signal with BackTrader - Machine Learning Applications<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/intelligentonlinetools.com\/blog\/2019\/10\/13\/comparing-strategies-detecting-buy-signal\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Comparing Strategies for Detecting Buy Signal with BackTrader - Machine Learning Applications\" \/>\n<meta property=\"og:description\" content=\"In the post Bitcoin trading with Python \u2014 Bollinger Bands strategy analysis the author reported 34% returns over the initial investment on back test. Does it work all the time? Is it the best strategy? Let us use backtrader platform and compare several strategies just for buy signal. Backtrader is a feature-rich Python framework for ... Read more\" \/>\n<meta property=\"og:url\" content=\"http:\/\/intelligentonlinetools.com\/blog\/2019\/10\/13\/comparing-strategies-detecting-buy-signal\/\" \/>\n<meta property=\"og:site_name\" content=\"Machine Learning Applications\" \/>\n<meta property=\"article:published_time\" content=\"2019-10-13T01:21:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-10-19T18:54:12+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/intelligentonlinetools.com\/blog\/wp-content\/uploads\/2019\/10\/backtrader-comparing-buy-strategies-e1571510154800.jpg\" \/>\n<meta name=\"author\" content=\"owygs156\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"owygs156\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/intelligentonlinetools.com\/blog\/2019\/10\/13\/comparing-strategies-detecting-buy-signal\/\",\"url\":\"http:\/\/intelligentonlinetools.com\/blog\/2019\/10\/13\/comparing-strategies-detecting-buy-signal\/\",\"name\":\"Comparing Strategies for Detecting Buy Signal with BackTrader - Machine Learning Applications\",\"isPartOf\":{\"@id\":\"http:\/\/intelligentonlinetools.com\/blog\/#website\"},\"datePublished\":\"2019-10-13T01:21:09+00:00\",\"dateModified\":\"2019-10-19T18:54:12+00:00\",\"author\":{\"@id\":\"http:\/\/intelligentonlinetools.com\/blog\/#\/schema\/person\/7a886dc5eb9758369af2f6d2cb342478\"},\"breadcrumb\":{\"@id\":\"http:\/\/intelligentonlinetools.com\/blog\/2019\/10\/13\/comparing-strategies-detecting-buy-signal\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/intelligentonlinetools.com\/blog\/2019\/10\/13\/comparing-strategies-detecting-buy-signal\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/intelligentonlinetools.com\/blog\/2019\/10\/13\/comparing-strategies-detecting-buy-signal\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/intelligentonlinetools.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Comparing Strategies for Detecting Buy Signal with BackTrader\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/intelligentonlinetools.com\/blog\/#website\",\"url\":\"http:\/\/intelligentonlinetools.com\/blog\/\",\"name\":\"Machine Learning Applications\",\"description\":\"Artificial intelligence, data mining and machine learning for building web based tools and services.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/intelligentonlinetools.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/intelligentonlinetools.com\/blog\/#\/schema\/person\/7a886dc5eb9758369af2f6d2cb342478\",\"name\":\"owygs156\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/intelligentonlinetools.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/2.gravatar.com\/avatar\/b351def598609cb4c0b5bca26497c7e5?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/2.gravatar.com\/avatar\/b351def598609cb4c0b5bca26497c7e5?s=96&d=mm&r=g\",\"caption\":\"owygs156\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Comparing Strategies for Detecting Buy Signal with BackTrader - Machine Learning Applications","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/intelligentonlinetools.com\/blog\/2019\/10\/13\/comparing-strategies-detecting-buy-signal\/","og_locale":"en_US","og_type":"article","og_title":"Comparing Strategies for Detecting Buy Signal with BackTrader - Machine Learning Applications","og_description":"In the post Bitcoin trading with Python \u2014 Bollinger Bands strategy analysis the author reported 34% returns over the initial investment on back test. Does it work all the time? Is it the best strategy? Let us use backtrader platform and compare several strategies just for buy signal. Backtrader is a feature-rich Python framework for ... Read more","og_url":"http:\/\/intelligentonlinetools.com\/blog\/2019\/10\/13\/comparing-strategies-detecting-buy-signal\/","og_site_name":"Machine Learning Applications","article_published_time":"2019-10-13T01:21:09+00:00","article_modified_time":"2019-10-19T18:54:12+00:00","og_image":[{"url":"http:\/\/intelligentonlinetools.com\/blog\/wp-content\/uploads\/2019\/10\/backtrader-comparing-buy-strategies-e1571510154800.jpg"}],"author":"owygs156","twitter_card":"summary_large_image","twitter_misc":{"Written by":"owygs156","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/intelligentonlinetools.com\/blog\/2019\/10\/13\/comparing-strategies-detecting-buy-signal\/","url":"http:\/\/intelligentonlinetools.com\/blog\/2019\/10\/13\/comparing-strategies-detecting-buy-signal\/","name":"Comparing Strategies for Detecting Buy Signal with BackTrader - Machine Learning Applications","isPartOf":{"@id":"http:\/\/intelligentonlinetools.com\/blog\/#website"},"datePublished":"2019-10-13T01:21:09+00:00","dateModified":"2019-10-19T18:54:12+00:00","author":{"@id":"http:\/\/intelligentonlinetools.com\/blog\/#\/schema\/person\/7a886dc5eb9758369af2f6d2cb342478"},"breadcrumb":{"@id":"http:\/\/intelligentonlinetools.com\/blog\/2019\/10\/13\/comparing-strategies-detecting-buy-signal\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/intelligentonlinetools.com\/blog\/2019\/10\/13\/comparing-strategies-detecting-buy-signal\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/intelligentonlinetools.com\/blog\/2019\/10\/13\/comparing-strategies-detecting-buy-signal\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/intelligentonlinetools.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Comparing Strategies for Detecting Buy Signal with BackTrader"}]},{"@type":"WebSite","@id":"http:\/\/intelligentonlinetools.com\/blog\/#website","url":"http:\/\/intelligentonlinetools.com\/blog\/","name":"Machine Learning Applications","description":"Artificial intelligence, data mining and machine learning for building web based tools and services.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/intelligentonlinetools.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/intelligentonlinetools.com\/blog\/#\/schema\/person\/7a886dc5eb9758369af2f6d2cb342478","name":"owygs156","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/intelligentonlinetools.com\/blog\/#\/schema\/person\/image\/","url":"http:\/\/2.gravatar.com\/avatar\/b351def598609cb4c0b5bca26497c7e5?s=96&d=mm&r=g","contentUrl":"http:\/\/2.gravatar.com\/avatar\/b351def598609cb4c0b5bca26497c7e5?s=96&d=mm&r=g","caption":"owygs156"}}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7h1IJ-F7","jetpack-related-posts":[{"id":115,"url":"http:\/\/intelligentonlinetools.com\/blog\/2016\/02\/20\/swing-stock-trading\/","url_meta":{"origin":2549,"position":0},"title":"Swing Stock Trading","date":"February 20, 2016","format":false,"excerpt":"Swing stock trading means buying and selling stocks many times when the stock prices are at or near their bottom or top position. Some details and more information can be found at [1],[2]. The simple and well known rule - buy low and sell high can be applied here too.\u2026","rel":"","context":"In &quot;Stock data analysis&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":57,"url":"http:\/\/intelligentonlinetools.com\/blog\/2016\/02\/07\/bollinger-bands\/","url_meta":{"origin":2549,"position":1},"title":"Bollinger Bands","date":"February 7, 2016","format":false,"excerpt":"Bollinger Bands - are advanced technical indicators that consist of three curves: [1] 1. an N-period moving average (MA). Usually simple moving average (SMA) 2. an upper band at K times an N-period standard deviation above the moving average (MA + K\u03c3), K is usually 2 and N is usually\u2026","rel":"","context":"In &quot;Stock data analysis&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2117,"url":"http:\/\/intelligentonlinetools.com\/blog\/2018\/06\/16\/fibonacci-stock-trading-using-fibonacci-retracement-stock-market-prediction\/","url_meta":{"origin":2549,"position":2},"title":"Fibonacci Stock Trading &#8211; Using Fibonacci Retracement for Stock Market Prediction","date":"June 16, 2018","format":false,"excerpt":"As stated on allstarcharts.com by expert with more than 10 years, Fibonacci Analysis is one of the most valuable and easy to use tools for stock market technical analysis. And Fibonacci tools can be applied to longer-term as well as to short-term. [3] In this post we will take a\u2026","rel":"","context":"In &quot;Fibonacci Numbers&quot;","img":{"alt_text":"Fibonacci numbers","src":"https:\/\/i0.wp.com\/intelligentonlinetools.com\/blog\/wp-content\/uploads\/2018\/06\/fibonacci-1601158_640.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1446,"url":"http:\/\/intelligentonlinetools.com\/blog\/2017\/11\/06\/10-new-top-resources-on-machine-learning-from-around-the-web\/","url_meta":{"origin":2549,"position":3},"title":"10 New Top Resources on Machine Learning from Around the Web","date":"November 6, 2017","format":false,"excerpt":"For this post I put new and most interesting machine learning resources that I recently found on the web. This is the list of useful resources in such areas like stock market forecasting, text mining, deep learning, neural networks and getting data from Twitter. Hope you enjoy the reading. 1.\u2026","rel":"","context":"In &quot;Machine Learning&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1628,"url":"http:\/\/intelligentonlinetools.com\/blog\/2017\/12\/17\/time-series-analysis-python-prophet\/","url_meta":{"origin":2549,"position":4},"title":"Time Series Analysis with Python and Prophet","date":"December 17, 2017","format":false,"excerpt":"Recently Facebook released Prophet - open source software tool for forecasting time series data. Facebook team have implemented in Prophet two trend models that can cover many applications: a saturating growth model, and a piecewise linear model. [4] With growth model Prophet can be used for prediction growth\/decay - for\u2026","rel":"","context":"In &quot;Machine Learning&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/intelligentonlinetools.com\/blog\/wp-content\/uploads\/2017\/12\/time-series-analysis-python-300x180.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":120,"url":"http:\/\/intelligentonlinetools.com\/blog\/2016\/02\/20\/input-for-stock-data-prediction-algorithms\/","url_meta":{"origin":2549,"position":5},"title":"Input for Stock Data Prediction Algorithms","date":"February 20, 2016","format":false,"excerpt":"What can be used for input to stock data prediction system? In this post we will consider some indicator that often are used for stock data forecasting. The links to information about indicators and how to calculate will be also provided. Moving averages are often used in technical analysis. A\u2026","rel":"","context":"In &quot;Stock data analysis&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/intelligentonlinetools.com\/blog\/wp-json\/wp\/v2\/posts\/2549"}],"collection":[{"href":"http:\/\/intelligentonlinetools.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/intelligentonlinetools.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/intelligentonlinetools.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/intelligentonlinetools.com\/blog\/wp-json\/wp\/v2\/comments?post=2549"}],"version-history":[{"count":15,"href":"http:\/\/intelligentonlinetools.com\/blog\/wp-json\/wp\/v2\/posts\/2549\/revisions"}],"predecessor-version":[{"id":2567,"href":"http:\/\/intelligentonlinetools.com\/blog\/wp-json\/wp\/v2\/posts\/2549\/revisions\/2567"}],"wp:attachment":[{"href":"http:\/\/intelligentonlinetools.com\/blog\/wp-json\/wp\/v2\/media?parent=2549"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/intelligentonlinetools.com\/blog\/wp-json\/wp\/v2\/categories?post=2549"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/intelligentonlinetools.com\/blog\/wp-json\/wp\/v2\/tags?post=2549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}