Bitcoin Trading Bot Simulations Looking Good!

Using PyCryptoBot simulations for backtesting algorithmic trading strategies

Michael Whittle
Published in
3 min readJan 2, 2021

--

I’m in the process of developing a crypto trading bot in Python. I’ve been writing a series of articles documenting the progress. The Github repo can be found here.

I’ve got to the point now where I want to run simulations using real data to see how the bot would perform in the wild. This is excluding fees for the moment but I’ll add those next.

My first experiment looks as follows…

Let’s break this down…

  • Import my CoinbasePro model
  • Import my TradingGraphs view
  • Create a Pandas DataFrame using the Coinbase Pro API from the BTC-USD market using 1 hour intervals
  • Add the EMA12 and EMA26 Buy and Sell signals to the Pandas DataFrame
  • Add the MACD Buy and Sell signals to the Pandas DataFrame
  • The column “ema12gtema26co” shows the index where the EMA12 crosses above the EMA26 and the “ema12ltema26co” shows the index where the EMA12 crosses…

--

--

Michael Whittle
Coinmonks

Solution Architect — CCIE R&S #24223 | Full-Stack / Blockchain / Web3 Developer | Security Specialist | PyCryptoBot Creator