fix(agents): ground the Trader in the technical market report

- the Trader received only the digested investment plan, so its entry / stop /
  sizing levels were not anchored to real price structure (ATR, support and
  resistance, current price)
- inject the market report and instruct the Trader to take concrete price levels
  from it and direction/strategy from the plan; when the market analyst was not
  selected the report is empty, so the section and grounding note are omitted #1167
This commit is contained in:
Yijia-Xiao
2026-08-31 02:35:50 +00:00
parent 45c1744b86
commit e93c5c53c2
3 changed files with 50 additions and 7 deletions

View File

@@ -52,6 +52,7 @@ def test_trader_prompt_states_constraint():
create_trader(llm)({
"company_of_interest": "NVDA",
"investment_plan": "**Recommendation**: Buy",
"market_report": "Current price $189.5; ATR 4.2.",
})
assert NO_EXTERNAL_TOOLS in _prompt_text(captured["prompt"])