from __future__ import annotations from abc import ABC, abstractmethod from dataclasses import dataclass from app.models.portfolio import LombardPortfolio @dataclass(frozen=True) class StrategyConfig: """Common research inputs used by all strategy implementations.""" portfolio: LombardPortfolio spot_price: float volatility: float risk_free_rate: float class BaseStrategy(ABC): """Abstract strategy interface for paper-based hedge analysis.""" def __init__(self, config: StrategyConfig) -> None: self.config = config @property @abstractmethod def name(self) -> str: # pragma: no cover - interface only raise NotImplementedError @abstractmethod def calculate_cost(self) -> dict: raise NotImplementedError @abstractmethod def calculate_protection(self) -> dict: raise NotImplementedError @abstractmethod def get_scenarios(self) -> list[dict]: raise NotImplementedError