backtesting

Get Backtest By ID

Fetches a single backtest by its ID. Poll this endpoint to watch status move through pending, running, and completed; while it runs the object reports progress and an ETA you can use to space out polls. Once completed, read statistics, trials, snapshots, and notices.

get/backtests/{id}

Request

  • Base URL
    https://backtester.vast.tastyworks.com
  • Auth
    none declared

Path parameters

idstring required

Response

The backtest object, including its current status and (once completed) results.

idstring

Unique identifier for this backtest. Use it with GET /backtests/{id} to poll status and read results.

symbolstring

Underlying symbol the strategy trades.

startDatestring date

First date of the backtested historical window, in ISO 8601 YYYY-MM-DD format.

endDatestring date

Last date of the backtested historical window, in ISO 8601 YYYY-MM-DD format.

ETAnumber

Estimated time remaining until the run completes. Use it to space out polls while the backtest is still running.

progressnumber

Completion progress of the run.

status'pending' | 'running' | 'completed'

Current run state. Moves through pending, running, and completed; read results once it is completed.

statisticsobject[]

Aggregate performance metrics for the run, populated once the backtest completes.

noticesstring[]

Conditional annotations appearing if specific conditions are met (for example overlapping ranges due to a stock split).

Example response

{
  "id": "b1f8c2a4-9e7d-4a31-8c6f-2d5e1a0b3c7e",
  "symbol": "SPY",
  "startDate": "2022-01-01",
  "endDate": "2022-12-31",
  "legs": [
    {
      "type": "equity-option",
      "direction": "short",
      "side": "put",
      "quantity": 1,
      "strikeSelection": "delta",
      "delta": 16,
      "percentageOTM": 0.1,
      "currentPriceOffset": 5,
      "premium": 2.5,
      "daysUntilExpiration": 45
    }
  ],
  "entryConditions": {
    "frequency": "every day",
    "maximumActiveTrials": 5,
    "maximumActiveTrialsBehavior": "don't enter",
    "minimumVIX": 15,
    "maximumVIX": 30
  },
  "exitConditions": {
    "takeProfitPercentage": 50,
    "stopLossPercentage": 100,
    "afterDaysInTrade": 21,
    "atDaysToExpiration": 7,
    "minimumVIX": 12
  },
  "status": "completed",
  "trials": [
    {
      "openDateTime": "2022-01-03T14:30:00Z",
      "closeDateTime": "2022-01-20T20:00:00Z",
      "profitLoss": 128.5
    }
  ],
  "snapshots": [
    {
      "dateTime": "2022-01-03T14:30:00Z",
      "profitLoss": 128.5,
      "underlyingPrice": 477.71
    }
  ],
  "notices": []
}

Changes

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