{"id":20,"date":"2023-01-27T06:33:57","date_gmt":"2023-01-27T06:33:57","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/lyond\/?p=20"},"modified":"2023-01-27T06:39:11","modified_gmt":"2023-01-27T06:39:11","slug":"what-weve-learned-so-far-about-ai-crypto-trading","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/lyond\/2023\/01\/27\/what-weve-learned-so-far-about-ai-crypto-trading\/","title":{"rendered":"What we&#8217;ve learned so far about AI Crypto Trading"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Objective:<\/h2>\n\n\n\n<p>The objective of this project is to train a neural network to trade Bitcoin and other cryptocurrencies. We will use reinforcement learning to train a neural network, using machine learning libraries such as TensorFlow.<\/p>\n\n\n\n<p>We will train the network on historical cryptocurrency price data. Once trained the network will be evaluated on its trading during a period that was not part of the training data.<\/p>\n\n\n\n<p>In addition to creating the neural network itself we will connect it with the Binance Exchange API and show that it can execute trades in real-time on a paper trading account.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/dereklyonheart\/CS467_AI_Bitcoin_Trader\/wiki#the-challenge\"><\/a>The Challenge:<\/h2>\n\n\n\n<p>The problem of predictive trading of cryptocurrencies can be classified as a subset of time-series forecasting. This is a well-researched field that impacts multiple industries such as stock markets, weather forecasting, pandemic monitoring, and business strategizing.<\/p>\n\n\n\n<p>In terms of designing a neural network, the defining characteristic of our time-series data is that order of inputs matters. This is in contrast to say a neural network that is trained for basic object recognition &#8211; where the order of the images should not have an impact on the model&#8217;s performance. With time-series data the order of data is critical and provides further selection guidance for both traditional forecasting techniques as well as neural network design.<\/p>\n\n\n\n<p>Our group will be selecting a Recurrent Neural Network model for our implementation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/dereklyonheart\/CS467_AI_Bitcoin_Trader\/wiki#recurrent-neural-networks\"><\/a>Recurrent Neural Networks<\/h2>\n\n\n\n<p>&#8220;Recurrent neural networks &#8211; specifically long short-term memory (LSTM) networks and gated recurrent units (GRUs_- are good at extracting patterns in input data that span over relatively long sequences.&#8221; [1]. What makes the recurrent neural network architecture unique is that inputs can map not only to an output, but also map a hidden state that feeds back into the network. [1] In simpler terms, this provides a memory-like quality to the network to allow mapping of input data over time to an output &#8211; which is ideal for time series data.<\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/user-images.githubusercontent.com\/49388020\/215023062-63b7e157-367a-466e-a445-d0c2d5c110bb.png\" alt=\"image\">&nbsp;Fig 1: Representation of a recurrent neural network. [1]<\/p>\n\n\n\n<p>In our project, we will explore both LSTM and GRU networks if time allows to see which produces a better model for our application.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/dereklyonheart\/CS467_AI_Bitcoin_Trader\/wiki#citations\"><\/a>Citations<\/h2>\n\n\n\n<p>[1] Lazzeri, F. (2020). Machine learning for time series forecasting with Python. John Wiley &amp; Sons.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Objective: The objective of this project is to train a neural network to trade Bitcoin and other cryptocurrencies. We will use reinforcement learning to train a neural network, using machine learning libraries such as TensorFlow. We will train the network on historical cryptocurrency price data. Once trained the network will be evaluated on its trading [&hellip;]<\/p>\n","protected":false},"author":13235,"featured_media":22,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-20","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/lyond\/wp-json\/wp\/v2\/posts\/20","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/lyond\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/lyond\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/lyond\/wp-json\/wp\/v2\/users\/13235"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/lyond\/wp-json\/wp\/v2\/comments?post=20"}],"version-history":[{"count":1,"href":"https:\/\/blogs.oregonstate.edu\/lyond\/wp-json\/wp\/v2\/posts\/20\/revisions"}],"predecessor-version":[{"id":21,"href":"https:\/\/blogs.oregonstate.edu\/lyond\/wp-json\/wp\/v2\/posts\/20\/revisions\/21"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/lyond\/wp-json\/wp\/v2\/media\/22"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/lyond\/wp-json\/wp\/v2\/media?parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/lyond\/wp-json\/wp\/v2\/categories?post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/lyond\/wp-json\/wp\/v2\/tags?post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}