Changelog

2.0.0

Breaking changes

  • Removes PosSizeContext, set_pos_size_handler, and ExecSignal; use Strategy.enable_rotation / RotationContext.

  • Deprecates ExecContext.score and StrategyConfig.max_*_positions; use long_score / short_score and set_max_long_positions / set_max_short_positions.

  • Unifies slippage API; removes RandomSlippageModel.

  • Removes bootstrap_sample_size; BCa and drawdown bootstrap now resample the full backtest series instead of a fixed-size sample, fixing cases that could produce incorrect confidence intervals or degenerate to a single replicate.

  • Removes disable_parallel from backtest / walkforward; parallel indicator and model work is opt-in via parallel_indicators / parallel_models.

  • result.positions is opt-in via StrategyConfig.record_position_bars; full Portfolio.bars snapshots are opt-in via record_portfolio_bars.

  • Removes akshare from install dependencies; install it separately to use AKShare.

  • Fixes the Calmar Ratio to the standard definition of annualized return (CAGR) divided by maximum drawdown percentage; it previously annualized arithmetically and measured drawdown on the cumulative sum of per-bar returns.

  • Fixes the Ulcer Index to measure drawdowns from the running peak over the whole equity curve, and the Ulcer Performance Index to use the annualized (CAGR) return when bars_per_year is set; passing a period to the functions keeps the previous trailing-window behavior.

  • Fixes unrealized_pnl in EvalMetrics, which previously understated unrealized PnL by the total fees paid (per-trade PnL is gross of fees while market values are net of them).

  • annual_total_return_percent now counts n bar values as n - 1 return intervals when annualizing.

1.2.14

  • Requires Python 3.10+.

  • Fixes indicator computation bugs in vect (Aroon, Laguerre RSI, ADX, price change oscillator, reactivity, trend, and related kernels).

  • Fixes duplicate volume column in the AKShare TX fallback path.

1.2.13

  • Adds signal provenance fields to Order:

    • created - date the order signal was created.

    • order_type - how the order originated (market, limit, stop_bar, stop_loss, stop_profit, stop_trailing).

    • intent - position intent (buy_to_open, buy_to_close, sell_to_open, sell_to_close).

  • Adds OrderType and PositionIntent enums.

  • Adds order_id parameter to PendingOrderScope.orders().

  • Adds Agent Skills.

  • Broad performance improvements to bar capture, scope fetches, and position lookups.

  • Improves Alpaca crypto and AKShare reliability.

1.2.12

  • Supports Pandas 3.

1.2.11

  • Fixes readonly NumPy arrays returned by Pandas 2.3.

  • Adds clear_params to clear global parameters.

  • Forwards *args and **kwargs from Strategy.add_execution to the execution function.

  • Adds seed to backtest / walkforward for reproducible bootstrap results.

  • Removes redundant subtract_fees config option.

1.2.10

  • Uses per-bar returns instead of absolute per-bar deltas for Sharpe, Sortino, and Calmar ratios.

1.2.9

  • Upgrades to NumPy 2 while still supporting NumPy 1.

  • Adds LONG_ONLY and SHORT_ONLY position modes.

  • Adds max_drawdown_date to EvalMetrics.

  • Fixes yfinance dependency version.

1.2.8

  • Fixes NumPy typecheck errors.

1.2.7

  • Fixes df.loc[index] returning a DataFrame when the index is not unique.

1.2.6

  • Fixes missing Adj Close column from YFinance; adds auto_adjust argument.

  • Raises an error when sell_all_shares or cover_all_shares is called with no open position.

1.2.5

1.2.4

  • Guarantees largest_loss_pct is always negative and largest_win_pct is always positive in EvalMetrics.

1.2.3

1.1.0

1.0.0

  • Initial release!