fastquant
A one-call wrapper over Backtrader, dormant since 2023 and broken on PyPI.
by Lorenzo Ampil
Last updated
What it is
fastquant is a thin Python wrapper over Backtrader whose pitch is a backtest in three lines:
pull a DataFrame, call backtest("smac", df, fast_period=15, slow_period=40), read the final
portfolio value. Nine strategy aliases ship with it — rsi, smac, emac, macd, bbands,
buynhold, sentiment, custom and ternary — plus a multi mode that ORs several together.
Pass a range instead of a number for any parameter and it grid-searches the combinations and
returns them as a sorted DataFrame.
Everything underneath is Backtrader: the event loop, the sizers, the analyzers and the matplotlib plot. What fastquant adds is the defaults, and the defaults are what to check.
Data & coverage
get_stock_data calls yfinance for daily Yahoo bars and falls back to the Philippine Stock
Exchange through the phisix API; get_crypto_data calls ccxt, Binance by default, at 1w, 1d, 1h
or 1m. It ships no data of its own — it wraps other people's free endpoints, which is where the
rot shows first.
Integrations
Backtrader, pandas in and out, ccxt for crypto. backtest(channel="slack") posts each signal
to a Slack incoming webhook read from SLACK_URL, and an SMTP email helper does the same. The
custom strategy takes a column of model output, which is how the examples wire in Prophet
forecasts.
Limitations
- Dormant. Last commit 15 September 2023; last release January 2023; 77 open issues.
- The PyPI build does not import on pandas 2 or later. The fix has sat on master, unreleased, since June 2023.
get_yahoo_datarenames anAdj Closecolumn and expects flat columns. Current yfinance returns neither:download()now defaults toauto_adjust=Trueand a MultiIndex.- The licence is ambiguous. The
LICENSEfile shipped in both the repo and the wheel is MIT, butsetup.py's classifier is GPLv3, so that is what PyPI advertises. Nobody is left to resolve it, which matters if you plan to reuse the code. - The primary phisix endpoint,
1.phisix-api.appspot.com, returned 503 on 13 September 2026. The code's documented fallback tophisix-api2.appspot.comstill answers, current and dated quotes alike, so the PSE path survives. The sentiment helper that scrapes abusinesstimes.com.sgsearch URL does not: that URL now 404s. - Cheat-on-close is forced on for every run. Orders fill at the close of the bar that generated the signal, which the source comment itself calls "technically impossible". Commission defaults to zero.
- Daily bars, one instrument, no live or paper trading, no intrabar fills.
Alternatives
Backtrader itself, if you want the engine without the wrapper. Backtesting.py for the same "few lines" ergonomics on a maintained codebase, VectorBT for vectorised parameter sweeps, NautilusTrader if the goal resembles production.
Specs
- Interfaces
- webhooks, Python, Python
- Export
- CSV
- Asset classes
- Stocks, ETF, Crypto
- Markets
- US, Asia, Global
- Platforms
- Library
- AI features
- None
- Capabilities
- Backtesting, Alerts
- Pricing verified
- Capabilities verified
- Coverage verified
Also worth comparing
- Backtesting.py — A single-instrument Python backtester — one OHLC series, one strategy, no live trading.
- Backtrader — An event-driven Python backtester with 122 indicators, frozen since April 2023.
- bt — Python backtesting for allocation and rebalancing rules, not entries and exits.
- QSTrader — An institutional-shaped Python backtester whose last commit to master was June 2024.
- Zipline-reloaded — The maintained fork of Quantopian's Zipline. Bring your own data — it ships almost none.
- AmiBroker — Windows portfolio backtester scripted in AFL, sold as a perpetual licence.
FAQ
Is fastquant still maintained?
No. The last commit to master landed on 15 September 2023 and the last release, 0.1.8.1, went to PyPI on 4 January 2023. The repository is not archived — it has 77 open issues and 5 open pull requests, some of them years old and unanswered — but nothing has moved in three years.
Does pip install fastquant still work?
The install succeeds; the import does not. The January 2023 wheel still calls from pandas.io.json import json_normalize, which pandas removed in 2.0, so import fastquant raises ImportError on any current pandas. The fix was committed to master in June 2023 and never released, so installing from the master branch is the only route.
What is fastquant a wrapper over?
Backtrader. Every backtest builds a Backtrader Cerebro around a pandas feed, and the metrics come from Backtrader's Returns, SharpeRatio, DrawDown and TradeAnalyzer analyzers. It inherits Backtrader's engine and also Backtrader's maintenance status — that project's own last release, 1.9.78.123, is from April 2023.
Can fastquant place live orders?
No. It exposes none of Backtrader's live broker integrations — backtest() wires a pandas DataFrame to the simulated broker and nothing else. There is a Slack and email helper that posts buy and sell signals, which is as close as it gets.