screamer.js
    Preparing search index...

    Function backtestReport

    • Running report columns and a summary for a backtest engine's output.

      values is the [T, 4] output of a backtest engine, with columns [equity, pnl, position, cost], as an NdArray or an array of T rows. running holds the four engine columns, the BacktestReport columns (drawdown, cum_cost, turnover, trades, max_drawdown, sharpe), and the BacktestStats columns (exposure, round_trips, win_rate, profit_factor, avg_win, avg_loss, avg_holding, sortino, calmar). summary holds total_pnl, max_drawdown, total_cost, turnover, num_trades, sharpe, and the nine BacktestStats values. The keys are those of Python's backtest_report, and so are the values.

      values can also be the [T, K, 4] output of a portfolio engine. The result then describes the book, the account the K assets share: running holds the book's equity, pnl, and cost (summed over the assets) and its report and statistics columns, summary the book's statistics, and perAsset the summary of each asset alone. Sharpe, drawdown, sortino, and calmar come from the summed book; turnover, trades, exposure, and the round-trip statistics count over all assets. An asset whose row has a NaN field adds nothing on that row and holds its equity. by groups the book's rows. Mirrors Python's backtest_report.

      Parameters

      Returns BacktestReportResult