Class Backtest

java.lang.Object
com.qtsurfer.api.sdk.Backtest

public final class Backtest extends Object
Handle for a running backtest execution. Returned by Strategy.backtest(com.qtsurfer.api.sdk.BacktestRequest, com.qtsurfer.api.sdk.BacktestOptions) once the execute request has been accepted by the backend.
  • Constructor Details

  • Method Details

    • id

      public String id()
      Server-side execute jobId.
    • strategy

      public Strategy strategy()
      The Strategy this backtest was run against.
    • state

      public Backtest.State state()
      Local snapshot of the execution lifecycle; does not itself contact the server.
    • progress

      public Flow.Publisher<BacktestProgress> progress()
      Reactive-streams feed of progress events; terminates when the job reaches a terminal state.
    • await

      public CompletableFuture<com.qtsurfer.api.client.model.ResultMap> await()
      Resolves with the final ResultMap. Completes exceptionally on failure or cancellation.
    • cancel

      public boolean cancel()
      Request cancellation. Cancels the underlying polling future and best-effort calls cancelExecution server-side.
      Returns:
      true if the call caused a transition from Backtest.State.EXECUTING
    • toString

      public String toString()
      Compact debug representation including the job id and current state.
      Overrides:
      toString in class Object