Quick answer
pyfolio-reloaded continues Quantopian’s pyfolio for analysing strategy performance. From returns (and optionally positions and transactions) it builds tear sheets: cumulative returns, rolling Sharpe and beta, drawdown periods, exposures, turnover and round-trip trade statistics. It integrates naturally with Zipline Reloaded.
pyfolio-reloaded at a glance
- Category
- Portfolio optimization & analytics
- Language
- Python
- License
- Apache-2.0
- Does
- Performance analytics
- Markets
- Stocks, ETFs
- Best for
- Detailed tear sheets for equity strategies, especially from Zipline.
- In AlgoGP
- Use the exported strategy object from your own code
Pick it if
Detailed tear sheets for equity strategies, especially from Zipline.
Watch out for
Notebook-oriented plotting.
pyfolio-reloaded strengths and limitations
Strengths
- Positions and transaction analysis, not only returns.
- Familiar Quantopian format.
Limitations
- Notebook-oriented plotting.
- Overlaps with QuantStats for returns-only use.
pyfolio-reloaded example
pip install pyfolio-reloadedimport pyfolio as pf
pf.create_returns_tear_sheet(returns, benchmark_rets=benchmark)Use pyfolio-reloaded with AlgoGP
AlgoGP does not add pyfolio-reloaded to projects automatically yet, but nothing stops you using them together. Every AlgoGP project exports plain Python with a framework-neutral strategy object, so you can call it from pyfolio-reloaded yourself.
- 1
Design and backtest in AlgoGP
Describe the idea to the copilot and backtest it on AlgoGP’s normalized history.
- 2
Add any bridge to get the adapter core
Adding a bridged framework (for example Backtrader) writes
frameworks/algogp_bridge.py, whoseStrategyBridge.on_bar()returns the orders the strategy wants. - 3
Call it from pyfolio-reloaded
Feed pyfolio-reloaded’s bars to
StrategyBridge, place the returned orders with pyfolio-reloaded, and report fills back withsync().
pyfolio-reloaded: frequently asked questions
pyfolio or QuantStats?
QuantStats for quick HTML reports; pyfolio for position and transaction-level analysis.
pyfolio-reloaded alternatives
- QuantStatsPythonPortfolio analytics for quants: Sharpe, Sortino, drawdowns, monthly returns and full HTML tear sheets from a returns series in one line.
- Alphalens ReloadedPythonFactor analysis from the Quantopian lineage: information coefficients, quantile returns and turnover to test whether an alpha factor predicts returns.
- Zipline ReloadedPythonThe maintained fork of Quantopian’s Zipline: an event-driven, pipeline-based backtester for US equities with data bundles and realistic slippage models.
- PyPortfolioOptPythonPortfolio optimization in Python: mean-variance, Black-Litterman, hierarchical risk parity, efficient frontiers and discrete allocation.
Independent guide. AlgoGP is not affiliated with pyfolio-reloaded. Features, licenses and maintenance change; check the official documentation. Nothing here is investment advice.