OptionalbyOptionalperFor a [T, K, 4] input: the summary of each asset alone, as
backtestReport gives it for that asset's [T, 4] output (Python's
summary["per_asset"]).
The engine columns equity, pnl, position, cost, the
BacktestReport columns, the BacktestStats columns, and index when
one was given. Each is a causal series whose last finite value is the
summary. For a [T, K, 4] input, the book's equity, pnl, and cost
replace the engine columns.
The final statistics, keyed as Python's backtest_report summary.
With
by: for each label, in order of first appearance,total_pnl,total_cost,turnover,sharpe,max_drawdown, andsteps, as Python'ssummary["by_group"].