What It Does

Backtrader allows you to write custom trading strategies and evaluate them over given timeframes. A sample of 30/180 SMA crossover strategy is provided as a reference.

How It Works

By creating a custom Backtrader and custom Strategy class, you’re able to retrieve historical stock data for any public company and evaluate the strategy you’ve defined.

The Backtrader class:

The Strategy class:

What’s next

Support for multiple stocks at once and potential Robinhood integration

Built with

Python, Pandas

python • finance • stock trading