Welcome back to my 7th tutorial part with the Reinforcement Learning Bitcoin trading bot. To get to the point where we are now, I had to write thousands of code lines and spend thousands of hours while training my models. But if someone would be told me, that to get to the current 7th tutorial it would have cost me so much, I am not sure if I would be starting doing this tutorial series.
On the other hand, I’m proud of myself that I didn’t give up and no matter how hard it was or I didn’t know…
Algorithmic trading is a popular way to address the rapidly changing and volatile environment of cryptocurrency markets. However implementing an automated trading strategy is challenging and requires a lot of backtesting, which in turn requires a lot of historical data and computational power. While developing a Bitcoin RL trading bot I found out that it’s quite hard to get lower timeframe historical timeframe data. While there are many sources on the market that offer historical cryptocurrency data most of them have drawbacks. A lot of them require to pay for such data and are not that cheap, and sources…
In my previous tutorials, we already created a python custom Environment to trade Bitcoin, we wrote a Reinforcement Learning agent to do so. Also, we tested 3 different architectures (Dense, CNN, LSTM) and compared their performance, training durations, and tested their profitability. Actually, I thought that probably there are no traders or investors who would be doing blind trades without doing some kind of technical or fundamental analysis, more or less everyone uses technical indicators. So I thought ok if we can create a trading bot doing some kind of profitable trades just from Price Action, maybe we can…
In the last article, we used deep reinforcement learning to create a Bitcoin trading agent that could beat the market. Although our agent was profitable compared to random actions, the results weren’t all that impressive, so this time we’re going to step it up and we’ll try to implement few more improvements with the reward system and we’ll test how our profitability depends on Neural Network model structure. Although, we’ll test everything with our code and of course, you’ll be able to download everything from my Github repository.
I would like to mention, that while writing my reward strategy…
The purpose of the previous and this tutorial is to experiment with state-of-the-art deep reinforcement learning technologies to see if we can create a profitable Bitcoin trading bot. There are many articles on the internet, that states, that neural networks can’t beat the market. However, recent advances within the field have shown that RL agents are typically capable of learning rather more than supervised learning agents within similar problem domains. For this reason, I’m writing these tutorials to experiment if it’s possible, and if it is however profitable we are able to build these trading bots.
If you are unfamiliar with the matplotlib
Python library, don’t worry. I will be going over the code step-by-step, so you could create your own custom visualization, or modify mine according to your needs. If you can’t understand everything, as always, this tutorial code is available on my GitHub repository.
Before moving forward, I will show you a short preview of what we are going to create in this tutorial:
At first look, it might look quite complicated, but actually, it’s not that hard. It’s just a couple of parameters updating on each environment step with some key information…
In my previous LunarLander-v2 and BipedalWalker-v3 tutorials, I was gathering experience in writing Proximal Policy Optimization algorithms, to get some background to start developing my own RL environment. The mentioned tutorials were written upon OpenAI’s gym package, which allows us to experiment with our own reinforcement learning algorithms upon a ton of free environments to experiment with.
These OpenAI environments are great for learning, but eventually, we will want to set up an agent to solve the custom problem. To do this, we would need to create a custom environment, specific to our problem domain. When we have our…
First of all, I should mention that this tutorial is a continuation of my previous tutorial, where I covered PPO with discrete actions.
To develop a continuous action space Proximal Policy Optimization algorithm, first, we must understand what is the difference between them. Because LunarLander-v2 environment has also and continuous environment called LunarLanderContinuous-v2, I’ll mention what is the difference between them:
Welcome to another part of my step-by-step reinforcement learning tutorial with gym and TensorFlow 2. I’ll show you how to implement a Reinforcement Learning algorithm known as Proximal Policy Optimization (PPO) for teaching an AI agent how to land a rocket (Lunarlander-v2). By the end of this tutorial, you’ll get an idea of how to apply an on-policy learning method in an actor-critic framework in order to learn navigating any discrete game environment, next followed by this tutorial I will create a similar tutorial with a continuous environment. …
Welcome to my last YOLOv4 custom object detection tutorial, from the whole series. After giving you a lot of explanations about YOLO I decided to create something fun and interesting, which would be a Counter-Strike Global Offensive game aimbot. What is aimbot? Actually idea is to create an enemy detector, aim at that enemy and shoot it. The same idea we could use in real life for some kind of security system, for example, detect and recognize people around our private house and if it’s an unknown person aim lights at that person or turn on some kind of…
Welcome to my blog. This blog is focused on creating basic and advanced python tutorials for software developers, programmers, and engineers to learn.