stacksats.api¶
stacksats.api
¶
Result types for strategy lifecycle operations.
BacktestResult(spd_table: pd.DataFrame, exp_decay_percentile: float, win_rate: float, score: float, strategy_id: str = 'unknown', strategy_version: str = '0.0.0', config_hash: str = '', run_id: str = '')
dataclass
¶
Structured backtest result.
plot(output_dir: str = 'output') -> dict[str, str]
¶
Generate standard backtest plots and return output paths.
summary() -> str
¶
Return a concise text summary of key metrics.
to_dataframe() -> pd.DataFrame
¶
Return the SPD table.
to_json(path: str | Path | None = None) -> dict
¶
Serialize result to a JSON-compatible dictionary.