mirror of
https://github.com/farcasclaudiu/TradingAgents.git
synced 2026-06-29 03:01:24 +03:00
Add Alpha Vantage API integration as primary data provider
- Replace FinnHub with Alpha Vantage API in README documentation - Implement comprehensive Alpha Vantage modules: - Stock data (daily OHLCV with date filtering) - Technical indicators (SMA, EMA, MACD, RSI, Bollinger Bands, ATR) - Fundamental data (overview, balance sheet, cashflow, income statement) - News and sentiment data with insider transactions - Update news analyst tools to use ticker-based news search - Integrate Alpha Vantage vendor methods into interface routing - Maintain backward compatibility with existing vendor system 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ def create_news_analyst(llm):
|
||||
]
|
||||
|
||||
system_message = (
|
||||
"You are a news researcher tasked with analyzing recent news and trends over the past week. Please write a comprehensive report of the current state of the world that is relevant for trading and macroeconomics. Use the get_news_data tool with different news_type parameters: 'global_news' for macroeconomic news, 'company_news' for company-specific news, 'reddit_global' for social sentiment, 'google' for general news searches. Do not simply state the trends are mixed, provide detailed and finegrained analysis and insights that may help traders make decisions."
|
||||
"You are a news researcher tasked with analyzing recent news and trends over the past week. Please write a comprehensive report of the current state of the world that is relevant for trading and macroeconomics. Use the available tools: get_news(query, start_date, end_date) for company-specific or targeted news searches, and get_global_news(curr_date, look_back_days, limit) for broader macroeconomic news. Do not simply state the trends are mixed, provide detailed and finegrained analysis and insights that may help traders make decisions."
|
||||
+ """ Make sure to append a Markdown table at the end of the report to organize key points in the report, organized and easy to read."""
|
||||
)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ def create_social_media_analyst(llm):
|
||||
]
|
||||
|
||||
system_message = (
|
||||
"You are a social media and company specific news researcher/analyst tasked with analyzing social media posts, recent company news, and public sentiment for a specific company over the past week. You will be given a company's name your objective is to write a comprehensive long report detailing your analysis, insights, and implications for traders and investors on this company's current state after looking at social media and what people are saying about that company, analyzing sentiment data of what people feel each day about the company, and looking at recent company news. Use get_news_data with news_type parameters: 'company_news' for company-specific news, 'reddit_stock' for Reddit discussions about the stock. Try to look at all sources possible from social media to sentiment to news. Do not simply state the trends are mixed, provide detailed and finegrained analysis and insights that may help traders make decisions."
|
||||
"You are a social media and company specific news researcher/analyst tasked with analyzing social media posts, recent company news, and public sentiment for a specific company over the past week. You will be given a company's name your objective is to write a comprehensive long report detailing your analysis, insights, and implications for traders and investors on this company's current state after looking at social media and what people are saying about that company, analyzing sentiment data of what people feel each day about the company, and looking at recent company news. Use the get_news(query, start_date, end_date) tool to search for company-specific news and social media discussions. Try to look at all sources possible from social media to sentiment to news. Do not simply state the trends are mixed, provide detailed and finegrained analysis and insights that may help traders make decisions."
|
||||
+ """ Make sure to append a Markdown table at the end of the report to organize key points in the report, organized and easy to read.""",
|
||||
)
|
||||
|
||||
|
||||
@@ -4,21 +4,21 @@ from tradingagents.dataflows.interface import route_to_vender
|
||||
|
||||
@tool
|
||||
def get_news(
|
||||
query: Annotated[str, "Search query or ticker symbol"],
|
||||
ticker: Annotated[str, "Ticker symbol"],
|
||||
start_date: Annotated[str, "Start date in yyyy-mm-dd format"],
|
||||
end_date: Annotated[str, "End date in yyyy-mm-dd format"],
|
||||
) -> str:
|
||||
"""
|
||||
Retrieve news data for a given query or ticker symbol.
|
||||
Retrieve news data for a given ticker symbol.
|
||||
Uses the configured news_data vendor.
|
||||
Args:
|
||||
query (str): Search query or ticker symbol
|
||||
ticker (str): Ticker symbol
|
||||
start_date (str): Start date in yyyy-mm-dd format
|
||||
end_date (str): End date in yyyy-mm-dd format
|
||||
Returns:
|
||||
str: A formatted string containing news data
|
||||
"""
|
||||
return route_to_vender("get_news", query, start_date, end_date)
|
||||
return route_to_vender("get_news", ticker, start_date, end_date)
|
||||
|
||||
@tool
|
||||
def get_global_news(
|
||||
|
||||
Reference in New Issue
Block a user