from _typeshed import Incomplete
from czsc.core import BarGenerator as BarGenerator, CZSC as CZSC, Position as Position, RawBar as RawBar, Signal as Signal
from czsc.traders.sig_parse import get_signals_freqs as get_signals_freqs
from czsc.utils.data.cache import home_path as home_path
from datetime import datetime
from typing import AnyStr, Callable

class CzscSignals:
    name: str
    cache: Incomplete
    kwargs: Incomplete
    signals_config: Incomplete
    bg: Incomplete
    symbol: Incomplete
    base_freq: Incomplete
    freqs: Incomplete
    kas: Incomplete
    s: Incomplete
    def __init__(self, bg: BarGenerator | None = None, **kwargs) -> None: ...
    def get_signals_by_conf(self): ...
    def take_snapshot(self, file_html=None, width: str = '1400px', height: str = '580px'): ...
    def open_in_browser(self, width: str = '1400px', height: str = '580px') -> None: ...
    def update_signals(self, bar: RawBar): ...

def generate_czsc_signals(bars: list[RawBar], signals_config: list[dict], sdt: AnyStr | datetime = '20170101', init_n: int = 500, df: bool = False, **kwargs): ...
def check_signals_acc(bars: list[RawBar], signals_config: list[dict], delta_days: int = 5, **kwargs) -> None: ...
def get_unique_signals(bars: list[RawBar], signals_config: list[dict], **kwargs): ...

class CzscTrader(CzscSignals):
    positions: Incomplete
    name: str
    def __init__(self, bg: BarGenerator | None = None, positions: list[Position] | None = None, ensemble_method: AnyStr | Callable = 'mean', **kwargs) -> None: ...
    def update(self, bar: RawBar) -> None: ...
    s: Incomplete
    def on_sig(self, sig: dict) -> None: ...
    def on_bar(self, bar: RawBar) -> None: ...
    @property
    def pos_changed(self) -> bool: ...
    def get_ensemble_pos(self, method: AnyStr | Callable = None) -> float: ...
    def get_position(self, name: str) -> Position | None: ...
    def take_snapshot(self, file_html=None, width: str = '1400px', height: str = '580px'): ...
    def get_ensemble_weight(self, method: AnyStr | Callable | None = None): ...
    def weight_backtest(self, **kwargs): ...
