Backtest

post/api/v0.1/backtest

Request

  • Base URL: https://api.composer.trade (the document declares no server; this is the origin it was published from)
  • URL: https://api.composer.trade/api/v0.1/backtest
  • Auth: none declared

Request body

capitalnumber double required
abbreviate_daysinteger
apply_reg_feeboolean required
apply_taf_feeboolean required
apply_cat_feeboolean
apply_subscription'none' | 'monthly' | 'yearly'
backtest_version'v1' | 'v2'
slippage_percentnumber double required

Despite the name this is not in %. 1% is indicated with 0.01, not 1.0.

spread_markupnumber double

10bps would be 0.001 (0.1%)

start_datestring
end_datestring
broker'ALPACA_OAUTH' | 'ALPACA_WHITE_LABEL' | 'APEX_LEGACY' | 'alpaca' | 'apex' required
benchmark_symphoniesstring[]
benchmark_tickersstring[]
sparkgraph_colorstring

Response

OK

last_semantic_update_atstring date-time
sparkgraph_urlstring
dvm_capitalobject required
tdvm_weightsobject required
rebalance_daysinteger[] required
active_asset_nodesobject required
last_market_days_valuenumber double required
last_market_days_holdingsobject required
last_market_dayinteger required
first_dayinteger required
legendobject
data_warningsobject required
benchmark_errorsstring[]

Example response

{
  "dvm_capital": {
    "a_symphony_id": {
      "15121": 0.1234,
      "15122": 0.1235,
      "15123": 0.1312
    }
  },
  "tdvm_weights": {
    "SPY": {
      "19000": 0.123,
      "19001": 0.124
    }
  },
  "last_market_days_holdings": {
    "$USD": 0.3,
    "SPY": 1.5,
    "UPRO": 44.4
  },
  "data_warnings": {
    "SPY": [
      {
        "message": "Cannot compute 14-day RSI until Jun 1 2023",
        "recommended_start_date": "2023-06-01"
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.