Backtest a moving average crossover strategy against historical Yahoo Finance CSV data to see how it would have performed.
Calculate RSI and Bollinger Bands on historical price data to validate a trading signal before going live.
Run a paper trading simulation against real Bitcoin prices on Bitstamp without risking real money.
Measure a strategy's Sharpe ratio and maximum drawdown to compare risk-adjusted performance across multiple approaches.
Deprecated, Python 2.7/3.7 only, for new projects use Basana by the same author instead.
PyAlgoTrade is a Python library for algorithmic trading, meaning code that automatically makes trading decisions based on rules you define. The README prominently notes that this project is deprecated and no longer maintained, and points readers to a newer project called Basana by the same author. The library is built around an event-driven model, where your trading strategy responds to price changes and other market events as they arrive rather than processing data in batches. The original focus was on backtesting, which means running a strategy against historical market data to see how it would have performed in the past. The library also supports paper trading (simulated trading with real market prices but no real money) and live trading, both of which are limited to Bitcoin on the Bitstamp exchange. For analyzing price data, PyAlgoTrade includes a range of common technical indicators: Simple Moving Average, Exponential Moving Average, Relative Strength Index, Bollinger Bands, and others. It can read historical price data from CSV files in formats produced by Yahoo Finance, Google Finance, Quandl, and NinjaTrader. For measuring how well a strategy performs, it provides metrics such as the Sharpe ratio and drawdown analysis, which are standard ways traders evaluate risk and return. It also integrates with TA-Lib, a widely used technical analysis library, and included support for watching Twitter events in real time, which was a common source of market signals at the time the library was active. The library was tested with Python 2.7 and 3.7 and can be installed via pip. Given its deprecated status, new projects should look at Basana instead.
← gbeced on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.