Metadata-Version: 2.4
Name: tradingagents-finzdata
Version: 0.1.0
Summary: FinzData as a data vendor for TradingAgents: point-in-time, survivorship-free prices, SEC statements as filed and macro without look-ahead.
Author-email: FinzData <info@finzdata.com>
License: MIT
Project-URL: Homepage, https://finzdata.com/tradingagents
Project-URL: Documentation, https://finzdata.com/docs
Project-URL: Source, https://github.com/FinzData/tradingagents-finzdata
Keywords: tradingagents,finzdata,market-data,backtesting,llm,agents,point-in-time,survivorship-bias
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: finzdata>=0.1.14
Requires-Dist: pandas>=2.0
Provides-Extra: tradingagents
Requires-Dist: tradingagents; extra == "tradingagents"
Dynamic: license-file

# tradingagents-finzdata

FinzData as a data vendor for TradingAgents (https://github.com/TauricResearch/TradingAgents): point-in-time, survivorship-free data so your agents' backtests hold up.

## Why FinzData

TradingAgents' default price vendor only knows stocks that still trade, so backtests silently drop the failures (survivorship bias). FinzData includes delisted stocks, point in time. Macro values are served as known on the analysis date (no look-ahead from later revisions). Statements as filed with the SEC.

## 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; GEX for single stocks, ETFs and the major indexes; COT since 1986; 13F; SEC fundamentals as filed; 18,000+ macro series with every vintage kept; crypto since 2015.

## Install

`pip install tradingagents-finzdata` and set `FINZDATA_API_KEY` (free key, email only, 12 months of data: https://finzdata.com/account?ref=tradingagents ; full history from $19 per ticker or $195 for 5 years of the whole US market, yours to keep: https://finzdata.com/shop?ref=tradingagents).

## Quick start

```python
from tradingagents.graph.trading_graph import TradingAgentsGraph
from tradingagents_finzdata import register, finzdata_config
register()                      # adds "finzdata" as a vendor
config = finzdata_config()      # prices, indicators, fundamentals and macro from FinzData
ta = TradingAgentsGraph(debug=True, config=config)
_, decision = ta.propagate("NVDA", "2024-05-10")
print(decision)
```

## Mix and match

Use FinzData as primary with fallback:

config["data_vendors"]["core_stock_apis"] = "finzdata,yfinance"

Tool-level override:

config["tool_vendors"]["get_macro_indicators"] = "finzdata"

## Tool mapping

| TradingAgents tool | FinzData source |
|---|---|
| get_stock_data | daily bars |
| get_indicators | computed from FinzData bars: close_50_sma, close_200_sma, close_10_ema, macd, macds, macdh, rsi, boll, boll_ub, boll_lb, atr, vwma |
| get_balance_sheet / get_cashflow / get_income_statement | SEC statements as filed, as of the analysis date |
| get_fundamentals | profile + point-in-time valuation |
| get_insider_transactions | SEC Form 4 |
| get_macro_indicators | 18,000+ series, point in time, aliases cpi, core_cpi, pce, unemployment, payrolls, gdp, fed_funds, 10y_treasury, 2y_treasury, yield_curve, m2, initial_claims |

## Errors

missing key -> vendor not configured (next vendor in your chain is used); history beyond your plan -> vendor unavailable with a link, never a fake "no data".

## Also

The FinzData MCP server https://api.finzdata.com/mcp for Claude, ChatGPT and Cursor; docs https://finzdata.com/docs.

MIT licence. "FinzData is not affiliated with TauricResearch or the TradingAgents project." Support info@finzdata.com.

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