diff --git a/.gitignore b/.gitignore
index 3369bad9..d929ad86 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,8 +4,14 @@ env/
__pycache__/
.DS_Store
*.csv
-src/
+/src/
eval_results/
eval_data/
*.egg-info/
.env
+
+# Node.js
+node_modules/
+
+# Frontend dev artifacts
+.frontend-dev/
diff --git a/.playwright-mcp/01-dashboard.png b/.playwright-mcp/01-dashboard.png
new file mode 100644
index 00000000..43f80757
Binary files /dev/null and b/.playwright-mcp/01-dashboard.png differ
diff --git a/.playwright-mcp/02-settings-modal.png b/.playwright-mcp/02-settings-modal.png
new file mode 100644
index 00000000..3b67507e
Binary files /dev/null and b/.playwright-mcp/02-settings-modal.png differ
diff --git a/.playwright-mcp/03-stock-detail-overview.png b/.playwright-mcp/03-stock-detail-overview.png
new file mode 100644
index 00000000..07f7fb7f
Binary files /dev/null and b/.playwright-mcp/03-stock-detail-overview.png differ
diff --git a/.playwright-mcp/04-analysis-pipeline.png b/.playwright-mcp/04-analysis-pipeline.png
new file mode 100644
index 00000000..ff13ced7
Binary files /dev/null and b/.playwright-mcp/04-analysis-pipeline.png differ
diff --git a/.playwright-mcp/05-debates-tab.png b/.playwright-mcp/05-debates-tab.png
new file mode 100644
index 00000000..45c40c5d
Binary files /dev/null and b/.playwright-mcp/05-debates-tab.png differ
diff --git a/.playwright-mcp/06-investment-debate-expanded.png b/.playwright-mcp/06-investment-debate-expanded.png
new file mode 100644
index 00000000..02bc602f
Binary files /dev/null and b/.playwright-mcp/06-investment-debate-expanded.png differ
diff --git a/.playwright-mcp/07-data-sources-tab.png b/.playwright-mcp/07-data-sources-tab.png
new file mode 100644
index 00000000..2df93b64
Binary files /dev/null and b/.playwright-mcp/07-data-sources-tab.png differ
diff --git a/.playwright-mcp/08-dashboard-dark-mode.png b/.playwright-mcp/08-dashboard-dark-mode.png
new file mode 100644
index 00000000..36680cd3
Binary files /dev/null and b/.playwright-mcp/08-dashboard-dark-mode.png differ
diff --git a/.playwright-mcp/09-how-it-works.png b/.playwright-mcp/09-how-it-works.png
new file mode 100644
index 00000000..95140dae
Binary files /dev/null and b/.playwright-mcp/09-how-it-works.png differ
diff --git a/.playwright-mcp/10-history-page.png b/.playwright-mcp/10-history-page.png
new file mode 100644
index 00000000..0a5d01c4
Binary files /dev/null and b/.playwright-mcp/10-history-page.png differ
diff --git a/.playwright-mcp/analysis-in-progress.png b/.playwright-mcp/analysis-in-progress.png
new file mode 100644
index 00000000..e9314a9f
Binary files /dev/null and b/.playwright-mcp/analysis-in-progress.png differ
diff --git a/.playwright-mcp/analysis-running.png b/.playwright-mcp/analysis-running.png
new file mode 100644
index 00000000..4f6a5a9e
Binary files /dev/null and b/.playwright-mcp/analysis-running.png differ
diff --git a/.playwright-mcp/analysis-working-network.png b/.playwright-mcp/analysis-working-network.png
new file mode 100644
index 00000000..2a8d1247
Binary files /dev/null and b/.playwright-mcp/analysis-working-network.png differ
diff --git a/.playwright-mcp/analysis-working-tcs.png b/.playwright-mcp/analysis-working-tcs.png
new file mode 100644
index 00000000..7e6c7dfa
Binary files /dev/null and b/.playwright-mcp/analysis-working-tcs.png differ
diff --git a/.playwright-mcp/chrome-headless-test.png b/.playwright-mcp/chrome-headless-test.png
new file mode 100644
index 00000000..1bd12bc4
Binary files /dev/null and b/.playwright-mcp/chrome-headless-test.png differ
diff --git a/.playwright-mcp/current-state.png b/.playwright-mcp/current-state.png
new file mode 100644
index 00000000..5ed48249
Binary files /dev/null and b/.playwright-mcp/current-state.png differ
diff --git a/.playwright-mcp/dashboard-analyze-all.png b/.playwright-mcp/dashboard-analyze-all.png
new file mode 100644
index 00000000..93a8a4f8
Binary files /dev/null and b/.playwright-mcp/dashboard-analyze-all.png differ
diff --git a/.playwright-mcp/dashboard-before.png b/.playwright-mcp/dashboard-before.png
new file mode 100644
index 00000000..f45dc554
Binary files /dev/null and b/.playwright-mcp/dashboard-before.png differ
diff --git a/.playwright-mcp/dashboard-buy-filter-active.png b/.playwright-mcp/dashboard-buy-filter-active.png
new file mode 100644
index 00000000..c42e1fdb
Binary files /dev/null and b/.playwright-mcp/dashboard-buy-filter-active.png differ
diff --git a/.playwright-mcp/dashboard-compact.png b/.playwright-mcp/dashboard-compact.png
new file mode 100644
index 00000000..5a6e3049
Binary files /dev/null and b/.playwright-mcp/dashboard-compact.png differ
diff --git a/.playwright-mcp/dashboard-hold-filter-final.png b/.playwright-mcp/dashboard-hold-filter-final.png
new file mode 100644
index 00000000..b9dbea78
Binary files /dev/null and b/.playwright-mcp/dashboard-hold-filter-final.png differ
diff --git a/.playwright-mcp/dashboard-scrolled.png b/.playwright-mcp/dashboard-scrolled.png
new file mode 100644
index 00000000..367aae9b
Binary files /dev/null and b/.playwright-mcp/dashboard-scrolled.png differ
diff --git a/.playwright-mcp/dashboard-search-visible.png b/.playwright-mcp/dashboard-search-visible.png
new file mode 100644
index 00000000..1efea958
Binary files /dev/null and b/.playwright-mcp/dashboard-search-visible.png differ
diff --git a/.playwright-mcp/dashboard-with-search.png b/.playwright-mcp/dashboard-with-search.png
new file mode 100644
index 00000000..25855731
Binary files /dev/null and b/.playwright-mcp/dashboard-with-search.png differ
diff --git a/.playwright-mcp/history-compact.png b/.playwright-mcp/history-compact.png
new file mode 100644
index 00000000..9a2afb97
Binary files /dev/null and b/.playwright-mcp/history-compact.png differ
diff --git a/.playwright-mcp/history-new-calc.png b/.playwright-mcp/history-new-calc.png
new file mode 100644
index 00000000..95f70d68
Binary files /dev/null and b/.playwright-mcp/history-new-calc.png differ
diff --git a/.playwright-mcp/history-page-current.png b/.playwright-mcp/history-page-current.png
new file mode 100644
index 00000000..39990d98
Binary files /dev/null and b/.playwright-mcp/history-page-current.png differ
diff --git a/.playwright-mcp/history-page-updated.png b/.playwright-mcp/history-page-updated.png
new file mode 100644
index 00000000..608254ca
Binary files /dev/null and b/.playwright-mcp/history-page-updated.png differ
diff --git a/.playwright-mcp/history-sparklines-2.png b/.playwright-mcp/history-sparklines-2.png
new file mode 100644
index 00000000..7d9c5af3
Binary files /dev/null and b/.playwright-mcp/history-sparklines-2.png differ
diff --git a/.playwright-mcp/history-sparklines-more.png b/.playwright-mcp/history-sparklines-more.png
new file mode 100644
index 00000000..71225674
Binary files /dev/null and b/.playwright-mcp/history-sparklines-more.png differ
diff --git a/.playwright-mcp/history-sparklines-normalized.png b/.playwright-mcp/history-sparklines-normalized.png
new file mode 100644
index 00000000..0d5ce53b
Binary files /dev/null and b/.playwright-mcp/history-sparklines-normalized.png differ
diff --git a/.playwright-mcp/history-sparklines-scrolled.png b/.playwright-mcp/history-sparklines-scrolled.png
new file mode 100644
index 00000000..33129dd4
Binary files /dev/null and b/.playwright-mcp/history-sparklines-scrolled.png differ
diff --git a/.playwright-mcp/history-sparklines.png b/.playwright-mcp/history-sparklines.png
new file mode 100644
index 00000000..7d9c5af3
Binary files /dev/null and b/.playwright-mcp/history-sparklines.png differ
diff --git a/.playwright-mcp/history-stock-list.png b/.playwright-mcp/history-stock-list.png
new file mode 100644
index 00000000..a3c88907
Binary files /dev/null and b/.playwright-mcp/history-stock-list.png differ
diff --git a/.playwright-mcp/mobile-view.png b/.playwright-mcp/mobile-view.png
new file mode 100644
index 00000000..eae6f0b6
Binary files /dev/null and b/.playwright-mcp/mobile-view.png differ
diff --git a/.playwright-mcp/overall-modal-fixed.png b/.playwright-mcp/overall-modal-fixed.png
new file mode 100644
index 00000000..3a06d7f0
Binary files /dev/null and b/.playwright-mcp/overall-modal-fixed.png differ
diff --git a/.playwright-mcp/overall-modal-table.png b/.playwright-mcp/overall-modal-table.png
new file mode 100644
index 00000000..cdcbcf36
Binary files /dev/null and b/.playwright-mcp/overall-modal-table.png differ
diff --git a/.playwright-mcp/overall-modal.png b/.playwright-mcp/overall-modal.png
new file mode 100644
index 00000000..3a06d7f0
Binary files /dev/null and b/.playwright-mcp/overall-modal.png differ
diff --git a/.playwright-mcp/page-2026-01-31T10-39-38-424Z.png b/.playwright-mcp/page-2026-01-31T10-39-38-424Z.png
new file mode 100644
index 00000000..cd6f8045
Binary files /dev/null and b/.playwright-mcp/page-2026-01-31T10-39-38-424Z.png differ
diff --git a/.playwright-mcp/page-2026-01-31T10-41-56-205Z.png b/.playwright-mcp/page-2026-01-31T10-41-56-205Z.png
new file mode 100644
index 00000000..e0df99eb
Binary files /dev/null and b/.playwright-mcp/page-2026-01-31T10-41-56-205Z.png differ
diff --git a/.playwright-mcp/page-2026-01-31T10-42-07-250Z.png b/.playwright-mcp/page-2026-01-31T10-42-07-250Z.png
new file mode 100644
index 00000000..96ab48c6
Binary files /dev/null and b/.playwright-mcp/page-2026-01-31T10-42-07-250Z.png differ
diff --git a/.playwright-mcp/page-2026-01-31T10-42-21-398Z.png b/.playwright-mcp/page-2026-01-31T10-42-21-398Z.png
new file mode 100644
index 00000000..71be46f7
Binary files /dev/null and b/.playwright-mcp/page-2026-01-31T10-42-21-398Z.png differ
diff --git a/.playwright-mcp/page-2026-01-31T10-43-02-673Z.png b/.playwright-mcp/page-2026-01-31T10-43-02-673Z.png
new file mode 100644
index 00000000..5970ecb6
Binary files /dev/null and b/.playwright-mcp/page-2026-01-31T10-43-02-673Z.png differ
diff --git a/.playwright-mcp/page-2026-01-31T10-43-38-177Z.png b/.playwright-mcp/page-2026-01-31T10-43-38-177Z.png
new file mode 100644
index 00000000..ad8898b0
Binary files /dev/null and b/.playwright-mcp/page-2026-01-31T10-43-38-177Z.png differ
diff --git a/.playwright-mcp/page-2026-01-31T10-44-36-104Z.png b/.playwright-mcp/page-2026-01-31T10-44-36-104Z.png
new file mode 100644
index 00000000..fc31ccb0
Binary files /dev/null and b/.playwright-mcp/page-2026-01-31T10-44-36-104Z.png differ
diff --git a/.playwright-mcp/page-2026-01-31T10-44-56-012Z.png b/.playwright-mcp/page-2026-01-31T10-44-56-012Z.png
new file mode 100644
index 00000000..8bb9d2ae
Binary files /dev/null and b/.playwright-mcp/page-2026-01-31T10-44-56-012Z.png differ
diff --git a/.playwright-mcp/page-2026-01-31T10-45-15-489Z.png b/.playwright-mcp/page-2026-01-31T10-45-15-489Z.png
new file mode 100644
index 00000000..916b50bf
Binary files /dev/null and b/.playwright-mcp/page-2026-01-31T10-45-15-489Z.png differ
diff --git a/.playwright-mcp/page-2026-01-31T10-45-42-676Z.png b/.playwright-mcp/page-2026-01-31T10-45-42-676Z.png
new file mode 100644
index 00000000..4d1b71e4
Binary files /dev/null and b/.playwright-mcp/page-2026-01-31T10-45-42-676Z.png differ
diff --git a/.playwright-mcp/page-2026-01-31T10-45-58-686Z.png b/.playwright-mcp/page-2026-01-31T10-45-58-686Z.png
new file mode 100644
index 00000000..c50f2026
Binary files /dev/null and b/.playwright-mcp/page-2026-01-31T10-45-58-686Z.png differ
diff --git a/.playwright-mcp/page-2026-01-31T10-46-33-307Z.png b/.playwright-mcp/page-2026-01-31T10-46-33-307Z.png
new file mode 100644
index 00000000..ca2e0763
Binary files /dev/null and b/.playwright-mcp/page-2026-01-31T10-46-33-307Z.png differ
diff --git a/.playwright-mcp/page-2026-01-31T10-47-05-151Z.png b/.playwright-mcp/page-2026-01-31T10-47-05-151Z.png
new file mode 100644
index 00000000..40448610
Binary files /dev/null and b/.playwright-mcp/page-2026-01-31T10-47-05-151Z.png differ
diff --git a/.playwright-mcp/page-2026-01-31T10-47-42-171Z.png b/.playwright-mcp/page-2026-01-31T10-47-42-171Z.png
new file mode 100644
index 00000000..742cb46f
Binary files /dev/null and b/.playwright-mcp/page-2026-01-31T10-47-42-171Z.png differ
diff --git a/.playwright-mcp/page-2026-01-31T10-49-11-278Z.png b/.playwright-mcp/page-2026-01-31T10-49-11-278Z.png
new file mode 100644
index 00000000..425d3016
Binary files /dev/null and b/.playwright-mcp/page-2026-01-31T10-49-11-278Z.png differ
diff --git a/.playwright-mcp/page-2026-01-31T10-49-27-614Z.png b/.playwright-mcp/page-2026-01-31T10-49-27-614Z.png
new file mode 100644
index 00000000..4c04faae
Binary files /dev/null and b/.playwright-mcp/page-2026-01-31T10-49-27-614Z.png differ
diff --git a/.playwright-mcp/page-2026-01-31T10-49-46-409Z.png b/.playwright-mcp/page-2026-01-31T10-49-46-409Z.png
new file mode 100644
index 00000000..68827663
Binary files /dev/null and b/.playwright-mcp/page-2026-01-31T10-49-46-409Z.png differ
diff --git a/.playwright-mcp/return-modal-formula.png b/.playwright-mcp/return-modal-formula.png
new file mode 100644
index 00000000..bd655874
Binary files /dev/null and b/.playwright-mcp/return-modal-formula.png differ
diff --git a/.playwright-mcp/return-modal-scrolled.png b/.playwright-mcp/return-modal-scrolled.png
new file mode 100644
index 00000000..468e1059
Binary files /dev/null and b/.playwright-mcp/return-modal-scrolled.png differ
diff --git a/.playwright-mcp/return-modal.png b/.playwright-mcp/return-modal.png
new file mode 100644
index 00000000..57878255
Binary files /dev/null and b/.playwright-mcp/return-modal.png differ
diff --git a/.playwright-mcp/settings-api-key.png b/.playwright-mcp/settings-api-key.png
new file mode 100644
index 00000000..3b67507e
Binary files /dev/null and b/.playwright-mcp/settings-api-key.png differ
diff --git a/.playwright-mcp/settings-modal.png b/.playwright-mcp/settings-modal.png
new file mode 100644
index 00000000..dc1b3608
Binary files /dev/null and b/.playwright-mcp/settings-modal.png differ
diff --git a/.playwright-mcp/stock-detail-compact.png b/.playwright-mcp/stock-detail-compact.png
new file mode 100644
index 00000000..1d5665a6
Binary files /dev/null and b/.playwright-mcp/stock-detail-compact.png differ
diff --git a/.playwright-mcp/stocks-page-compact.png b/.playwright-mcp/stocks-page-compact.png
new file mode 100644
index 00000000..3cbec6f0
Binary files /dev/null and b/.playwright-mcp/stocks-page-compact.png differ
diff --git a/README.md b/README.md
index 7e90c60f..a3f7f112 100644
--- a/README.md
+++ b/README.md
@@ -151,6 +151,143 @@ An interface will appear showing results as they load, letting you track the age
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{line}
; + })} ++ {metrics.correct_predictions} correct out of {metrics.total_predictions} predictions +
++ Accuracy = (Correct Predictions / Total Predictions) × 100 +
++ = ({metrics.correct_predictions} / {metrics.total_predictions}) × 100 = {(metrics.success_rate * 100).toFixed(1)}% +
++ A BUY prediction is correct if the stock price increased after the recommendation +
++ A SELL prediction is correct if the stock price decreased after the recommendation +
++ A HOLD prediction is correct if the stock price stayed relatively stable (±2% range) +
++ Note: Past performance does not guarantee future results. + Accuracy metrics are based on historical data and are for educational purposes only. + Market conditions can change rapidly and predictions may not hold in future periods. +
++ {agent.description} +
++ Multiple AI agents analyze each stock independently, then debate to reach a consensus recommendation. +
++ In real trading, gains and losses compound over time. If you start with ₹10,000: +
++ Simple average would give (2+1-1)/3 = 0.67%, but actual return is +1.99% +
++ Where r₁, r₂, ... rₙ are the daily weighted returns +
+| Date | +Return | +Multiplier | +Cumulative | +
|---|---|---|---|
| + {new Date(day.date).toLocaleDateString('en-IN', { month: 'short', day: 'numeric' })} + | += 0 ? 'text-green-600 dark:text-green-400' : 'text-red-600 dark:text-red-400' + }`}> + {day.return >= 0 ? '+' : ''}{day.return.toFixed(1)}% + | ++ ×{day.multiplier.toFixed(4)} + | += 0 ? 'text-green-600 dark:text-green-400' : 'text-red-600 dark:text-red-400' + }`}> + {day.cumulative >= 0 ? '+' : ''}{day.cumulative.toFixed(1)}% + | +
| Total | +- | ++ ×{breakdown.finalMultiplier.toFixed(4)} + | += 0 ? 'text-green-600 dark:text-green-400' : 'text-red-600 dark:text-red-400' + }`}> + {breakdown.finalReturn >= 0 ? '+' : ''}{breakdown.finalReturn.toFixed(1)}% + | +
+ Note: This compound return represents theoretical portfolio growth + if all recommendations were followed. Real trading results depend on execution, + position sizing, and market conditions. +
+| Date | +Return | +Value | +
|---|---|---|
| {day.date} | += 0 ? 'text-green-600 dark:text-green-400' : 'text-red-600 dark:text-red-400' + }`}> + {day.return >= 0 ? '+' : ''}{day.return.toFixed(1)}% + | ++ {formatCurrency(day.value)} + | +
+ Simulated returns based on AI recommendation performance. Past performance does not guarantee future results. +
++ Weighted Average Return +
++ 1. Correct Predictions → Contribute positively +
++ 2. Incorrect Predictions → Contribute negatively +
++ 3. Weighted Average +
++ Note: This weighted return represents the theoretical gain/loss + if you followed all predictions for the day. Actual results may vary based on + execution timing, transaction costs, and market conditions. +
+Configure AI models and API settings
++ Your API key is stored locally in your browser and never sent to our servers. +
+{stock.company_name}
+ {showDetails && ( ++ {new Date(label).toLocaleDateString('en-IN', { + weekday: 'short', + month: 'short', + day: 'numeric', + })} +
++ ₹{data.price.toLocaleString('en-IN', { minimumFractionDigits: 2 })} +
+ {data.prediction && ( +{value}
+{label}
+{pick.reason}
+{stock.reason}
+ View → ++ {metadata.description} +
++ {previewText} +
+{line}
+ ))} +
+ {report.report_content}
+
+ + Raw data fetched for analysis +
++ Error: {source.error_message} +
++ Data Summary: +
+
+ {typeof source.data_fetched === 'string'
+ ? source.data_fetched.slice(0, 500) + (source.data_fetched.length > 500 ? '...' : '')
+ : JSON.stringify(source.data_fetched, null, 2).slice(0, 500)}
+
+ + No data details available +
+ )} ++ Bull vs Bear Analysis with Research Manager Decision +
++ {round.content} +
+
+ {debate.full_history}
+
+ ) : (
+ No debate history available
+ )} ++ {debate.bull_arguments || 'No bull arguments recorded'} +
++ {debate.bear_arguments || 'No bear arguments recorded'} +
++ {debate.judge_decision} +
++ Aggressive vs Conservative vs Neutral with Risk Manager Decision +
++ {debate.risky_arguments || 'No arguments recorded'} +
++ {debate.neutral_arguments || 'No arguments recorded'} +
++ {debate.safe_arguments || 'No arguments recorded'} +
++ {debate.risky_arguments || 'No aggressive arguments recorded'} +
++ {debate.neutral_arguments || 'No neutral arguments recorded'} +
++ {debate.safe_arguments || 'No conservative arguments recorded'} +
++ {debate.judge_decision} +
+AI-powered stock analysis for Nifty 50
++ TradingAgents uses a team of specialized AI agents that analyze stocks from multiple perspectives, + debate their findings, and reach consensus recommendations. This multi-agent approach provides + more balanced and thoroughly reasoned analysis than any single model. +
+{feature.description}
+{item.description}
+{agent.description}
+How agents reach consensus
++ After each agent completes their analysis, they engage in a structured debate. The Technical + Analyst might argue for a BUY based on strong momentum, while the Risk Manager highlights + elevated volatility concerns. +
++ Through multiple rounds of discussion, agents refine their positions, consider counterarguments, + and ultimately reach a consensus. This process mimics how investment committees at professional + firms make decisions. +
++ The final recommendation reflects the collective intelligence of all agents, weighted by the + strength of their arguments and supporting evidence. +
++ TradingAgents provides AI-generated stock analysis for educational and informational purposes only. + These recommendations do not constitute financial advice. Always conduct your own research and consult + with a qualified financial advisor before making investment decisions. Past performance does not + guarantee future results. Investing in stocks involves risk, including potential loss of principal. +
++ {analysisProgress.failed} failed +
+ )} +{stock.company_name}
+No stocks match the selected filter.
+Browse past AI recommendations with backtest results
++ Based on {accuracyMetrics.total_predictions} predictions tracked over time +
++ Prediction accuracy over the past {dates.length} trading days +
++ Risk-adjusted performance metrics for the AI trading strategy +
++ Next-day return = Price change on the trading day after recommendation +
++ Comparison of cumulative returns between AI strategy and Nifty50 index +
++ Distribution of next-day returns across all predictions. Click bars to see stocks. +
+The stock "{symbol}" was not found in Nifty 50.
+ + Back to Dashboard + +{stock.company_name}
+No history yet
++ Data source logs will appear here when the analysis pipeline runs. + This includes information about market data, news, and fundamental data fetched. +
++ AI-generated recommendation for educational purposes only. Not financial advice. +
++ {filteredStocks.length} of {NIFTY_50_STOCKS.length} stocks +
+{stock.company_name}
+Try adjusting your search.
+