Package com.qtsurfer.api.sdk
Class SweepRequest.Builder
java.lang.Object
com.qtsurfer.api.sdk.SweepRequest.Builder
- Enclosing class:
- SweepRequest
Fluent builder for
SweepRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the request.datasetVersionId(String datasetVersionId) equityCurve(com.qtsurfer.api.client.model.EquityCurveRequest equityCurve) exchangeId(String exchangeId) instrument(String instrument) objective(SweepObjective objective) Add one axis to the grid.Replace the whole grid.sampler(SweepSampler sampler) samples(int samples) seed(long seed) storeSignals(boolean storeSignals) Request storage of emitted signals for every sweep trial.walkForward(int folds) walkForward(WalkForwardSpec walkForward)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
strategy
- Parameters:
strategy- strategy source code (Java)- Returns:
- this builder
-
exchangeId
- Parameters:
exchangeId- exchange identifier, e.g."binance"- Returns:
- this builder
-
instrument
- Parameters:
instrument- instrument symbol, e.g."BTC/USDT"; mutually exclusive withdatasetId- Returns:
- this builder
-
datasetId
- Parameters:
datasetId- id of a dataset to backtest against instead of an exchange instrument; mutually exclusive withinstrument- Returns:
- this builder
-
datasetVersionId
- Parameters:
datasetVersionId- pins a specific past version ofdatasetId; only valid alongside a non-nulldatasetId- Returns:
- this builder
-
from
- Parameters:
from- range start- Returns:
- this builder
-
to
- Parameters:
to- range end- Returns:
- this builder
-
param
Add one axis to the grid. Calling this twice with the same name replaces the earlier axis.The
namemust be the strategy property's@StrategyProperty(name = "...")annotation value (e.g."rsi.period"), NOT the Java field name (e.g.rsiPeriod). Using the field name is silently ignored by the platform and every trial runs with the default.- Parameters:
name- the strategy property to vary (the@StrategyPropertyname)axis- the values to try for it- Returns:
- this builder
-
params
Replace the whole grid.- Parameters:
params- one axis per strategy property to vary- Returns:
- this builder
-
sampler
- Parameters:
sampler- how the grid becomes the vectors actually run- Returns:
- this builder
-
samples
- Parameters:
samples- vectors to draw for a random or Latin-hypercube sampler- Returns:
- this builder
-
seed
- Parameters:
seed- reproducibility seed; omit to let the platform pick and report one- Returns:
- this builder
-
objective
- Parameters:
objective- the metric to optimize and rank by- Returns:
- this builder
-
walkForward
- Parameters:
walkForward- opt into walk-forward validation- Returns:
- this builder
-
walkForward
- Parameters:
folds- walk forward over this many folds, at platform-default in-sample share- Returns:
- this builder
-
equityCurve
public SweepRequest.Builder equityCurve(com.qtsurfer.api.client.model.EquityCurveRequest equityCurve) - Parameters:
equityCurve- retention and default transform for sweep trial curves- Returns:
- this builder
-
storeSignals
Request storage of emitted signals for every sweep trial. -
build
Build the request.- Returns:
- the immutable request
-