mirror of
https://github.com/TauricResearch/TradingAgents.git
synced 2026-09-27 06:56:39 +03:00
fix(agents): give the fundamentals analyst the insider transactions tool
- the tool sat in the news tool node, which no analyst offered it from, so no run used insider data - the full-graph test now requires it
This commit is contained in:
@@ -132,7 +132,8 @@ def test_a_full_run_reaches_a_logged_decision(tmp_path, monkeypatch, offline, st
|
|||||||
assert state[key].strip(), key
|
assert state[key].strip(), key
|
||||||
tool_methods = {"get_stock_data", "get_indicators", "get_news", "get_global_news",
|
tool_methods = {"get_stock_data", "get_indicators", "get_news", "get_global_news",
|
||||||
"get_macro_indicators", "get_prediction_markets", "get_fundamentals",
|
"get_macro_indicators", "get_prediction_markets", "get_fundamentals",
|
||||||
"get_balance_sheet", "get_cashflow", "get_income_statement", "ohlcv"}
|
"get_balance_sheet", "get_cashflow", "get_income_statement",
|
||||||
|
"get_insider_transactions", "ohlcv"}
|
||||||
assert offline == tool_methods
|
assert offline == tool_methods
|
||||||
assert [e["rating"] for e in graph.memory_log.load_entries()] == ["Overweight"]
|
assert [e["rating"] for e in graph.memory_log.load_entries()] == ["Overweight"]
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from tradingagents.agents.utils.agent_utils import (
|
|||||||
get_cashflow,
|
get_cashflow,
|
||||||
get_fundamentals,
|
get_fundamentals,
|
||||||
get_income_statement,
|
get_income_statement,
|
||||||
|
get_insider_transactions,
|
||||||
get_instrument_context_from_state,
|
get_instrument_context_from_state,
|
||||||
get_language_instruction,
|
get_language_instruction,
|
||||||
)
|
)
|
||||||
@@ -20,12 +21,13 @@ def create_fundamentals_analyst(llm):
|
|||||||
get_balance_sheet,
|
get_balance_sheet,
|
||||||
get_cashflow,
|
get_cashflow,
|
||||||
get_income_statement,
|
get_income_statement,
|
||||||
|
get_insider_transactions,
|
||||||
]
|
]
|
||||||
|
|
||||||
system_message = (
|
system_message = (
|
||||||
"You are a researcher tasked with analyzing fundamental information over the past week about a company. Please write a comprehensive report of the company's fundamental information such as financial documents, company profile, basic company financials, and company financial history to gain a full view of the company's fundamental information to inform traders. Make sure to include as much detail as possible. Provide specific, actionable insights with supporting evidence to help traders make informed decisions."
|
"You are a researcher tasked with analyzing fundamental information over the past week about a company. Please write a comprehensive report of the company's fundamental information such as financial documents, company profile, basic company financials, and company financial history to gain a full view of the company's fundamental information to inform traders. Make sure to include as much detail as possible. Provide specific, actionable insights with supporting evidence to help traders make informed 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."
|
||||||
+ " Use the available tools: `get_fundamentals` for comprehensive company analysis, `get_balance_sheet`, `get_cashflow`, and `get_income_statement` for specific financial statements."
|
+ " Use the available tools: `get_fundamentals` for comprehensive company analysis, `get_balance_sheet`, `get_cashflow`, and `get_income_statement` for specific financial statements, and `get_insider_transactions` for recent insider buying and selling."
|
||||||
+ get_language_instruction()
|
+ get_language_instruction()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -242,10 +242,8 @@ class TradingAgentsGraph:
|
|||||||
),
|
),
|
||||||
"news": ToolNode(
|
"news": ToolNode(
|
||||||
[
|
[
|
||||||
# News and insider information
|
|
||||||
get_news,
|
get_news,
|
||||||
get_global_news,
|
get_global_news,
|
||||||
get_insider_transactions,
|
|
||||||
get_macro_indicators,
|
get_macro_indicators,
|
||||||
get_prediction_markets,
|
get_prediction_markets,
|
||||||
]
|
]
|
||||||
@@ -257,6 +255,7 @@ class TradingAgentsGraph:
|
|||||||
get_balance_sheet,
|
get_balance_sheet,
|
||||||
get_cashflow,
|
get_cashflow,
|
||||||
get_income_statement,
|
get_income_statement,
|
||||||
|
get_insider_transactions,
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user