from __future__ import annotations

from abc import ABC, abstractmethod
from typing import Any

class Strategy(ABC):
    """
    Strategy is an abstract base class providing an interface for
    all subsequent (inherited) strategy handling objects.

    The goal of a (derived) Strategy object is to generate SignalEvent
    objects for particular symbols based on the inputs of Bars (OHLCV)
    generated by a DataHandler object.

    This design works with both historical and live data since the
    Strategy is agnostic to the data source.
    """

    @abstractmethod
    def calculate_signals(self, event: Any) -> None:
        """
        Calculate trading signals based on incoming market events.

        Parameters
        ----------
        event : Any
            A MarketEvent object containing new market data.
        """
        raise NotImplementedError("Should implement calculate_signals()")
  