Equeum
Search
K
Comment on page

Signal And Scoring

Ensemble

Definition: Creates a predictive time series for a target asset based on selection of the top scoring inputs.
Syntax: ensemble(asset, method, daysLookBack, useTopScoreCount)
Arguments:
  • asset: the symbol to forecast
  • method: scoring method to use
  • daysLookBack: the number of previous days to be used in scoring the input rows (default 30)
  • useTopScoreCount: the number or percentage of top-ranked rows to retain in the ensemble of rows (default 20 percent)
Return: Single trendline time series derived from inputs
Description: Input to the action is a list of candidate time series. Its size must be at least as great as useTopScoreCount, if useTopScoreCount is a number rather than a percentage.
Example:
tl = inputs -> ensemble(asset=SPY, "pl", daysLookBack=3, useTopScoreCount=5)

Score Signal

Definition: This function implements the scoring methods used in Create Trendline, though it does not function in exactly the way that function uses them.
Syntax:
score_signal(target, method, closeonneutral, zerosize)
Arguments:
  • target: time series for the symbol to forecast
  • method: scoring method to use
  • closeonneutral: whether to close positions when the signal enters the neutral zone
  • zerosize: defines the bounds of the neutral zone (default 0.0)
Return: Time series of accumulated scores
Description: Input to the action is a trendline indicating long or short positions for trading.
Example:
spy_asset = SPY.close
scores = tl -> score_signal(spy_asset, "pl")