From ccf375eafd6d7bff39b1f89eb1d316a1137fd2cb Mon Sep 17 00:00:00 2001 From: robinsxe Date: Thu, 26 Mar 2026 18:20:23 +0100 Subject: [PATCH] Update tradingagents/graph/portfolio_analysis.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- tradingagents/graph/portfolio_analysis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tradingagents/graph/portfolio_analysis.py b/tradingagents/graph/portfolio_analysis.py index 6409258b..12325e3c 100644 --- a/tradingagents/graph/portfolio_analysis.py +++ b/tradingagents/graph/portfolio_analysis.py @@ -181,12 +181,12 @@ class PortfolioAnalyzer: directory.mkdir(parents=True, exist_ok=True) log_data = { - "trade_date": str(trade_date), + "trade_date": trade_date, "tickers": tickers, "individual_results": individual_results, "portfolio_summary": portfolio_summary, } - log_file = directory / f"portfolio_analysis_{re.sub(r'[^\w.-]', '_', str(trade_date))}.json" + log_file = directory / f"portfolio_analysis_{re.sub(r'[^\w.-]', '_', trade_date)}.json" with log_file.open("w", encoding="utf-8") as f: json.dump(log_data, f, indent=4)