Update tradingagents/graph/portfolio_analysis.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
parent
138c077cc6
commit
ccf375eafd
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue