/** * Prediction Stats Overview Component - STC Theme (Gold/Black) */ import { FC } from 'react'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Progress } from '@/components/ui/progress'; import type { PredictionStats } from '../types'; interface StatsOverviewProps { stats: PredictionStats; } export const StatsOverview: FC = ({ stats }) => { return (
{/* Main Stats */}

Total Predictions

{stats.totalPredictions}

Win Rate

= 50 ? 'text-green-400' : 'text-red-400'}`}> {stats.winRate.toFixed(1)}%

Avg P&L

= 0 ? 'text-green-400' : 'text-red-400'}`}> {stats.averagePnlPercent >= 0 ? '+' : ''}{stats.averagePnlPercent.toFixed(2)}%

Win/Loss

{stats.winCount} / {stats.lossCount}

{/* Breakdown */}
{/* By Type */} By Model Type {stats.byType.map((item) => (
{item.predictionType} ({item.total})
= 50 ? 'bg-green-500' : 'bg-red-500'} /> = 50 ? 'text-green-400' : 'text-red-400' }`}> {item.winRate.toFixed(0)}%
))}
{/* By Asset Class */} By Asset Class {stats.byAssetClass.map((item) => (
{item.assetClass} ({item.total})
= 50 ? 'bg-green-500' : 'bg-red-500'} /> = 50 ? 'text-green-400' : 'text-red-400' }`}> {item.winRate.toFixed(0)}%
))}
{/* Outcome Distribution */} Outcome Distribution
Wins: {stats.winCount} Partial: {stats.partialCount} Losses: {stats.lossCount} Expired: {stats.expiredCount}
); };