export interface Company {
  symbol: string;
  name: string;
  price: number;
  change: number;
  changePercent: number;
  marketCap: number;
  volume: number;
  pe?: number;
  eps?: number;
  high52Week?: number;
  low52Week?: number;
}

export interface Holding {
  symbol: string;
  name: string;
  quantity: number;
  avgCost: number;
  currentPrice: number;
  currentValue: number;
  gainLoss: number;
  gainLossPercent: number;
}

export interface Portfolio {
  holdings: Holding[];
  totalValue: number;
  dayChange: number;
  dayChangePercent: number;
  totalGain: number;
  totalGainPercent: number;
}

export interface NewsItem {
  id: string;
  source: string;
  headline: string;
  timestamp: Date;
  snippet: string;
  url?: string;
  relatedTickers: string[];
}

export interface StockAnalysis {
  symbol: string;
  summary: string;
  sentiment: 'bullish' | 'bearish' | 'neutral';
  keyPoints: string[];
  risks: string[];
  opportunities: string[];
  recommendation: 'buy' | 'sell' | 'hold';
  targetPrice?: number;
}

export interface SerializedNewsItem extends Omit<NewsItem, 'timestamp'> {
  timestamp: string;
}

export interface MockFinancialData {
  companies: Company[];
  portfolio: Portfolio;
  newsItems: SerializedNewsItem[];
  analyses: Record<string, StockAnalysis>;
}
