"""
FTDT Kalman Pairs Trading — Statistical Arbitrage Engine.

Core components:
  - kalman_filter: Pure-NumPy Kalman filter + KalmanPairsTrader
  - pair_discovery: Cointegration tests, half-life filter, rolling OLS
  - trading_system: Production orchestrator (multi-pair, risk layer)
  - backtest: Walk-forward backtester with rolling OLS comparison
  - tuning: Grid search for optimal transition_covariance

Quick start:
    from strategies.kalman_pairs import (
        KalmanPairsTrader, discover_pairs,
        backtest_kalman_pairs, backtest_rolling_ols,
        run_comparison, find_optimal_params
    )
"""

from .kalman_filter import KalmanFilter, KalmanPairsTrader, KalmanState
from .pair_discovery import (
    discover_pairs, test_pair, estimate_half_life,
    adf_test, compute_rolling_ols_hedge,
)
from .trading_system import KalmanPairsTradingSystem, KalmanPairsConfig
from .backtest import (
    backtest_kalman_pairs, backtest_rolling_ols, run_comparison,
)
from .tuning import grid_search_transition_cov, find_optimal_params

__all__ = [
    "KalmanFilter",
    "KalmanPairsTrader",
    "KalmanState",
    "KalmanPairsTradingSystem",
    "KalmanPairsConfig",
    "discover_pairs",
    "test_pair",
    "estimate_half_life",
    "adf_test",
    "compute_rolling_ols_hedge",
    "backtest_kalman_pairs",
    "backtest_rolling_ols",
    "run_comparison",
    "grid_search_transition_cov",
    "find_optimal_params",
]
