Photo by Levi Elizaga

Alpaca and our users grow with open source

One of the great things in the algo trading is that you don’t have to build everything from scratch. The open source community has evolved in software space exponentially, and the potential of its power is unlimited. At Alpaca, I’m talking with great people and getting insights what’s available everyday, but today, I wanted to share our initial version of Alpaca Backtrader integration library.

What is Backtrader anyway?

Backtrader is an open source algo trading framework in pure Python developed by Daniel Rodriguez as his own project and has been active for last few years. It follows the perfect example of open source project, with full transparency, github-centric project management, well-described online manual and growing community.

The framework is time-series driven style, and as far as you supply time-series data, it works pretty well with any kind of asset classes. Also there are a number of useful built-in indicator calculators as well as very flexible strategy building blocks such as position sizers and performance analysis. It also comes with graphical plotting functionality using matplotlib with full customization.

The best part of it is almost all functionalities are extensible, and you can feed different source of data, your own style of position sizing, custom indicators etc. Last but not least, the framework works seamlessly between backtesting and live trading. What it means is that you can easily test your trading strategy with the historical data and go live with a few changes to apply the strategy.

Alpaca Backtrader API

As the framework is fully extensible, Alpaca’s approach to this great framework is to stay away from the core source code, but maintain our own integration piece on top of it. You can find the integration library at PyPI as alpaca-backtrader-api today, and we continue to develop and release our effort over the time.

This model has a great advantage that Alpaca’s integration can frequently updated without worrying about breaking the Backtrader core system. As other open source libraries we maintain, all kind of feedback and feature requests are welcomed, and you can even send pull requests if you find is easier and beneficial to others too.