import abc
from _typeshed import Incomplete
from abc import ABC, abstractmethod
from czsc.core import BarGenerator as BarGenerator, Position as Position, RawBar as RawBar, Signal as Signal
from czsc.py.bar_generator import check_freq_and_market as check_freq_and_market
from czsc.traders.base import CzscTrader as CzscTrader
from czsc.traders.sig_parse import get_signals_config as get_signals_config, get_signals_freqs as get_signals_freqs
from czsc.utils.io import dill_dump as dill_dump, read_json as read_json, save_json as save_json

class CzscStrategyBase(ABC, metaclass=abc.ABCMeta):
    kwargs: Incomplete
    signals_module_name: Incomplete
    def __init__(self, **kwargs) -> None: ...
    @property
    def symbol(self): ...
    @property
    def unique_signals(self): ...
    @property
    def signals_config(self): ...
    @property
    def freqs(self): ...
    @property
    def sorted_freqs(self): ...
    @property
    def base_freq(self): ...
    @abstractmethod
    def positions(self) -> list[Position]: ...
    def init_bar_generator(self, bars: list[RawBar], **kwargs): ...
    def init_trader(self, bars: list[RawBar], **kwargs) -> CzscTrader: ...
    def backtest(self, bars: list[RawBar], **kwargs) -> CzscTrader: ...
    def dummy(self, sigs: list[dict], **kwargs) -> CzscTrader: ...
    def replay(self, bars: list[RawBar], res_path, **kwargs): ...
    def check(self, bars: list[RawBar], res_path, **kwargs): ...
    def save_positions(self, path) -> None: ...
    def load_positions(self, files: list, check: bool = True) -> list[Position]: ...

class CzscJsonStrategy(CzscStrategyBase):
    @property
    def positions(self): ...
