# src/risk/sizing/base.py

from abc import ABC, abstractmethod
from typing import Optional


class PositionSizer(ABC):
    """
    Clase base para position sizing.
    """

    @abstractmethod
    def calculate_size(
        self,
        *,
        capital: float,
        entry_price: float,
        stop_price: Optional[float] = None,
        max_capital: float | None = None,
        volatility: Optional[float] = None,
    ) -> float:
        """
        Devuelve el número de unidades a comprar.
        """
        pass
