Skip to content

Backtest

The Backtest worker calculates a pro-forma backtest of a portfolio versus a benchmark over a specified date range, and returns performance statistics as a datastore.


Parameters

Input

Field Description
Portfolio The target portfolio. Accepts Fixed Portfolio, Get Latest, or Upstream Data
Workspace Workspace of the portfolio. Accepts Fixed Workspace. Defaults to the current workspace
Benchmark Benchmark symbol for the backtest. Accepts Symbol. Defaults to IND:SPX
Risk Free Rate Index The risk-free rate index used in statistics calculations
Date Range The date range for calculations. Choose Custom Range (start and end dates), Last N Periods (Days, Weeks, Months, or Years), or Period to Date (Month, Quarter, or Year)

Output

Field Description
Name Name of the output datastore. Accepts Template Text or Upstream Data. Defaults to the portfolio name
Date Date of the output datastore. Accepts Fixed Date or Upstream Data. Defaults to the portfolio date
Workspace Workspace where the output datastore will be saved. Accepts Fixed Workspace. Defaults to the portfolio workspace
Tags Tags for the output datastore. Accepts Fixed Tags or Upstream Data. Defaults to the portfolio tags
Storage Mode Transient — exists only within the current workflow run (default); Create — saves the datastore to the platform

Advanced

Field Description
Header Suffix Suffix appended to the end of column names in the output datastore. Accepts Template Text or Upstream Data. Default is no suffix


Result

Once the worker finishes successfully, it returns a result object containing the datastore. You can check the Output Types article to learn more about result object types.

  • Datastore (datastore)
  • ID (string)
  • Name (string)
  • Date (date)
  • Tags (list of strings)
  • Data (list of lists)

The Data component includes the following columns:

  • port_bt_start_date
  • port_bt_end_date
  • port_bt_monthly_return_average
  • port_bt_monthly_return_high
  • port_bt_monthly_return_low
  • port_bt_monthly_return_compounded
  • port_bt_annual_return_compounded
  • port_bt_monthly_return_cummulative
  • port_bt_percent_positive_months
  • port_bt_percent_negative_months
  • port_bt_average_positive_month
  • port_bt_average_negative_month
  • port_bt_profit_to_loss
  • port_bt_maximum_drawdown
  • port_bt_maximum_drawdown_start
  • port_bt_maximum_drawdown_end
  • port_bt_streak_positive_months
  • port_bt_streak_positive_start
  • port_bt_streak_positive_end
  • port_bt_streak_negative_months
  • port_bt_streak_negative_start
  • port_bt_streak_negative_end
  • port_bt_monthly_standard_deviation
  • port_bt_annual_standard_deviation
  • port_bt_annual_var
  • port_bt_annual_var_confidence
  • port_bt_monthly_downside_deviation
  • port_bt_annual_downside_deviation
  • port_bt_skewness
  • port_bt_excess_kurtosis
  • port_bt_risk_free_rate
  • port_bt_risk_free_rate_average
  • port_bt_monthly_sharpe_ratio
  • port_bt_annual_sharpe_ratio
  • port_bt_monthly_sortino_ratio
  • port_bt_annual_sortino_ratio
  • port_bt_monthly_treynor_ratio
  • port_bt_annual_treynor_ratio
  • port_bt_monthly_information_ratio
  • port_bt_annual_information_ratio
  • port_bt_benchmark
  • port_bt_monthly_alpha
  • port_bt_annual_alpha
  • port_bt_beta
  • port_bt_correlation
  • port_bt_r2
  • port_bt_monthly_tracking_error
  • port_bt_annual_tracking_error
  • port_bt_upside_capture
  • port_bt_downside_capture