fix(dataflows): serve a past run financial statements only with a known filing date

- Yahoo and Alpha Vantage statements, dated by the period they cover, are withheld from a run dated in the past, with a notice saying why
- statements come from SEC EDGAR by default (fundamental_data "sec_edgar,yfinance"), so a past run reads US filers as filed
This commit is contained in:
Yijia-Xiao
2026-09-29 05:57:18 +00:00
parent 1d92269d35
commit d7ac9461da
9 changed files with 119 additions and 99 deletions
+2 -6
View File
@@ -280,13 +280,9 @@ See `tradingagents/default_config.py` for all configuration options.
### Fundamentals as filed
US company statements can come from SEC EDGAR, which records the date every figure was filed. A run dated in the past then reads the statements exactly as they stood that day: a fiscal year that has ended but has not been filed yet is not served, and a figure restated later still reads as first reported. Apple's 2008 total assets were filed as $39.6B and restated to $36.2B in 2010, so a run dated in between reads $39.6B.
US company statements come from SEC EDGAR, which records the date every figure was filed. A run dated in the past reads the statements exactly as they stood that day: a fiscal year that has ended but has not been filed yet is not served, and a figure restated later still reads as first reported. Apple's 2008 total assets were filed as $39.6B and restated to $36.2B in 2010, so a run dated in between reads $39.6B. EDGAR needs no account or API key.
EDGAR needs no account or API key. Add the vendor to the chain:
```python
config["data_vendors"]["fundamental_data"] = "sec_edgar,yfinance"
```
Other companies' statements come from Yahoo Finance, which dates a statement by the period it covers rather than by when it was published. A run dated today reads them; a run dated in the past is told they are withheld, since Yahoo cannot say which figures were public by then.
SEC asks callers to identify themselves and refuses requests that carry no contact address, so a default one is sent. Set your own so SEC can reach you rather than the project: