Originally published at: Backtesting Trading Strategies with Python Pandas: A Comprehensive Guide | EODHD APIs Academy
Using Python Pandas to backtest algorithmic trading strategies There are so many trading strategies and candlestick patterns out there, but the question is — how do you measure the performance? This is where a financial data APIs like the one by EODHD are really helpful. You can simulate how a strategy or candlestick pattern would perform using historical data. I wanted to develop a backtesting tool using the data science Pandas library for Python. I’ve created a proof of concept for it, and it’s working well. I will talk you through the thought process I went through while creating it. Register & Get Data What will we need? The EODHD official Python library. Trading data converted into a Pandas dataframe (date, open, high, close, low, volume) Configurable test settings (balance_base, account_balance,…