Class ResultMap

java.lang.Object
com.qtsurfer.api.client.model.ResultMap

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.14.0") public class ResultMap extends Object
Execution result map. Always includes core fields (hostName, iops, strategyId, instrument). Yield metrics (pnlTotal, pnlTotalPercent, totalTrades, winRate, equityCurve, etc.) are present when the strategy emitted at least one trade. When signal storage is enabled, includes signal fields described below. `notices` carries what the run had to say about itself, and is absent when it had nothing.
  • Field Details

  • Constructor Details

    • ResultMap

      public ResultMap()
  • Method Details

    • hostName

      public ResultMap hostName(@Nullable String hostName)
    • getHostName

      @Nullable public String getHostName()
      Identifier of the worker that executed the strategy. Useful when reporting issues so support can correlate with logs.
      Returns:
      hostName
    • setHostName

      public void setHostName(@Nullable String hostName)
    • iops

      public ResultMap iops(@Nullable Double iops)
    • getIops

      @Nullable public Double getIops()
      Instrument operations per second throughput during execution
      Returns:
      iops
    • setIops

      public void setIops(@Nullable Double iops)
    • strategyId

      public ResultMap strategyId(@Nonnull String strategyId)
    • getStrategyId

      @Nonnull public String getStrategyId()
      **Not the `strategyId` you compiled with** — this is the execution context id, `strategy:<user>:<strategyId>`. The compiled strategy's id is the last `:`-separated segment; that, not this whole string, is what `GET /strategy/{strategyId}` takes. Take the segment after the last `:` rather than counting from the front: the shape has changed once already and callers that indexed a fixed position broke on it.
      Returns:
      strategyId
    • setStrategyId

      public void setStrategyId(@Nonnull String strategyId)
    • instrument

      public ResultMap instrument(@Nonnull String instrument)
    • getInstrument

      @Nonnull public String getInstrument()
      The instrument (currency pair) that was backtested
      Returns:
      instrument
    • setInstrument

      public void setInstrument(@Nonnull String instrument)
    • notices

      public ResultMap notices(@Nullable List<Notice> notices)
    • addNoticesItem

      public ResultMap addNoticesItem(Notice noticesItem)
    • getNotices

      @Nullable public List<Notice> getNotices()
      Diagnostics the engine raised over this run, each with `provenance: execute`. **Absent means nothing was raised.** This is the one surface where silence is a real answer: the run happened, over your data, start to finish, and the engine found nothing worth saying. That is not true of the compile path, where an empty list only means a short synthetic series reached nothing — see `GET /strategy/{strategyId}`. Notices are raised on failed and aborted runs too, and those are the ones most worth reading: a run that produced no trades often did so for a reason stated here.
      Returns:
      notices
    • setNotices

      public void setNotices(@Nullable List<Notice> notices)
    • noticesTruncated

      public ResultMap noticesTruncated(@Nullable Integer noticesTruncated)
    • getNoticesTruncated

      @Nullable public Integer getNoticesTruncated()
      How many notices were dropped past the cap of 50. Absent when none were. A large value usually means one fault repeating per instrument or per parameter vector rather than 50 distinct problems.
      Returns:
      noticesTruncated
    • setNoticesTruncated

      public void setNoticesTruncated(@Nullable Integer noticesTruncated)
    • pnlTotal

      public ResultMap pnlTotal(@Nullable Double pnlTotal)
    • getPnlTotal

      @Nullable public Double getPnlTotal()
      Total profit and loss in the output currency
      Returns:
      pnlTotal
    • setPnlTotal

      public void setPnlTotal(@Nullable Double pnlTotal)
    • pnlTotalPercent

      public ResultMap pnlTotalPercent(@Nullable Double pnlTotalPercent)
    • getPnlTotalPercent

      @Nullable public Double getPnlTotalPercent()
      Total PnL as a percentage of the initial capital (`backtestFunding`). Zero when `backtestFunding` is 0.
      Returns:
      pnlTotalPercent
    • setPnlTotalPercent

      public void setPnlTotalPercent(@Nullable Double pnlTotalPercent)
    • totalTrades

      public ResultMap totalTrades(@Nullable Long totalTrades)
    • getTotalTrades

      @Nullable public Long getTotalTrades()
      Total number of trades executed by the strategy
      Returns:
      totalTrades
    • setTotalTrades

      public void setTotalTrades(@Nullable Long totalTrades)
    • winRate

      public ResultMap winRate(@Nullable Double winRate)
    • getWinRate

      @Nullable public Double getWinRate()
      Percentage of profitable trades (0-100)
      Returns:
      winRate
    • setWinRate

      public void setWinRate(@Nullable Double winRate)
    • sharpeRatio

      public ResultMap sharpeRatio(@Nullable Double sharpeRatio)
    • getSharpeRatio

      @Nullable public Double getSharpeRatio()
      Risk-adjusted return ratio (mean return / standard deviation of returns)
      Returns:
      sharpeRatio
    • setSharpeRatio

      public void setSharpeRatio(@Nullable Double sharpeRatio)
    • sortinoRatio

      public ResultMap sortinoRatio(@Nullable Double sortinoRatio)
    • getSortinoRatio

      @Nullable public Double getSortinoRatio()
      Downside risk-adjusted return ratio (mean return / downside deviation)
      Returns:
      sortinoRatio
    • setSortinoRatio

      public void setSortinoRatio(@Nullable Double sortinoRatio)
    • cagr

      public ResultMap cagr(@Nullable Double cagr)
    • getCagr

      @Nullable public Double getCagr()
      Compound Annual Growth Rate
      Returns:
      cagr
    • setCagr

      public void setCagr(@Nullable Double cagr)
    • maxDrawdown

      public ResultMap maxDrawdown(@Nullable Double maxDrawdown)
    • getMaxDrawdown

      @Nullable public Double getMaxDrawdown()
      Maximum absolute drawdown in the output currency
      Returns:
      maxDrawdown
    • setMaxDrawdown

      public void setMaxDrawdown(@Nullable Double maxDrawdown)
    • maxDrawdownPercent

      public ResultMap maxDrawdownPercent(@Nullable Double maxDrawdownPercent)
    • getMaxDrawdownPercent

      @Nullable public Double getMaxDrawdownPercent()
      Maximum percentage drawdown from peak equity
      Returns:
      maxDrawdownPercent
    • setMaxDrawdownPercent

      public void setMaxDrawdownPercent(@Nullable Double maxDrawdownPercent)
    • equityCurve

      public ResultMap equityCurve(@Nullable List<EquityPoint> equityCurve)
    • addEquityCurveItem

      public ResultMap addEquityCurveItem(EquityPoint equityCurveItem)
    • getEquityCurve

      @Nullable public List<EquityPoint> getEquityCurve()
      Equity curve over the backtest. Element 0 is an anchor at the backtest `from` with `initialCapital`; the remaining points are one sample per emitted yield, in order. Use it to plot the strategy's running equity without re-deriving it from the yield history.
      Returns:
      equityCurve
    • setEquityCurve

      public void setEquityCurve(@Nullable List<EquityPoint> equityCurve)
    • signalCount

      public ResultMap signalCount(@Nullable Integer signalCount)
    • getSignalCount

      @Nullable public Integer getSignalCount()
      Number of signals emitted during strategy execution
      Returns:
      signalCount
    • setSignalCount

      public void setSignalCount(@Nullable Integer signalCount)
    • signalsId

      public ResultMap signalsId(@Nullable String signalsId)
    • getSignalsId

      @Nullable public String getSignalsId()
      Storage key for the signals file. Treat as opaque; use signalsUrl to download.
      Returns:
      signalsId
    • setSignalsId

      public void setSignalsId(@Nullable String signalsId)
    • signalsUrl

      public ResultMap signalsUrl(@Nullable URI signalsUrl)
    • getSignalsUrl

      @Nullable public URI getSignalsUrl()
      HTTPS URL to download the signals Parquet file. Use signalsUpload to know when it's ready.
      Returns:
      signalsUrl
    • setSignalsUrl

      public void setSignalsUrl(@Nullable URI signalsUrl)
    • signalsUpload

      public ResultMap signalsUpload(@Nullable ResultMap.SignalsUploadEnum signalsUpload)
    • getSignalsUpload

      @Nullable public ResultMap.SignalsUploadEnum getSignalsUpload()
      Upload status. Done = signal file is available at signalsUrl. Failed = upload error (see signalsUploadReason). Skipped = no signals emitted.
      Returns:
      signalsUpload
    • setSignalsUpload

      public void setSignalsUpload(@Nullable ResultMap.SignalsUploadEnum signalsUpload)
    • signalsUploadedAt

      public ResultMap signalsUploadedAt(@Nullable OffsetDateTime signalsUploadedAt)
    • getSignalsUploadedAt

      @Nullable public OffsetDateTime getSignalsUploadedAt()
      ISO 8601 timestamp of when the upload completed. Only present when signalsUpload is Done.
      Returns:
      signalsUploadedAt
    • setSignalsUploadedAt

      public void setSignalsUploadedAt(@Nullable OffsetDateTime signalsUploadedAt)
    • signalsUploadReason

      public ResultMap signalsUploadReason(@Nullable String signalsUploadReason)
    • getSignalsUploadReason

      @Nullable public String getSignalsUploadReason()
      Human-readable reason when signalsUpload is Failed or Skipped.
      Returns:
      signalsUploadReason
    • setSignalsUploadReason

      public void setSignalsUploadReason(@Nullable String signalsUploadReason)
    • equals

      public boolean equals(Object o)
      Return true if this ResultMap object is equal to o.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toUrlQueryString

      public String toUrlQueryString()
      Convert the instance into URL query string.
      Returns:
      URL query string
    • toUrlQueryString

      public String toUrlQueryString(String prefix)
      Convert the instance into URL query string.
      Parameters:
      prefix - prefix of the query string
      Returns:
      URL query string