FinceptTerminal is a modern finance application offering advanced market analytics, investment research, and economic data tools, designed for interactive exploration and data-driven decision-making in a user-friendly environment.
C++ ai-agentsalgorithmic-tradingbloomberg-terminalcppfinancefinancial-marketsfintechgood-first-issueinvestmentinvestment-researchmachine-learningopensourcepythonqtquantitative-financestock-markettrading
agents update
tilakpatel22903b302c3a13
diff --git a/fincept-terminal-desktop/src-tauri/.taurignore b/fincept-terminal-desktop/src-tauri/.taurignorenew file mode 100644index 000000000..2fb959e97--- /dev/null+++ b/fincept-terminal-desktop/src-tauri/.taurignore@@ -0,0 +1,40 @@+# Ignore Python cache files+**/__pycache__/+**/*.pyc+**/*.pyo+**/.pytest_cache/++# Ignore node modules+**/node_modules/++# Ignore temp files+**/*.tmp+**/*.log++# Ignore RenTech agent subdirectories to prevent rebuilds during Python execution+resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/strategies/+resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/models/+resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/agents/+resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/organization/+resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/utils/+resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/evaluation/+resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/guardrails/+resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/knowledge/+resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/memory/+resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/reasoning/+resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/schemas/+resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/teams/+resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/tests/+resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/tracing/+resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/workflows/++# Ignore all Python agent directories to prevent rebuilds+resources/scripts/agents/**/++# Ignore Python output and data files+**/*.pkl+**/*.joblib+**/*.h5+**/*.db+**/*.sqlite+**/*.sqlite3diff --git a/fincept-terminal-desktop/src-tauri/resources/requirements-numpy1.txt b/fincept-terminal-desktop/src-tauri/resources/requirements-numpy1.txtindex e6d21cc48..058d567ee 100644--- a/fincept-terminal-desktop/src-tauri/resources/requirements-numpy1.txt+++ b/fincept-terminal-desktop/src-tauri/resources/requirements-numpy1.txt@@ -28,3 +28,4 @@ plotly>=5.18.0,<6.0.0# Visualization (for PyPortfolioOpt compatibility)matplotlib>=3.8.0,<3.10.0+diff --git a/fincept-terminal-desktop/src-tauri/resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/rentech_cli.py b/fincept-terminal-desktop/src-tauri/resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/rentech_cli.pyindex 6cf31909e..805674775 100644--- a/fincept-terminal-desktop/src-tauri/resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/rentech_cli.py+++ b/fincept-terminal-desktop/src-tauri/resources/scripts/agents/hedgeFundAgents/renaissance_technologies_hedge_fund_agent/rentech_cli.py@@ -93,7 +93,7 @@ def create_model_from_settings(model_settings: Dict[str, Any]):Returns:Agno model instance"""- from utils.model_factory import create_model_from_config+ from .utils.model_factory import create_model_from_config# Convert model_settings to config dict formatconfig_dict = {@@ -125,7 +125,7 @@ def create_agent(json_str: str) -> str:"""try:from agno.agent import Agent- from schemas import AgentConfig+ from .schemas import AgentConfigdata = json.loads(json_str)config_data = data.get("config", data)@@ -180,7 +180,7 @@ def run_agent(json_str: str) -> str:"""try:from agno.agent import Agent- from schemas import AgentConfig+ from .schemas import AgentConfigdata = json.loads(json_str)@@ -228,7 +228,7 @@ def run_agent(json_str: str) -> str:def list_agent_presets() -> str:"""List available agent preset configurations"""try:- from schemas import (+ from .schemas import (get_research_agent_config,get_trading_agent_config,get_risk_agent_config,@@ -267,7 +267,7 @@ def create_team(json_str: str) -> str:try:from agno.agent import Agentfrom agno.team import Team- from schemas import TeamConfig, AgentConfig+ from .schemas import TeamConfig, AgentConfigdata = json.loads(json_str)config_data = data.get("config", data)@@ -334,7 +334,7 @@ def run_team(json_str: str) -> str:try:from agno.agent import Agentfrom agno.team import Team- from schemas import TeamConfig+ from .schemas import TeamConfigdata = json.loads(json_str)@@ -392,7 +392,7 @@ def run_team(json_str: str) -> str:def list_team_presets() -> str:"""List available team preset configurations"""try:- from schemas import (+ from .schemas import (get_research_team_config,get_trading_team_config,get_risk_team_config,@@ -448,7 +448,7 @@ def run_ic_deliberation(json_str: str) -> str:}"""try:- from reasoning.ic_deliberation import get_ic_deliberator+ from .reasoning.ic_deliberation import get_ic_deliberatordata = json.loads(json_str)@@ -527,7 +527,7 @@ def analyze_signal(json_str: str) -> str:}"""try:- from main import RenaissanceTechnologiesSystem, AnalysisConfig+ from .main import RenaissanceTechnologiesSystem, AnalysisConfigdata = json.loads(json_str)@@ -597,7 +597,7 @@ def analyze_signal(json_str: str) -> str:def get_config_schema() -> str:"""Get JSON schemas for all configurations"""try:- from schemas import get_agent_config_schema, get_team_config_schema+ from .schemas import get_agent_config_schema, get_team_config_schemareturn success_response({"agent_schema": get_agent_config_schema(),@@ -627,7 +627,7 @@ def health_check() -> str:# Check modeltry:- from config import get_config+ from .config import get_configconfig = get_config()status["components"]["config"] = "ok"status["model"] = {@@ -639,14 +639,14 @@ def health_check() -> str:# Check reasoningtry:- from reasoning import get_reasoning_engine+ from .reasoning import get_reasoning_enginestatus["components"]["reasoning"] = "ok"except Exception as e:status["components"]["reasoning"] = f"error: {e}"# Check guardrailstry:- from guardrails import get_guardrail_registry+ from .guardrails import get_guardrail_registrystatus["components"]["guardrails"] = "ok"except Exception as e:status["components"]["guardrails"] = f"error: {e}"diff --git a/fincept-terminal-desktop/src-tauri/src/commands/agents.rs b/fincept-terminal-desktop/src-tauri/src/commands/agents.rsindex 551374b4b..bf77fda91 100644--- a/fincept-terminal-desktop/src-tauri/src/commands/agents.rs+++ b/fincept-terminal-desktop/src-tauri/src/commands/agents.rs@@ -477,10 +477,21 @@ pub async fn execute_renaissance_cli(let python_path = python::get_python_path(&app, None)?;println!("[RenTech Rust] Python path: {:?}", python_path);+ // Get the parent directory to add to PYTHONPATH+ let agents_dir = script_path.parent()+ .and_then(|p| p.parent())+ .ok_or("Failed to get agents directory".to_string())?;++ println!("[RenTech Rust] Adding to PYTHONPATH: {:?}", agents_dir);++ // Run as module: python -m renaissance_technologies_hedge_fund_agent.rentech_clilet child = Command::new(&python_path)- .arg(script_path.to_str().unwrap())+ .env("PYTHONPATH", agents_dir)+ .arg("-m")+ .arg("renaissance_technologies_hedge_fund_agent.rentech_cli").arg(&command).arg(&data)+ .current_dir(agents_dir).stdout(std::process::Stdio::piped()).stderr(std::process::Stdio::piped()).spawn()diff --git a/fincept-terminal-desktop/src/components/tabs/agent-config/RenaissanceTechnologiesPanel.tsx b/fincept-terminal-desktop/src/components/tabs/agent-config/RenaissanceTechnologiesPanel.tsxindex 8b3c256e4..ec6bb3ac3 100644--- a/fincept-terminal-desktop/src/components/tabs/agent-config/RenaissanceTechnologiesPanel.tsx+++ b/fincept-terminal-desktop/src/components/tabs/agent-config/RenaissanceTechnologiesPanel.tsx@@ -1,14 +1,13 @@/*** Renaissance Technologies Multi-Agent System Panel+ * FINCEPT TERMINAL DESIGN - Professional Grade Trading Intelligence*- * Professional interface for RenTech's 10-agent systematic trading system* Features:- * - Agent selection and configuration- * - Team collaboration workflows- * - IC Deliberation with voting- * - Signal analysis pipeline- * - Risk management controls- * - Real-time execution monitoring+ * - Signal Analysis Pipeline with Medallion Fund Strategies+ * - 10-Agent Investment Committee with IC Deliberation+ * - Real-time Position Sizing & Risk Management+ * - Team Collaboration Workflows+ * - Professional Terminal UI/UX*/import React, { useState, useEffect } from 'react';@@ -17,9 +16,14 @@ import {TrendingUp, AlertCircle, CheckCircle, Users, Sparkles,Brain, Shield, FileText, Zap, Settings, Play, RefreshCw,ChevronRight, DollarSign, BarChart3, Target, Workflow,- ThumbsUp, ThumbsDown, MessageSquare, Clock, Award, Loader2+ ThumbsUp, ThumbsDown, MessageSquare, Clock, Award, Loader2,+ ChevronDown, Activity, TrendingDown, Minus, Database,+ Maximize2, Minimize2, X, Info, Cpu, Network} from 'lucide-react';+// Import Fincept styles+import { FINCEPT, TYPOGRAPHY, SPACING, BORDERS, EFFECTS, COMMON_STYLES } from '../portfolio-tab/finceptStyles';+// =============================================================================// TYPES// =============================================================================@@ -29,20 +33,35 @@ interface RenTechAgent {name: string;role: string;status: 'idle' | 'running' | 'completed' | 'error';+ category: 'research' | 'execution' | 'risk' | 'committee';}-interface RenTechTeam {- id: string;- name: string;- members: string[];- description: string;-}--interface ICVote {- member_role: string;- vote: 'approve' | 'reject' | 'conditional' | 'abstain';- rationale: string;- confidence: number;+interface SignalAnalysisResult {+ success: boolean;+ ticker?: string;+ signal?: string;+ confidence?: number;+ statistical_edge?: number;+ signal_score?: number;+ risk_score?: number;+ execution_score?: number;+ arbitrage_score?: number;+ position_sizing?: {+ recommended_size_pct: number;+ kelly_fraction: number;+ leverage: number;+ };+ signal_strength?: {+ mean_reversion: number;+ momentum: number;+ statistical_arbitrage: number;+ risk_adjusted_return: number;+ };+ key_factors?: string[];+ risks?: string[];+ reasoning?: string;+ ic_decision?: ICDeliberationResult;+ error?: string;}interface ICDeliberationResult {@@ -57,14 +76,11 @@ interface ICDeliberationResult {conditions?: string[];}-interface SignalAnalysisResult {- success: boolean;- signal_id?: string;- statistical_quality?: string;- risk_assessment?: string;- ic_decision?: ICDeliberationResult;- execution_plan?: any;- error?: string;+interface ICVote {+ member_role: string;+ vote: 'approve' | 'reject' | 'conditional' | 'abstain';+ rationale: string;+ confidence: number;}interface RiskLimits {@@ -79,74 +95,39 @@ interface RiskLimits {// CONSTANTS// =============================================================================-const FINCEPT = {- ORANGE: '#FF8800',- WHITE: '#FFFFFF',- GREEN: '#00D66F',- RED: '#FF3B3B',- BLUE: '#0088FF',- DARK_BG: '#0F0F0F',- PANEL_BG: '#1A1A1A',- BORDER: '#2A2A2A',- MUTED: '#787878',-};-const AGENTS: RenTechAgent[] = [- { id: 'signal_scientist', name: 'Signal Scientist', role: 'Statistical signal discovery', status: 'idle' },- { id: 'data_scientist', name: 'Data Scientist', role: 'Data quality & features', status: 'idle' },- { id: 'quant_researcher', name: 'Quant Researcher', role: 'Strategy development', status: 'idle' },- { id: 'research_lead', name: 'Research Lead', role: 'Research validation', status: 'idle' },- { id: 'execution_trader', name: 'Execution Trader', role: 'Optimal execution', status: 'idle' },- { id: 'market_maker', name: 'Market Maker', role: 'Liquidity provision', status: 'idle' },- { id: 'risk_quant', name: 'Risk Quant', role: 'Risk modeling', status: 'idle' },- { id: 'compliance_officer', name: 'Compliance Officer', role: 'Regulatory compliance', status: 'idle' },- { id: 'portfolio_manager', name: 'Portfolio Manager', role: 'Position sizing', status: 'idle' },- { id: 'investment_committee_chair', name: 'IC Chair', role: 'Final approval', status: 'idle' },+ { id: 'signal_scientist', name: 'Signal Scientist', role: 'Statistical signal discovery & pattern recognition', status: 'idle', category: 'research' },+ { id: 'data_scientist', name: 'Data Scientist', role: 'Data quality assurance & feature engineering', status: 'idle', category: 'research' },+ { id: 'quant_researcher', name: 'Quant Researcher', role: 'Strategy development & optimization', status: 'idle', category: 'research' },+ { id: 'research_lead', name: 'Research Lead', role: 'Research validation & peer review', status: 'idle', category: 'research' },+ { id: 'execution_trader', name: 'Execution Trader', role: 'Optimal execution & slippage minimization', status: 'idle', category: 'execution' },+ { id: 'market_maker', name: 'Market Maker', role: 'Liquidity provision & spread capture', status: 'idle', category: 'execution' },+ { id: 'risk_quant', name: 'Risk Quant', role: 'Risk modeling & VaR calculation', status: 'idle', category: 'risk' },+ { id: 'compliance_officer', name: 'Compliance Officer', role: 'Regulatory compliance & oversight', status: 'idle', category: 'risk' },+ { id: 'portfolio_manager', name: 'Portfolio Manager', role: 'Position sizing & portfolio construction', status: 'idle', category: 'committee' },+ { id: 'investment_committee_chair', name: 'IC Chair', role: 'Final approval & decision authority', status: 'idle', category: 'committee' },];-const TEAMS: RenTechTeam[] = [- {- id: 'research_team',- name: 'Research Team',- members: ['signal_scientist', 'data_scientist', 'quant_researcher', 'research_lead'],- description: 'Signal discovery and validation'- },- {- id: 'trading_team',- name: 'Trading Team',- members: ['execution_trader', 'market_maker'],- description: 'Trade execution and liquidity'- },- {- id: 'risk_team',- name: 'Risk Team',- members: ['risk_quant', 'compliance_officer'],- description: 'Risk assessment and compliance'- },- {- id: 'medallion_fund',- name: 'Investment Committee',- members: ['investment_committee_chair', 'portfolio_manager', 'research_lead', 'risk_quant'],- description: 'Final decision-making body'- },+const SIGNAL_TYPES = [+ { value: 'momentum', label: 'Momentum', desc: 'Trend-following strategies' },+ { value: 'mean_reversion', label: 'Mean Reversion', desc: 'Counter-trend strategies' },+ { value: 'stat_arb', label: 'Statistical Arbitrage', desc: 'Pairs & spread trading' },+ { value: 'pairs_trading', label: 'Pairs Trading', desc: 'Correlated asset trading' },];// =============================================================================-// COMPONENT+// MAIN COMPONENT// =============================================================================export default function RenaissanceTechnologiesPanel() {// State- const [selectedTab, setSelectedTab] = useState<'agents' | 'teams' | 'analysis' | 'config'>('analysis');- const [selectedAgent, setSelectedAgent] = useState<string | null>(null);- const [selectedTeam, setSelectedTeam] = useState<string>('medallion_fund');- const [agentStatuses, setAgentStatuses] = useState<Record<string, 'idle' | 'running' | 'completed' | 'error'>>({});-- // Analysis state+ const [activeTab, setActiveTab] = useState<'analysis' | 'agents' | 'config'>('analysis');const [ticker, setTicker] = useState('');const [signalType, setSignalType] = useState('momentum');const [isAnalyzing, setIsAnalyzing] = useState(false);const [analysisResult, setAnalysisResult] = useState<SignalAnalysisResult | null>(null);+ const [currentTime, setCurrentTime] = useState(new Date());+ const [showAdvanced, setShowAdvanced] = useState(false);// Config stateconst [riskLimits, setRiskLimits] = useState<RiskLimits>({@@ -157,6 +138,12 @@ export default function RenaissanceTechnologiesPanel() {min_signal_confidence: 0.5075,});+ // Update time+ useEffect(() => {+ const timer = setInterval(() => setCurrentTime(new Date()), 1000);+ return () => clearInterval(timer);+ }, []);+// Run signal analysisconst runSignalAnalysis = async () => {if (!ticker) return;@@ -180,19 +167,12 @@ export default function RenaissanceTechnologiesPanel() {config: riskLimits,};- console.log('[RenTech] Calling execute_renaissance_cli with:', {- command: 'analyze_signal',- data: cliInput,- });-const result = await invoke<string>('execute_renaissance_cli', {command: 'analyze_signal',data: JSON.stringify(cliInput),});- console.log('[RenTech] Raw result:', result);const parsed = JSON.parse(result);- console.log('[RenTech] Parsed result:', parsed);if (parsed.success) {setAnalysisResult(parsed.data || parsed);@@ -213,121 +193,104 @@ export default function RenaissanceTechnologiesPanel() {}};- // Run IC Deliberation- const runICDeliberation = async () => {- setIsAnalyzing(true);-- try {- const deliberationData = {- signal: {- ticker,- direction: 'long',- signal_type: signalType,- p_value: 0.008,- confidence: 0.65,- expected_return_bps: 75,- },- signal_evaluation: {- statistical_quality: 'strong',- overall_score: 75,- },- risk_assessment: {- risk_level: 'medium',- var_utilization_pct: 45,- },- sizing_recommendation: {- final_size_pct: 2.5,- },- };-- console.log('[RenTech IC] Calling execute_renaissance_cli with:', {- command: 'run_ic_deliberation',- data: deliberationData,- });-- const result = await invoke<string>('execute_renaissance_cli', {- command: 'run_ic_deliberation',- data: JSON.stringify(deliberationData),- });-- console.log('[RenTech IC] Raw result:', result);- const parsed = JSON.parse(result);- console.log('[RenTech IC] Parsed result:', parsed);-- if (parsed.success) {- setAnalysisResult({ success: true, ic_decision: parsed.data });- } else {- setAnalysisResult({- success: false,- error: parsed.error || 'IC deliberation failed',- });- }- } catch (error: any) {- console.error('IC deliberation error:', error);- setAnalysisResult({- success: false,- error: error.message || 'IC deliberation failed',- });- } finally {- setIsAnalyzing(false);- }- };-return (<div style={{- width: '100%',- height: '100%',- background: FINCEPT.DARK_BG,- color: FINCEPT.WHITE,- fontFamily: 'IBM Plex Mono, monospace',- display: 'flex',- flexDirection: 'column',+ ...COMMON_STYLES.container,+ fontFamily: TYPOGRAPHY.MONO,}}>- {/* Header */}+ {/* ===== HEADER ===== */}<div style={{- padding: '20px 24px',- borderBottom: `1px solid ${FINCEPT.BORDER}`,- background: FINCEPT.PANEL_BG,+ ...COMMON_STYLES.header,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'space-between',+ gap: SPACING.MEDIUM,}}>- <div style={{ display: 'flex', alignItems: 'center', gap: '12px', marginBottom: '12px' }}>- <Award size={28} color={FINCEPT.ORANGE} />- <div>- <h1 style={{ margin: 0, fontSize: '20px', fontWeight: 600 }}>- Renaissance Technologies- </h1>- <p style={{ margin: '4px 0 0', fontSize: '13px', color: FINCEPT.MUTED }}>- Medallion Fund Multi-Agent System- </p>+ {/* Left: Branding */}+ <div style={{ display: 'flex', alignItems: 'center', gap: SPACING.MEDIUM }}>+ <div style={{+ display: 'flex',+ alignItems: 'center',+ gap: SPACING.SMALL,+ padding: `${SPACING.SMALL} ${SPACING.DEFAULT}`,+ backgroundColor: FINCEPT.ORANGE,+ }}>+ <Award size={16} color={FINCEPT.DARK_BG} />+ <span style={{+ color: FINCEPT.DARK_BG,+ fontSize: TYPOGRAPHY.SMALL,+ fontWeight: TYPOGRAPHY.BOLD,+ letterSpacing: TYPOGRAPHY.WIDE,+ textTransform: 'uppercase',+ }}>+ RENAISSANCE TECHNOLOGIES+ </span>+ </div>++ <div style={COMMON_STYLES.verticalDivider} />++ {/* Tab Selector */}+ <div style={{ display: 'flex', gap: SPACING.SMALL }}>+ {(['analysis', 'agents', 'config'] as const).map((tab) => (+ <button+ key={tab}+ onClick={() => setActiveTab(tab)}+ style={{+ ...COMMON_STYLES.tabButton(activeTab === tab),+ display: 'flex',+ alignItems: 'center',+ gap: '4px',+ minWidth: '85px',+ justifyContent: 'center',+ }}+ onMouseEnter={(e) => {+ if (activeTab !== tab) e.currentTarget.style.backgroundColor = FINCEPT.HOVER;+ }}+ onMouseLeave={(e) => {+ if (activeTab !== tab) e.currentTarget.style.backgroundColor = 'transparent';+ }}+ >+ {tab === 'analysis' && <BarChart3 size={10} />}+ {tab === 'agents' && <Users size={10} />}+ {tab === 'config' && <Settings size={10} />}+ {tab.toUpperCase()}+ </button>+ ))}</div></div>- {/* Tab Navigation */}- <div style={{ display: 'flex', gap: '8px', marginTop: '16px' }}>- {(['analysis', 'agents', 'teams', 'config'] as const).map((tab) => (- <button- key={tab}- onClick={() => setSelectedTab(tab)}- style={{- padding: '8px 16px',- background: selectedTab === tab ? FINCEPT.ORANGE : 'transparent',- color: selectedTab === tab ? FINCEPT.DARK_BG : FINCEPT.WHITE,- border: `1px solid ${selectedTab === tab ? FINCEPT.ORANGE : FINCEPT.BORDER}`,- borderRadius: '6px',- cursor: 'pointer',- fontSize: '13px',- fontWeight: 500,- transition: 'all 0.2s',- }}- >- {tab.charAt(0).toUpperCase() + tab.slice(1)}- </button>- ))}+ {/* Right: Time & Status */}+ <div style={{ display: 'flex', alignItems: 'center', gap: SPACING.MEDIUM }}>+ <div style={{ display: 'flex', alignItems: 'center', gap: SPACING.SMALL }}>+ <Clock size={12} color={FINCEPT.GRAY} />+ <span style={{ fontSize: TYPOGRAPHY.SMALL, color: FINCEPT.GRAY }}>+ {currentTime.toLocaleTimeString('en-US', { hour12: false })}+ </span>+ </div>+ <div style={COMMON_STYLES.verticalDivider} />+ <div style={{ display: 'flex', alignItems: 'center', gap: SPACING.SMALL }}>+ <div style={{+ width: '6px',+ height: '6px',+ borderRadius: '50%',+ backgroundColor: FINCEPT.GREEN,+ animation: 'pulse 2s infinite',+ }} />+ <span style={{ fontSize: TYPOGRAPHY.SMALL, color: FINCEPT.GREEN }}>OPERATIONAL</span>+ </div></div></div>- {/* Content */}- <div style={{ flex: 1, overflow: 'auto', padding: '24px' }}>- {selectedTab === 'analysis' && (+ {/* ===== CONTENT ===== */}+ <div style={{+ flex: 1,+ overflow: 'auto',+ padding: SPACING.DEFAULT,+ display: 'flex',+ flexDirection: 'column',+ gap: SPACING.DEFAULT,+ }}>+ {activeTab === 'analysis' && (<AnalysisTabticker={ticker}setTicker={setTicker}@@ -336,34 +299,34 @@ export default function RenaissanceTechnologiesPanel() {isAnalyzing={isAnalyzing}analysisResult={analysisResult}onRunAnalysis={runSignalAnalysis}- onRunIC={runICDeliberation}+ showAdvanced={showAdvanced}+ setShowAdvanced={setShowAdvanced}/>)}- {selectedTab === 'agents' && (- <AgentsTab- agents={AGENTS}- selectedAgent={selectedAgent}- onSelectAgent={setSelectedAgent}- agentStatuses={agentStatuses}- />+ {activeTab === 'agents' && (+ <AgentsTab agents={AGENTS} />)}- {selectedTab === 'teams' && (- <TeamsTab- teams={TEAMS}- selectedTeam={selectedTeam}- onSelectTeam={setSelectedTeam}- />- )}-- {selectedTab === 'config' && (+ {activeTab === 'config' && (<ConfigTabriskLimits={riskLimits}onUpdateLimits={setRiskLimits}/>)}</div>++ {/* Inject animations */}+ <style>{`+ @keyframes pulse {+ 0%, 100% { opacity: 1; }+ 50% { opacity: 0.5; }+ }+ @keyframes spin {+ from { transform: rotate(0deg); }+ to { transform: rotate(360deg); }+ }+ `}</style></div>);}@@ -380,7 +343,8 @@ function AnalysisTab({isAnalyzing,analysisResult,onRunAnalysis,- onRunIC,+ showAdvanced,+ setShowAdvanced,}: {ticker: string;setTicker: (v: string) => void;@@ -389,124 +353,178 @@ function AnalysisTab({isAnalyzing: boolean;analysisResult: SignalAnalysisResult | null;onRunAnalysis: () => void;- onRunIC: () => void;+ showAdvanced: boolean;+ setShowAdvanced: (v: boolean) => void;}) {+ const selectedSignalType = SIGNAL_TYPES.find(s => s.value === signalType) || SIGNAL_TYPES[0];+return (- <div style={{ display: 'flex', flexDirection: 'column', gap: '24px' }}>- {/* Input Section */}+ <div style={{ display: 'flex', flexDirection: 'column', gap: SPACING.DEFAULT }}>+ {/* Input Panel */}<div style={{- background: FINCEPT.PANEL_BG,- border: `1px solid ${FINCEPT.BORDER}`,- borderRadius: '8px',- padding: '20px',+ backgroundColor: FINCEPT.PANEL_BG,+ border: BORDERS.STANDARD,+ borderRadius: '2px',}}>- <h3 style={{ margin: '0 0 16px', fontSize: '16px', display: 'flex', alignItems: 'center', gap: '8px' }}>- <Sparkles size={18} color={FINCEPT.ORANGE} />- Signal Analysis Input- </h3>-- <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '16px' }}>- <div>- <label style={{ display: 'block', marginBottom: '8px', fontSize: '13px', color: FINCEPT.MUTED }}>- Ticker Symbol- </label>- <input- type="text"- value={ticker}- onChange={(e) => setTicker(e.target.value.toUpperCase())}- placeholder="AAPL"- style={{- width: '100%',- padding: '10px 12px',- background: FINCEPT.DARK_BG,- border: `1px solid ${FINCEPT.BORDER}`,- borderRadius: '6px',- color: FINCEPT.WHITE,- fontSize: '14px',- }}- />- </div>-- <div>- <label style={{ display: 'block', marginBottom: '8px', fontSize: '13px', color: FINCEPT.MUTED }}>- Signal Type- </label>- <select- value={signalType}- onChange={(e) => setSignalType(e.target.value)}- style={{- width: '100%',- padding: '10px 12px',- background: FINCEPT.DARK_BG,- border: `1px solid ${FINCEPT.BORDER}`,- borderRadius: '6px',- color: FINCEPT.WHITE,- fontSize: '14px',- }}- >- <option value="momentum">Momentum</option>- <option value="mean_reversion">Mean Reversion</option>- <option value="stat_arb">Statistical Arbitrage</option>- <option value="pairs_trading">Pairs Trading</option>- </select>+ {/* Header */}+ <div style={{+ ...COMMON_STYLES.sectionHeader,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'space-between',+ margin: 0,+ }}>+ <div style={{ display: 'flex', alignItems: 'center', gap: SPACING.SMALL }}>+ <Sparkles size={14} color={FINCEPT.ORANGE} />+ <span>MEDALLION FUND SIGNAL ANALYSIS</span></div>- </div>-- <div style={{ display: 'flex', gap: '12px', marginTop: '20px' }}><button- onClick={onRunAnalysis}- disabled={!ticker || isAnalyzing}+ onClick={() => setShowAdvanced(!showAdvanced)}style={{- flex: 1,- padding: '12px',- background: FINCEPT.ORANGE,- color: FINCEPT.DARK_BG,- border: 'none',- borderRadius: '6px',- cursor: ticker && !isAnalyzing ? 'pointer' : 'not-allowed',- fontSize: '14px',- fontWeight: 600,+ ...COMMON_STYLES.buttonSecondary,+ padding: '6px 10px',display: 'flex',alignItems: 'center',justifyContent: 'center',- gap: '8px',- opacity: ticker && !isAnalyzing ? 1 : 0.5,+ minWidth: '32px',+ height: '26px',}}>- {isAnalyzing ? <Loader2 size={16} className="animate-spin" /> : <Play size={16} />}- Run Full Analysis+ <ChevronDown+ size={10}+ style={{+ transform: showAdvanced ? 'rotate(180deg)' : 'rotate(0deg)',+ transition: 'transform 0.2s',+ }}+ /></button>+ </div>- <button- onClick={onRunIC}- disabled={!ticker || isAnalyzing}+ {/* Ticker Input Section */}+ <div style={{ padding: `${SPACING.DEFAULT} ${SPACING.DEFAULT} 0` }}>+ <label style={COMMON_STYLES.dataLabel}>TICKER</label>+ <input+ type="text"+ value={ticker}+ onChange={(e) => setTicker(e.target.value.toUpperCase())}+ placeholder="AAPL"style={{- flex: 1,- padding: '12px',- background: 'transparent',- color: FINCEPT.ORANGE,- border: `1px solid ${FINCEPT.ORANGE}`,- borderRadius: '6px',- cursor: ticker && !isAnalyzing ? 'pointer' : 'not-allowed',- fontSize: '14px',- fontWeight: 600,- display: 'flex',- alignItems: 'center',- justifyContent: 'center',- gap: '8px',- opacity: ticker && !isAnalyzing ? 1 : 0.5,+ ...COMMON_STYLES.inputField,+ marginTop: SPACING.SMALL,+ textTransform: 'uppercase',+ width: '200px',}}- >- <Users size={16} />- IC Deliberation Only- </button>+ onFocus={(e) => e.currentTarget.style.borderColor = FINCEPT.ORANGE}+ onBlur={(e) => e.currentTarget.style.borderColor = FINCEPT.BORDER}+ /></div>++ {/* Strategy Type & Execute - Full Width Section */}+ <div style={{ padding: SPACING.DEFAULT }}>+ <label style={COMMON_STYLES.dataLabel}>STRATEGY TYPE</label>+ <div style={{+ display: 'grid',+ gridTemplateColumns: 'repeat(5, 1fr)',+ gap: SPACING.DEFAULT,+ marginTop: SPACING.SMALL,+ marginLeft: `calc(-1 * ${SPACING.DEFAULT})`,+ marginRight: `calc(-1 * ${SPACING.DEFAULT})`,+ paddingLeft: SPACING.DEFAULT,+ paddingRight: SPACING.DEFAULT,+ }}>+ {SIGNAL_TYPES.map((st) => (+ <button+ key={st.value}+ onClick={() => setSignalType(st.value)}+ style={{+ padding: '8px 12px',+ backgroundColor: signalType === st.value ? FINCEPT.ORANGE : FINCEPT.PANEL_BG,+ color: signalType === st.value ? FINCEPT.DARK_BG : FINCEPT.WHITE,+ border: `1px solid ${signalType === st.value ? FINCEPT.ORANGE : FINCEPT.BORDER}`,+ borderRadius: '2px',+ fontSize: TYPOGRAPHY.SMALL,+ fontWeight: TYPOGRAPHY.BOLD,+ cursor: 'pointer',+ transition: EFFECTS.TRANSITION_FAST,+ textTransform: 'uppercase',+ letterSpacing: '0.3px',+ height: '32px',+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ whiteSpace: 'nowrap',+ }}+ onMouseEnter={(e) => {+ if (signalType !== st.value) {+ e.currentTarget.style.borderColor = FINCEPT.ORANGE;+ e.currentTarget.style.color = FINCEPT.ORANGE;+ }+ }}+ onMouseLeave={(e) => {+ if (signalType !== st.value) {+ e.currentTarget.style.borderColor = FINCEPT.BORDER;+ e.currentTarget.style.color = FINCEPT.WHITE;+ }+ }}+ title={st.desc}+ >+ {st.label}+ </button>+ ))}++ {/* Execute Button */}+ <button+ onClick={onRunAnalysis}+ disabled={!ticker || isAnalyzing}+ style={{+ ...COMMON_STYLES.buttonPrimary,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ gap: SPACING.SMALL,+ padding: '8px 16px',+ height: '32px',+ opacity: ticker && !isAnalyzing ? 1 : 0.5,+ cursor: ticker && !isAnalyzing ? 'pointer' : 'not-allowed',+ }}+ >+ {isAnalyzing ? (+ <>+ <Loader2 size={12} style={{ animation: 'spin 1s linear infinite' }} />+ ANALYZING...+ </>+ ) : (+ <>+ <Play size={12} />+ EXECUTE+ </>+ )}+ </button>+ </div>+ </div>++ {/* Advanced Settings */}+ {showAdvanced && (+ <div style={{+ padding: `0 ${SPACING.DEFAULT} ${SPACING.DEFAULT}`,+ borderTop: `1px solid ${FINCEPT.BORDER}`,+ marginTop: SPACING.DEFAULT,+ paddingTop: SPACING.DEFAULT,+ }}>+ <div style={{ ...COMMON_STYLES.dataLabel, marginBottom: SPACING.SMALL }}>+ ADVANCED PARAMETERS+ </div>+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: SPACING.SMALL, fontSize: TYPOGRAPHY.SMALL, color: FINCEPT.MUTED }}>+ <div>• Lookback Period: Auto</div>+ <div>• Min Confidence: 50.75%</div>+ <div>• Max Leverage: 12.5x</div>+ </div>+ </div>+ )}</div>- {/* Results Section */}- {analysisResult && (- <ResultsDisplay result={analysisResult} />- )}+ {/* Results */}+ {analysisResult && <ResultsDisplay result={analysisResult} />}</div>);}@@ -515,262 +533,398 @@ function AnalysisTab({// RESULTS DISPLAY// =============================================================================-function ResultsDisplay({ result }: { result: SignalAnalysisResult }) {- if (!result.success) {+function ResultsDisplay({ result }: { result: SignalAnalysisResult | any }) {+ if (result.success === false || result.error) {return (<div style={{- background: FINCEPT.PANEL_BG,- border: `1px solid ${FINCEPT.RED}`,- borderRadius: '8px',- padding: '20px',+ ...COMMON_STYLES.panel,+ border: `2px solid ${FINCEPT.RED}`,}}>- <div style={{ display: 'flex', alignItems: 'center', gap: '12px', color: FINCEPT.RED }}>+ <div style={{ display: 'flex', alignItems: 'center', gap: SPACING.DEFAULT, color: FINCEPT.RED }}><AlertCircle size={24} /><div>- <h3 style={{ margin: 0, fontSize: '16px' }}>Analysis Failed</h3>- <p style={{ margin: '4px 0 0', fontSize: '13px', opacity: 0.8 }}>{result.error}</p>+ <div style={{ fontSize: TYPOGRAPHY.SUBHEADING, fontWeight: TYPOGRAPHY.BOLD }}>ANALYSIS FAILED</div>+ <div style={{ fontSize: TYPOGRAPHY.SMALL, marginTop: SPACING.TINY }}>{result.error}</div></div></div></div>);}- const icDecision = result.ic_decision;+ const hasSignalData = result.ticker || result.signal;+ const signalColor = result.signal === 'long' ? FINCEPT.GREEN :+ result.signal === 'short' ? FINCEPT.RED :+ FINCEPT.GRAY;return (- <div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>- {/* IC Decision */}- {icDecision && (+ <div style={{ display: 'flex', flexDirection: 'column', gap: SPACING.DEFAULT }}>+ {/* Main Signal Card */}+ {hasSignalData && (<div style={{- background: FINCEPT.PANEL_BG,- border: `1px solid ${FINCEPT.BORDER}`,- borderRadius: '8px',- padding: '20px',+ ...COMMON_STYLES.panel,+ border: `2px solid ${signalColor}`,}}>- <h3 style={{- margin: '0 0 16px',- fontSize: '16px',+ <div style={{display: 'flex',alignItems: 'center',- gap: '8px'+ justifyContent: 'space-between',+ marginBottom: SPACING.DEFAULT,}}>- <Award size={18} color={FINCEPT.ORANGE} />- Investment Committee Decision- </h3>-- {/* Final Decision */}- <div style={{- padding: '16px',- background: icDecision.decision.includes('APPROVE') ? `${FINCEPT.GREEN}15` : `${FINCEPT.RED}15`,- border: `1px solid ${icDecision.decision.includes('APPROVE') ? FINCEPT.GREEN : FINCEPT.RED}`,- borderRadius: '6px',- marginBottom: '16px',- }}>- <div style={{ display: 'flex', alignItems: 'center', gap: '12px', marginBottom: '8px' }}>- {icDecision.decision.includes('APPROVE') ? (- <CheckCircle size={20} color={FINCEPT.GREEN} />- ) : (- <AlertCircle size={20} color={FINCEPT.RED} />- )}- <span style={{ fontSize: '16px', fontWeight: 600 }}>{icDecision.decision}</span>- <span style={{ marginLeft: 'auto', fontSize: '14px', color: FINCEPT.MUTED }}>- Confidence: {(icDecision.confidence * 100).toFixed(1)}%+ <div style={{ display: 'flex', alignItems: 'center', gap: SPACING.SMALL }}>+ <Target size={18} color={signalColor} />+ <span style={{+ fontSize: TYPOGRAPHY.HEADING,+ fontWeight: TYPOGRAPHY.BOLD,+ color: signalColor,+ textTransform: 'uppercase',+ letterSpacing: TYPOGRAPHY.WIDE,+ }}>+ {result.signal}</span>+ <div style={{+ ...COMMON_STYLES.badgeInfo,+ backgroundColor: `${signalColor}20`,+ color: signalColor,+ }}>+ {result.ticker}+ </div></div>- <p style={{ margin: 0, fontSize: '13px', opacity: 0.9 }}>{icDecision.decision_rationale}</p>- {icDecision.approved_size_pct && (- <div style={{ marginTop: '8px', fontSize: '13px' }}>- <strong>Approved Size:</strong> {icDecision.approved_size_pct.toFixed(2)}% of NAV+ <div style={{ textAlign: 'right' }}>+ <div style={COMMON_STYLES.dataLabel}>CONFIDENCE</div>+ <div style={{+ fontSize: TYPOGRAPHY.HEADING,+ fontWeight: TYPOGRAPHY.BOLD,+ color: signalColor,+ }}>+ {result.confidence?.toFixed(2)}%</div>- )}+ </div></div>- {/* Vote Summary */}- <div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: '12px', marginBottom: '16px' }}>- {Object.entries(icDecision.vote_summary).map(([vote, count]) => (- <div- key={vote}- style={{- padding: '12px',- background: FINCEPT.DARK_BG,- borderRadius: '6px',- textAlign: 'center',- }}- >- <div style={{ fontSize: '24px', fontWeight: 700, color: FINCEPT.ORANGE }}>{count}</div>- <div style={{ fontSize: '11px', color: FINCEPT.MUTED, marginTop: '4px', textTransform: 'uppercase' }}>- {vote}- </div>- </div>- ))}+ {/* Reasoning */}+ <div style={{+ padding: SPACING.DEFAULT,+ backgroundColor: `${signalColor}10`,+ border: `1px solid ${signalColor}30`,+ borderRadius: '2px',+ fontSize: TYPOGRAPHY.BODY,+ color: FINCEPT.WHITE,+ marginBottom: SPACING.DEFAULT,+ }}>+ {result.reasoning}</div>- {/* Member Votes */}- <h4 style={{ margin: '16px 0 12px', fontSize: '14px', color: FINCEPT.MUTED }}>Member Votes:</h4>- <div style={{ display: 'flex', flexDirection: 'column', gap: '12px' }}>- {icDecision.member_opinions?.map((opinion, idx) => (- <div- key={idx}- style={{- padding: '12px',- background: FINCEPT.DARK_BG,- borderRadius: '6px',- borderLeft: `3px solid ${- opinion.vote === 'approve' ? FINCEPT.GREEN :- opinion.vote === 'reject' ? FINCEPT.RED :- FINCEPT.ORANGE- }`,- }}- >- <div style={{ display: 'flex', alignItems: 'center', gap: '8px', marginBottom: '6px' }}>- {opinion.vote === 'approve' ? <ThumbsUp size={14} color={FINCEPT.GREEN} /> :- opinion.vote === 'reject' ? <ThumbsDown size={14} color={FINCEPT.RED} /> :- <MessageSquare size={14} color={FINCEPT.ORANGE} />}- <strong style={{ fontSize: '13px' }}>{opinion.member_role}</strong>- <span style={{ marginLeft: 'auto', fontSize: '12px', color: FINCEPT.MUTED }}>- {(opinion.confidence * 100).toFixed(0)}%- </span>+ {/* Metrics Grid */}+ <div style={{+ display: 'grid',+ gridTemplateColumns: 'repeat(4, 1fr)',+ gap: SPACING.SMALL,+ marginBottom: SPACING.DEFAULT,+ }}>+ <MetricBox label="SIGNAL" value={result.signal_score?.toFixed(1)} color={FINCEPT.CYAN} />+ <MetricBox label="RISK" value={result.risk_score?.toFixed(1)} color={FINCEPT.RED} />+ <MetricBox label="EXECUTION" value={result.execution_score?.toFixed(1)} color={FINCEPT.GREEN} />+ <MetricBox label="ARBITRAGE" value={result.arbitrage_score?.toFixed(1)} color={FINCEPT.ORANGE} />+ </div>++ {/* Position Sizing */}+ {result.position_sizing && (+ <div style={{+ padding: SPACING.DEFAULT,+ backgroundColor: FINCEPT.PANEL_BG,+ border: BORDERS.STANDARD,+ borderRadius: '2px',+ marginBottom: SPACING.DEFAULT,+ }}>+ <div style={{ ...COMMON_STYLES.dataLabel, marginBottom: SPACING.SMALL }}>+ POSITION SIZING RECOMMENDATION+ </div>+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: SPACING.DEFAULT }}>+ <div>+ <div style={{ fontSize: TYPOGRAPHY.SMALL, color: FINCEPT.MUTED }}>Size</div>+ <div style={{+ fontSize: TYPOGRAPHY.SUBHEADING,+ fontWeight: TYPOGRAPHY.BOLD,+ color: FINCEPT.ORANGE,+ }}>+ {result.position_sizing.recommended_size_pct?.toFixed(2)}%+ </div>+ </div>+ <div>+ <div style={{ fontSize: TYPOGRAPHY.SMALL, color: FINCEPT.MUTED }}>Kelly</div>+ <div style={{+ fontSize: TYPOGRAPHY.SUBHEADING,+ fontWeight: TYPOGRAPHY.BOLD,+ color: FINCEPT.CYAN,+ }}>+ {result.position_sizing.kelly_fraction?.toFixed(4)}+ </div>+ </div>+ <div>+ <div style={{ fontSize: TYPOGRAPHY.SMALL, color: FINCEPT.MUTED }}>Leverage</div>+ <div style={{+ fontSize: TYPOGRAPHY.SUBHEADING,+ fontWeight: TYPOGRAPHY.BOLD,+ color: FINCEPT.GREEN,+ }}>+ {result.position_sizing.leverage?.toFixed(2)}x+ </div></div>- <p style={{ margin: 0, fontSize: '12px', opacity: 0.8 }}>{opinion.rationale}</p></div>- ))}- </div>+ </div>+ )}- {/* Pros & Cons */}- <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '16px', marginTop: '16px' }}>- <div>- <h4 style={{ margin: '0 0 8px', fontSize: '13px', color: FINCEPT.GREEN }}>Pros:</h4>- {icDecision.pros?.map((pro, idx) => (- <div key={idx} style={{ fontSize: '12px', marginBottom: '4px', paddingLeft: '12px' }}>- • {pro}+ {/* Factors & Risks */}+ <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: SPACING.DEFAULT }}>+ {/* Key Factors */}+ <div style={{+ padding: SPACING.DEFAULT,+ backgroundColor: `${FINCEPT.GREEN}10`,+ border: `1px solid ${FINCEPT.GREEN}30`,+ borderRadius: '2px',+ }}>+ <div style={{+ fontSize: TYPOGRAPHY.SMALL,+ fontWeight: TYPOGRAPHY.BOLD,+ color: FINCEPT.GREEN,+ marginBottom: SPACING.SMALL,+ letterSpacing: TYPOGRAPHY.WIDE,+ }}>+ ✓ KEY FACTORS+ </div>+ {result.key_factors?.map((factor: string, idx: number) => (+ <div key={idx} style={{+ fontSize: TYPOGRAPHY.SMALL,+ color: FINCEPT.WHITE,+ marginBottom: SPACING.TINY,+ paddingLeft: SPACING.SMALL,+ }}>+ • {factor}</div>))}</div>- <div>- <h4 style={{ margin: '0 0 8px', fontSize: '13px', color: FINCEPT.RED }}>Cons:</h4>- {icDecision.cons?.map((con, idx) => (- <div key={idx} style={{ fontSize: '12px', marginBottom: '4px', paddingLeft: '12px' }}>- • {con}++ {/* Risks */}+ <div style={{+ padding: SPACING.DEFAULT,+ backgroundColor: `${FINCEPT.RED}10`,+ border: `1px solid ${FINCEPT.RED}30`,+ borderRadius: '2px',+ }}>+ <div style={{+ fontSize: TYPOGRAPHY.SMALL,+ fontWeight: TYPOGRAPHY.BOLD,+ color: FINCEPT.RED,+ marginBottom: SPACING.SMALL,+ letterSpacing: TYPOGRAPHY.WIDE,+ }}>+ ⚠ RISKS+ </div>+ {result.risks?.map((risk: string, idx: number) => (+ <div key={idx} style={{+ fontSize: TYPOGRAPHY.SMALL,+ color: FINCEPT.WHITE,+ marginBottom: SPACING.TINY,+ paddingLeft: SPACING.SMALL,+ }}>+ • {risk}</div>))}</div></div>++ {/* Signal Strength Breakdown */}+ {result.signal_strength && (+ <div style={{+ marginTop: SPACING.DEFAULT,+ padding: SPACING.DEFAULT,+ backgroundColor: FINCEPT.DARK_BG,+ border: BORDERS.STANDARD,+ borderRadius: '2px',+ }}>+ <div style={{ ...COMMON_STYLES.dataLabel, marginBottom: SPACING.SMALL }}>+ SIGNAL DECOMPOSITION+ </div>+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(2, 1fr)', gap: SPACING.SMALL }}>+ {Object.entries(result.signal_strength).map(([key, value]: [string, any]) => {+ const numValue = typeof value === 'number' ? value : 0;+ const barColor = numValue > 0 ? FINCEPT.GREEN : FINCEPT.RED;+ const barWidth = Math.abs(numValue) * 100;++ return (+ <div key={key}>+ <div style={{+ display: 'flex',+ justifyContent: 'space-between',+ fontSize: TYPOGRAPHY.SMALL,+ marginBottom: '2px',+ }}>+ <span style={{ color: FINCEPT.MUTED }}>+ {key.replace(/_/g, ' ').replace(/\b\w/g, l => l.toUpperCase())}+ </span>+ <span style={{ color: FINCEPT.CYAN, fontWeight: TYPOGRAPHY.BOLD }}>+ {typeof value === 'number' ? value.toFixed(4) : value}+ </span>+ </div>+ <div style={{+ height: '4px',+ backgroundColor: FINCEPT.BORDER,+ position: 'relative',+ overflow: 'hidden',+ }}>+ <div style={{+ position: 'absolute',+ left: numValue < 0 ? `${100 - barWidth}%` : '0',+ height: '100%',+ width: `${barWidth}%`,+ backgroundColor: barColor,+ transition: 'width 0.3s ease',+ }} />+ </div>+ </div>+ );+ })}+ </div>+ </div>+ )}</div>)}</div>);}-// =============================================================================-// AGENTS TAB-// =============================================================================--function AgentsTab({- agents,- selectedAgent,- onSelectAgent,- agentStatuses,-}: {- agents: RenTechAgent[];- selectedAgent: string | null;- onSelectAgent: (id: string | null) => void;- agentStatuses: Record<string, string>;-}) {+// Metric Box Component+function MetricBox({ label, value, color }: { label: string; value: string | undefined; color: string }) {return (- <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(280px, 1fr))', gap: '16px' }}>- {agents.map((agent) => (- <div- key={agent.id}- onClick={() => onSelectAgent(agent.id === selectedAgent ? null : agent.id)}- style={{- padding: '16px',- background: selectedAgent === agent.id ? `${FINCEPT.ORANGE}15` : FINCEPT.PANEL_BG,- border: `1px solid ${selectedAgent === agent.id ? FINCEPT.ORANGE : FINCEPT.BORDER}`,- borderRadius: '8px',- cursor: 'pointer',- transition: 'all 0.2s',- }}- >- <div style={{ display: 'flex', alignItems: 'center', gap: '12px', marginBottom: '8px' }}>- <Brain size={20} color={FINCEPT.ORANGE} />- <h4 style={{ margin: 0, fontSize: '14px', fontWeight: 600 }}>{agent.name}</h4>- </div>- <p style={{ margin: '0 0 12px', fontSize: '12px', color: FINCEPT.MUTED }}>{agent.role}</p>- <div style={{ display: 'flex', alignItems: 'center', gap: '8px', fontSize: '12px' }}>- <div- style={{- width: '8px',- height: '8px',- borderRadius: '50%',- background: agentStatuses[agent.id] === 'running' ? FINCEPT.ORANGE :- agentStatuses[agent.id] === 'completed' ? FINCEPT.GREEN :- agentStatuses[agent.id] === 'error' ? FINCEPT.RED :- FINCEPT.MUTED,- }}- />- <span style={{ color: FINCEPT.MUTED, textTransform: 'capitalize' }}>- {agentStatuses[agent.id] || 'idle'}- </span>- </div>- </div>- ))}+ <div style={{+ padding: SPACING.DEFAULT,+ backgroundColor: FINCEPT.DARK_BG,+ border: `1px solid ${FINCEPT.BORDER}`,+ borderRadius: '2px',+ textAlign: 'center',+ }}>+ <div style={{+ fontSize: TYPOGRAPHY.TINY,+ color: FINCEPT.GRAY,+ marginBottom: SPACING.TINY,+ fontWeight: TYPOGRAPHY.BOLD,+ letterSpacing: TYPOGRAPHY.WIDE,+ }}>+ {label}+ </div>+ <div style={{+ fontSize: '18px',+ fontWeight: TYPOGRAPHY.BOLD,+ color: color,+ }}>+ {value || '--'}+ </div></div>);}// =============================================================================-// TEAMS TAB+// AGENTS TAB// =============================================================================-function TeamsTab({- teams,- selectedTeam,- onSelectTeam,-}: {- teams: RenTechTeam[];- selectedTeam: string;- onSelectTeam: (id: string) => void;-}) {+function AgentsTab({ agents }: { agents: RenTechAgent[] }) {+ const categories = [+ { id: 'research', label: 'Research Team', icon: Brain, color: FINCEPT.PURPLE },+ { id: 'execution', label: 'Execution Team', icon: Activity, color: FINCEPT.BLUE },+ { id: 'risk', label: 'Risk Team', icon: Shield, color: FINCEPT.RED },+ { id: 'committee', label: 'Investment Committee', icon: Award, color: FINCEPT.ORANGE },+ ];+return (- <div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>- {teams.map((team) => (- <div- key={team.id}- onClick={() => onSelectTeam(team.id)}- style={{- padding: '20px',- background: selectedTeam === team.id ? `${FINCEPT.ORANGE}15` : FINCEPT.PANEL_BG,- border: `1px solid ${selectedTeam === team.id ? FINCEPT.ORANGE : FINCEPT.BORDER}`,- borderRadius: '8px',- cursor: 'pointer',- transition: 'all 0.2s',- }}- >- <div style={{ display: 'flex', alignItems: 'center', gap: '12px', marginBottom: '8px' }}>- <Users size={20} color={FINCEPT.ORANGE} />- <h4 style={{ margin: 0, fontSize: '16px', fontWeight: 600 }}>{team.name}</h4>- </div>- <p style={{ margin: '0 0 12px', fontSize: '13px', color: FINCEPT.MUTED }}>{team.description}</p>- <div style={{ display: 'flex', flexWrap: 'wrap', gap: '8px' }}>- {team.members.map((memberId) => {- const agent = AGENTS.find(a => a.id === memberId);- return agent ? (+ <div style={{ display: 'flex', flexDirection: 'column', gap: SPACING.DEFAULT }}>+ {categories.map((cat) => {+ const categoryAgents = agents.filter(a => a.category === cat.id);+ const CategoryIcon = cat.icon;++ return (+ <div key={cat.id} style={COMMON_STYLES.panel}>+ <div style={{+ ...COMMON_STYLES.sectionHeader,+ display: 'flex',+ alignItems: 'center',+ gap: SPACING.SMALL,+ color: cat.color,+ }}>+ <CategoryIcon size={14} />+ <span>{cat.label}</span>+ <span style={{+ marginLeft: 'auto',+ ...COMMON_STYLES.badgeInfo,+ backgroundColor: `${cat.color}20`,+ color: cat.color,+ }}>+ {categoryAgents.length} AGENTS+ </span>+ </div>++ <div style={{+ display: 'grid',+ gridTemplateColumns: categoryAgents.length === 2 ? 'repeat(2, 1fr)' :+ categoryAgents.length === 4 ? 'repeat(4, 1fr)' :+ 'repeat(auto-fill, minmax(240px, 1fr))',+ gap: SPACING.DEFAULT,+ }}>+ {categoryAgents.map((agent) => (<div- key={memberId}+ key={agent.id}style={{- padding: '6px 12px',- background: FINCEPT.DARK_BG,- borderRadius: '4px',- fontSize: '12px',+ padding: SPACING.DEFAULT,+ backgroundColor: FINCEPT.PANEL_BG,+ border: BORDERS.STANDARD,+ borderRadius: '2px',+ transition: EFFECTS.TRANSITION_FAST,+ cursor: 'pointer',+ }}+ onMouseEnter={(e) => {+ e.currentTarget.style.backgroundColor = FINCEPT.HOVER;+ e.currentTarget.style.borderColor = cat.color;+ }}+ onMouseLeave={(e) => {+ e.currentTarget.style.backgroundColor = FINCEPT.PANEL_BG;+ e.currentTarget.style.borderColor = FINCEPT.BORDER;}}>- {agent.name}+ <div style={{+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'space-between',+ marginBottom: SPACING.SMALL,+ }}>+ <div style={{+ fontSize: TYPOGRAPHY.BODY,+ fontWeight: TYPOGRAPHY.BOLD,+ color: cat.color,+ }}>+ {agent.name}+ </div>+ <div style={{+ width: '8px',+ height: '8px',+ borderRadius: '50%',+ backgroundColor: agent.status === 'completed' ? FINCEPT.GREEN :+ agent.status === 'running' ? FINCEPT.ORANGE :+ agent.status === 'error' ? FINCEPT.RED :+ FINCEPT.GRAY,+ }} />+ </div>+ <div style={{+ fontSize: TYPOGRAPHY.SMALL,+ color: FINCEPT.MUTED,+ lineHeight: '1.4',+ }}>+ {agent.role}+ </div></div>- ) : null;- })}+ ))}+ </div></div>- </div>- ))}+ );+ })}</div>);}@@ -786,54 +940,108 @@ function ConfigTab({riskLimits: RiskLimits;onUpdateLimits: (limits: RiskLimits) => void;}) {+ const params = [+ { key: 'max_position_size_pct', label: 'Max Position Size', unit: '%', color: FINCEPT.ORANGE },+ { key: 'max_leverage', label: 'Max Leverage', unit: 'x', color: FINCEPT.RED },+ { key: 'max_drawdown_pct', label: 'Max Drawdown', unit: '%', color: FINCEPT.RED },+ { key: 'max_daily_var_pct', label: 'Max Daily VaR', unit: '%', color: FINCEPT.YELLOW },+ { key: 'min_signal_confidence', label: 'Min Signal Confidence', unit: '', color: FINCEPT.GREEN },+ ];+return (- <div style={{- background: FINCEPT.PANEL_BG,- border: `1px solid ${FINCEPT.BORDER}`,- borderRadius: '8px',- padding: '20px',- }}>- <h3 style={{ margin: '0 0 20px', fontSize: '16px', display: 'flex', alignItems: 'center', gap: '8px' }}>- <Shield size={18} color={FINCEPT.ORANGE} />- Risk Management Configuration- </h3>-- <div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>- {Object.entries(riskLimits).map(([key, value]) => (- <div key={key}>- <label style={{ display: 'block', marginBottom: '8px', fontSize: '13px', color: FINCEPT.MUTED }}>- {key.replace(/_/g, ' ').replace(/\b\w/g, l => l.toUpperCase())}- </label>- <input- type="number"- value={value}- onChange={(e) => onUpdateLimits({ ...riskLimits, [key]: parseFloat(e.target.value) })}- step="0.1"+ <div style={COMMON_STYLES.panel}>+ <div style={{+ ...COMMON_STYLES.sectionHeader,+ display: 'flex',+ alignItems: 'center',+ gap: SPACING.SMALL,+ }}>+ <Shield size={14} color={FINCEPT.ORANGE} />+ <span>RISK MANAGEMENT PARAMETERS</span>+ </div>++ <div style={{ display: 'flex', flexDirection: 'column', gap: SPACING.DEFAULT }}>+ {params.map((param) => {+ const value = riskLimits[param.key as keyof RiskLimits];+ return (+ <div+ key={param.key}style={{- width: '100%',- padding: '10px 12px',- background: FINCEPT.DARK_BG,- border: `1px solid ${FINCEPT.BORDER}`,- borderRadius: '6px',- color: FINCEPT.WHITE,- fontSize: '14px',+ padding: SPACING.DEFAULT,+ backgroundColor: FINCEPT.PANEL_BG,+ border: BORDERS.STANDARD,+ borderRadius: '2px',}}- />- </div>- ))}+ >+ <div style={{+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'space-between',+ marginBottom: SPACING.SMALL,+ }}>+ <div>+ <div style={{ ...COMMON_STYLES.dataLabel }}>{param.label}</div>+ <div style={{+ fontSize: TYPOGRAPHY.HEADING,+ fontWeight: TYPOGRAPHY.BOLD,+ color: param.color,+ marginTop: '2px',+ }}>+ {value}{param.unit}+ </div>+ </div>+ <input+ type="number"+ value={value}+ onChange={(e) => onUpdateLimits({+ ...riskLimits,+ [param.key]: parseFloat(e.target.value)+ })}+ step={param.key === 'min_signal_confidence' ? '0.01' : '0.1'}+ style={{+ ...COMMON_STYLES.inputField,+ width: '120px',+ textAlign: 'right',+ }}+ onFocus={(e) => e.currentTarget.style.borderColor = FINCEPT.ORANGE}+ onBlur={(e) => e.currentTarget.style.borderColor = FINCEPT.BORDER}+ />+ </div>+ {/* Progress Bar */}+ <div style={{+ height: '4px',+ backgroundColor: FINCEPT.BORDER,+ position: 'relative',+ overflow: 'hidden',+ }}>+ <div style={{+ position: 'absolute',+ left: 0,+ height: '100%',+ width: `${Math.min((value / (param.key === 'max_leverage' ? 20 : 100)) * 100, 100)}%`,+ backgroundColor: param.color,+ transition: 'width 0.3s ease',+ }} />+ </div>+ </div>+ );+ })}</div><div style={{- marginTop: '20px',- padding: '16px',- background: `${FINCEPT.ORANGE}10`,+ marginTop: SPACING.DEFAULT,+ padding: SPACING.DEFAULT,+ backgroundColor: `${FINCEPT.ORANGE}10`,border: `1px solid ${FINCEPT.ORANGE}30`,- borderRadius: '6px',- fontSize: '12px',+ borderRadius: '2px',+ fontSize: TYPOGRAPHY.SMALL,color: FINCEPT.MUTED,}}>- <strong style={{ color: FINCEPT.ORANGE }}>Note:</strong> These risk limits are applied to all signal analysis- and IC deliberations. Changes take effect immediately.+ <div style={{ color: FINCEPT.ORANGE, fontWeight: TYPOGRAPHY.BOLD, marginBottom: SPACING.TINY }}>+ ⓘ MEDALLION FUND RISK FRAMEWORK+ </div>+ Risk parameters are applied to all signal analyses and IC deliberations. Changes take effect immediately.+ These limits reflect Renaissance Technologies' proprietary risk management system.</div></div>);