Gradient Boosting
By LuxAlgoJun 16, 2026
Gradient Boosting fits a stagewise ensemble of shallow trees and plots its prediction as an oscillator — the first faithful implementation of gradient boosting in the library. Five stationary features are labeled by the percent change of close over the next 10 bars; the model refits every 100 bars on the latest 300 samples, early-stopped on a later-in-time validation slice, and the Prediction line runs against a Center line with dashed thresholds.
How to Trade the Gradient Boosting?
- Prediction crosses the Center: the ensemble's lean over the horizon flips, with alerts both ways.
- Threshold crosses: P(up) beyond the Probability Threshold % — or below 100 minus it — fires the high-confidence alerts, the classic signal-filtering gate.
- Model card: trees kept versus grown, validation loss, base rate and two importance reads — trust permutation, computed on held-out data, over gain.
A Model Retrained alert fires on every refit.
Gradient Boosting Settings
- Loss / Target (default Log Loss (Classification)): classifier plotting P(up), or squared-error regressor plotting expected forward return.
- Prediction Horizon (bars) (default 10), Training Window (samples) (default 300), Validation Fraction (default 0.25) and Retrain Every (bars) (default 100): labeling and walk-forward cadence.
- Max Boosting Rounds (M) (default 40), Learning Rate (eta) (default 0.05), Max Tree Depth (default 2) and Early Stopping Patience (default 10): the ensemble's size and pace; leaf, L2, subsample, split-candidate and seed inputs regularize and reproduce the fit.
- RSI Length (default 14), Trend Z-Score Length (default 20), Momentum ROC Length (default 10), ATR Length (default 14), Range Position Length (default 20) and Normalization Window (default 100): the feature lookbacks.
- Probability Threshold % (default 60): the alert gate; display toggles round out the inputs.
Frequently Asked Questions
How does this differ from the Random Forest build?
A Random Forest averages independent trees to cancel variance; boosting grows them one at a time, each targeting what the ensemble still gets wrong. Sharper but noise-hungry — hence the built-in shrinkage, subsampling and early stopping.
Does the model peek at future bars?
No. Samples are added on closed bars only, labels wait for their full horizon, and validation is always later in time than training.
Which settings should I touch first?
The horizon and window define the question; settle those before tuning the engine. Deeper trees and more rounds chase label noise — the shallow, low-eta defaults follow the practitioner norm.
The Library is free. Quant makes it yours.
Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.
