// 期权希腊值
export interface Greeks {
  delta: number;
  gamma: number;
  theta: number;
  vega: number;
  rho: number;
}

// 期权定价结果
export interface OptionPricingResult extends Greeks {
  price: number;
  impliedVol?: number;
}

// 期权合约
export interface OptionContract {
  symbol: string;
  underlying: string;
  type: 'call' | 'put';
  strikePrice: number;
  expiryDate: string;
  price?: number;
  iv?: number;
  delta?: number;
  gamma?: number;
  theta?: number;
  vega?: number;
  rho?: number;
  volume?: number;
  openInterest?: number;
}

// 期权链
export interface OptionChain {
  underlying: string;
  underlyingPrice: number;
  expiryDate: string;
  strikes: number[];
  calls: OptionContract[];
  puts: OptionContract[];
}

// 波动率曲面数据点
export interface VolatilityPoint {
  strike: number;
  expiry: string;
  iv: number;
}

// 波动率曲面
export interface VolatilitySurface {
  underlying: string;
  points: VolatilityPoint[];
}

// 期权策略
export interface OptionStrategy {
  name: string;
  description: string;
  legs: StrategyLeg[];
  maxProfit?: number;
  maxLoss?: number;
  breakeven: number[];
}

export interface StrategyLeg {
  type: 'call' | 'put';
  strike: number;
  expiry: string;
  position: 1 | -1; // 1 for buy, -1 for sell
  quantity: number;
}

// 策略盈亏分析
export interface StrategyPayoff {
  pricePoints: number[];
  payoffs: number[];
  maxProfit: number;
  maxLoss: number;
  breakeven: number[];
}
