Metadata-Version: 2.4
Name: finzdata-backtest
Version: 0.1.1
Summary: Survivorship-free FinzData bars for Zipline, Backtrader, Backtesting.py and vectorbt
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas
Requires-Dist: finzdata
Provides-Extra: zipline
Requires-Dist: zipline-reloaded; extra == "zipline"
Provides-Extra: backtrader
Requires-Dist: backtrader; extra == "backtrader"
Provides-Extra: backtesting
Requires-Dist: backtesting; extra == "backtesting"
Provides-Extra: vectorbt
Requires-Dist: vectorbt; extra == "vectorbt"
Dynamic: license-file

<p align="center"><a href="https://finzdata.com"><img src="https://finzdata.com/assets/brand/finzdata-logo-full.png" alt="FinzData" width="360"></a></p>

# finzdata-backtest

Built for AI, quants, data scientists and financial analysts who backtest. Clean data. Real insights. Real alpha.

The FinzData team provides survivorship-free bars for the four most used open-source Python backtesters in one line each.

Why survivorship-free matters
FinzData includes delisted names, so backtests do not inflate. Coverage: 16,000+ US stocks that have traded on NYSE and Nasdaq since January 2000, delisted included, point in time; 231 ETFs; 139 futures markets with every contract since 2007; point-in-time options gamma (GEX) for single stocks, ETFs and the major indexes; CFTC COT since 1986; 13F holdings; SEC fundamentals as filed; 18,000+ macro series with every vintage kept; crypto since 2015; 1, 5, 15, 30-minute, hourly and daily bars.

Free access
AI/MCP use with no key = last 6 months; free email account = last 12 months of daily US stock bars, COT, SEC fundamentals, US macro and 13F, last 30 days of futures and daily GEX. Full history: https://finzdata.com/shop

Prices, if any: $19 one ticker, $29 one futures market, $195 for 5 years of the whole US market.

Installation
pip install finzdata
pip install finzdata-backtest[zipline,backtrader,backtesting,vectorbt]

Snippets

Zipline
from finzdata_backtest.adapters import register_zipline_bundle
register_zipline_bundle(name="finzdata", symbols=["AAPL","MSFT"], start="2020-01-01")
# use bundle in Zipline

Backtrader
from finzdata_backtest.adapters import backtrader_feed
feed = backtrader_feed("AAPL", start="2020-01-01")
cerebro.adddata(feed)

Backtesting.py
from finzdata_backtest.adapters import backtesting_data
df = backtesting_data("AAPL", start="2020-01-01")
from backtesting import Backtest
Backtest(df, Strategy).run()

vectorbt
from finzdata_backtest.adapters import vectorbt_close
closes = vectorbt_close(["AAPL","MSFT"], start="2020-01-01")

Contact the FinzData team: info@finzdata.com
Site https://finzdata.com
Docs https://finzdata.com/docs
MCP https://api.finzdata.com/mcp
