minor fix
This commit is contained in:
parent
0ab323c2c6
commit
8b04ec307f
|
|
@ -42,7 +42,7 @@ Volatility Indicators:
|
||||||
Volume-Based Indicators:
|
Volume-Based Indicators:
|
||||||
- vwma: VWMA: A moving average weighted by volume. Usage: Confirm trends by integrating price action with volume data. Tips: Watch for skewed results from volume spikes; use in combination with other volume analyses.
|
- vwma: VWMA: A moving average weighted by volume. Usage: Confirm trends by integrating price action with volume data. Tips: Watch for skewed results from volume spikes; use in combination with other volume analyses.
|
||||||
|
|
||||||
- Select indicators that provide diverse and complementary information. Avoid redundancy (e.g., do not select both rsi and stochrsi). Also briefly explain why they are suitable for the given market context. When you tool call, please use the exact name of the indicators provided above as they are defined parameters, otherwise your call will fail. Please make sure to call get_stock_data first to retrieve the CSV that is needed to generate indicators. Then use get_technical_indicators with the specific indicator names. Write a very detailed and nuanced report of the trends you observe. Do not simply state the trends are mixed, provide detailed and finegrained analysis and insights that may help traders make decisions."""
|
- Select indicators that provide diverse and complementary information. Avoid redundancy (e.g., do not select both rsi and stochrsi). Also briefly explain why they are suitable for the given market context. When you tool call, please use the exact name of the indicators provided above as they are defined parameters, otherwise your call will fail. Please make sure to call get_stock_data first to retrieve the CSV that is needed to generate indicators. Then use get_indicators with the specific indicator names. Write a very detailed and nuanced report of the trends you observe. 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."""
|
+ """ 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."""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from langchain_core.tools import tool
|
from langchain_core.tools import tool
|
||||||
from typing import Annotated
|
from typing import Annotated
|
||||||
from tradingagents.dataflows.interface import route_to_vender
|
from tradingagents.dataflows.interface import route_to_vendor
|
||||||
|
|
||||||
|
|
||||||
@tool
|
@tool
|
||||||
|
|
@ -19,4 +19,4 @@ def get_stock_data(
|
||||||
Returns:
|
Returns:
|
||||||
str: A formatted dataframe containing the stock price data for the specified ticker symbol in the specified date range.
|
str: A formatted dataframe containing the stock price data for the specified ticker symbol in the specified date range.
|
||||||
"""
|
"""
|
||||||
return route_to_vender("get_stock_data", symbol, start_date, end_date)
|
return route_to_vendor("get_stock_data", symbol, start_date, end_date)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from langchain_core.tools import tool
|
from langchain_core.tools import tool
|
||||||
from typing import Annotated
|
from typing import Annotated
|
||||||
from tradingagents.dataflows.interface import route_to_vender
|
from tradingagents.dataflows.interface import route_to_vendor
|
||||||
|
|
||||||
|
|
||||||
@tool
|
@tool
|
||||||
|
|
@ -17,7 +17,7 @@ def get_fundamentals(
|
||||||
Returns:
|
Returns:
|
||||||
str: A formatted report containing comprehensive fundamental data
|
str: A formatted report containing comprehensive fundamental data
|
||||||
"""
|
"""
|
||||||
return route_to_vender("get_fundamentals", ticker, curr_date)
|
return route_to_vendor("get_fundamentals", ticker, curr_date)
|
||||||
|
|
||||||
|
|
||||||
@tool
|
@tool
|
||||||
|
|
@ -36,7 +36,7 @@ def get_balance_sheet(
|
||||||
Returns:
|
Returns:
|
||||||
str: A formatted report containing balance sheet data
|
str: A formatted report containing balance sheet data
|
||||||
"""
|
"""
|
||||||
return route_to_vender("get_balance_sheet", ticker, freq, curr_date)
|
return route_to_vendor("get_balance_sheet", ticker, freq, curr_date)
|
||||||
|
|
||||||
|
|
||||||
@tool
|
@tool
|
||||||
|
|
@ -55,7 +55,7 @@ def get_cashflow(
|
||||||
Returns:
|
Returns:
|
||||||
str: A formatted report containing cash flow statement data
|
str: A formatted report containing cash flow statement data
|
||||||
"""
|
"""
|
||||||
return route_to_vender("get_cashflow", ticker, freq, curr_date)
|
return route_to_vendor("get_cashflow", ticker, freq, curr_date)
|
||||||
|
|
||||||
|
|
||||||
@tool
|
@tool
|
||||||
|
|
@ -74,4 +74,4 @@ def get_income_statement(
|
||||||
Returns:
|
Returns:
|
||||||
str: A formatted report containing income statement data
|
str: A formatted report containing income statement data
|
||||||
"""
|
"""
|
||||||
return route_to_vender("get_income_statement", ticker, freq, curr_date)
|
return route_to_vendor("get_income_statement", ticker, freq, curr_date)
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from langchain_core.tools import tool
|
from langchain_core.tools import tool
|
||||||
from typing import Annotated
|
from typing import Annotated
|
||||||
from tradingagents.dataflows.interface import route_to_vender
|
from tradingagents.dataflows.interface import route_to_vendor
|
||||||
|
|
||||||
@tool
|
@tool
|
||||||
def get_news(
|
def get_news(
|
||||||
|
|
@ -18,7 +18,7 @@ def get_news(
|
||||||
Returns:
|
Returns:
|
||||||
str: A formatted string containing news data
|
str: A formatted string containing news data
|
||||||
"""
|
"""
|
||||||
return route_to_vender("get_news", ticker, start_date, end_date)
|
return route_to_vendor("get_news", ticker, start_date, end_date)
|
||||||
|
|
||||||
@tool
|
@tool
|
||||||
def get_global_news(
|
def get_global_news(
|
||||||
|
|
@ -36,7 +36,7 @@ def get_global_news(
|
||||||
Returns:
|
Returns:
|
||||||
str: A formatted string containing global news data
|
str: A formatted string containing global news data
|
||||||
"""
|
"""
|
||||||
return route_to_vender("get_global_news", curr_date, look_back_days, limit)
|
return route_to_vendor("get_global_news", curr_date, look_back_days, limit)
|
||||||
|
|
||||||
@tool
|
@tool
|
||||||
def get_insider_sentiment(
|
def get_insider_sentiment(
|
||||||
|
|
@ -52,7 +52,7 @@ def get_insider_sentiment(
|
||||||
Returns:
|
Returns:
|
||||||
str: A report of insider sentiment data
|
str: A report of insider sentiment data
|
||||||
"""
|
"""
|
||||||
return route_to_vender("get_insider_sentiment", ticker, curr_date)
|
return route_to_vendor("get_insider_sentiment", ticker, curr_date)
|
||||||
|
|
||||||
@tool
|
@tool
|
||||||
def get_insider_transactions(
|
def get_insider_transactions(
|
||||||
|
|
@ -68,4 +68,4 @@ def get_insider_transactions(
|
||||||
Returns:
|
Returns:
|
||||||
str: A report of insider transaction data
|
str: A report of insider transaction data
|
||||||
"""
|
"""
|
||||||
return route_to_vender("get_insider_transactions", ticker, curr_date)
|
return route_to_vendor("get_insider_transactions", ticker, curr_date)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from langchain_core.tools import tool
|
from langchain_core.tools import tool
|
||||||
from typing import Annotated
|
from typing import Annotated
|
||||||
from tradingagents.dataflows.interface import route_to_vender
|
from tradingagents.dataflows.interface import route_to_vendor
|
||||||
|
|
||||||
@tool
|
@tool
|
||||||
def get_indicators(
|
def get_indicators(
|
||||||
|
|
@ -20,4 +20,4 @@ def get_indicators(
|
||||||
Returns:
|
Returns:
|
||||||
str: A formatted dataframe containing the technical indicators for the specified ticker symbol and indicator.
|
str: A formatted dataframe containing the technical indicators for the specified ticker symbol and indicator.
|
||||||
"""
|
"""
|
||||||
return route_to_vender("get_indicators", symbol, indicator, curr_date, look_back_days)
|
return route_to_vendor("get_indicators", symbol, indicator, curr_date, look_back_days)
|
||||||
|
|
@ -43,7 +43,7 @@ def _make_api_request(function_name: str, params: dict) -> dict | str:
|
||||||
api_params.update({
|
api_params.update({
|
||||||
"function": function_name,
|
"function": function_name,
|
||||||
"apikey": get_api_key(),
|
"apikey": get_api_key(),
|
||||||
"source": "alphavangtagemcp"
|
"source": "tradingagents",
|
||||||
})
|
})
|
||||||
|
|
||||||
# Handle entitlement parameter if present in params or global variable
|
# Handle entitlement parameter if present in params or global variable
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ def get_vendor(category: str, method: str = None) -> str:
|
||||||
# Fall back to category-level configuration
|
# Fall back to category-level configuration
|
||||||
return config.get("data_vendors", {}).get(category, "default")
|
return config.get("data_vendors", {}).get(category, "default")
|
||||||
|
|
||||||
def route_to_vender(method: str, *args, **kwargs):
|
def route_to_vendor(method: str, *args, **kwargs):
|
||||||
"""Route method calls to appropriate vendor implementation."""
|
"""Route method calls to appropriate vendor implementation."""
|
||||||
category = get_category_for_method(method)
|
category = get_category_for_method(method)
|
||||||
vendor_config = get_vendor(category, method)
|
vendor_config = get_vendor(category, method)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue