News
news
yfinance-based news data fetching functions.
Functions:
| Name | Description |
|---|---|
get_news_yfinance |
Retrieve news for a specific stock ticker using yfinance. |
get_global_news_yfinance |
Retrieve global/macro economic news using yfinance Search. |
get_news_yfinance
Retrieve news for a specific stock ticker using yfinance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
Stock ticker symbol, such as "AAPL". |
required |
|
str
|
Start date in YYYY-MM-DD format. |
required |
|
str
|
End date in YYYY-MM-DD format. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
A formatted news report, a no-data message, or an error message. |
Source code in src/tradingagents/dataflows/news.py
get_global_news_yfinance
Retrieve global/macro economic news using yfinance Search.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
Current date in YYYY-MM-DD format. |
required |
|
int
|
Number of days used for the report window label. Defaults to 7. |
7
|
|
int
|
Maximum number of articles to return. Defaults to 10. |
10
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
A formatted global news report, a no-data message, or an error message. |