LightGBM model
1. Node overview
LightGBM (Light Gradient Boosting Machine) is a high-performance gradient-boosting framework developed by Microsoft. It uses histogram-based algorithms and leaf-wise tree growth to accelerate training while maintaining high accuracy. The LightGBM model node trains on factor data from the data-processing node and outputs predictions for the strategy node.
Fast training and inference
Low memory consumption
Interpretable feature importance
Supports categorical features and is robust to missing values
Multi-factor cryptocurrency or equity selection
Rapid strategy validation
Factor screening and importance analysis
Cross-sectional ranking predictions
Limited time-series modelling capability
Requires manual feature engineering
Does not capture long-term temporal patterns well
2. Interactive configuration
The panel below is the actual LightGBM model node configuration. Use it to explore every setting: prediction column name, task type, and parameter configuration mode (adaptive or advanced).
Only A-Z, a-z, 0-9, - and _ are supported; other characters are replaced with _.
Name of the model prediction output column.
2.1 Prediction column name
Set the name of the column that stores model predictionspred.pred_lgb and pred_lstm, so the strategy can distinguish them.2.2 Task type
Select the model's training objective and loss functionRanking, Binary, and Regression. LightGBM, LSTM, and Transformer default to Binary; switch explicitly to Ranking only for cross-sectional selection across multiple instruments.| Dimension | Ranking | Binary ⭐ | Regression |
|---|---|---|---|
| Primary objective | Learn relative order | Classify upward or downward direction | Predict an exact return |
| Noise robustness | ⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐ |
| Generalization | ⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐ |
| Sensitivity to outliers | Medium | Low (inherently resistant) | High |
| Fit for cryptocurrency | Multi-asset selection | Best for single-asset timing | Position-management support |
| Typical strategy | Long/short hedge or ranked selection | Trend timing or enhanced grid | Dynamic positions or risk control |
2.2.1 Ranking
Learn relative order among samples; suitable for multi-factor asset selectionRanking does not optimize the absolute prediction value. It learns relative order among samples, placing higher-return samples ahead of lower-return samples. In multi-asset cryptocurrency strategies, it can select the instruments with the greatest upside potential from dozens of pairs and is the primary driver of cross-sectional selection strategies.
| Property | Description |
|---|---|
| Label requirement | A continuous value such as return: shift(close, -5) / shift(open, -1) - 1 |
| Output range | Any real number; a larger score ranks higher |
| Use cases | Multi-factor selection, cross-sectional ranking, and long/short hedging |
| Frontend field | taskType: "ranking" |
Selecting Ranking reveals the ranking-mode option, which determines where optimization is concentrated:
2.2.2 Binary ⭐ Recommended
Predict upward or downward direction; the first choice for cryptocurrency timingBinary classification turns forecasting into an up-or-down decision. The model outputs signed confidence with a theoretical range of -1 to 1: positive is bullish, negative is bearish, and a greater absolute value means higher confidence. Because cryptocurrency has high volatility and a low signal-to-noise ratio, actual predictions usually cluster around -0.1 to 0.1; theoretical values near ±1 are almost never seen. Begin machine-learning models with entry thresholds around 0.03 / -0.03, inspect the prediction distribution after the first backtest, and recalibrate. Do not start from theoretical thresholds such as 0.2 or 0.5, which may trigger extremely rarely or never. Direction still has a much better signal-to-noise ratio than magnitude, making Binary the most practical task.
| Property | Description |
|---|---|
| Label requirement | A Boolean value or continuous return; continuous values are converted to 0/1 using > 0 |
| Output range | Theoretical -1 to 1 confidence; generally -0.1 to 0.1 in practice because financial signal-to-noise is low |
| Use cases | Direction forecasting, timing signals, and trend classification |
| Frontend field | taskType: "binary" (system default) |
label = shift(close, -5) / shift(open, -1) - 1 means buying at the next candlestick's open and selling five periods later. The engine converts returns > 0 to positive class 1 and returns ≤ 0 to negative class 0.Binary output is signed confidence in the range -1 to 1: confidence = 2 × probability - 1.
| Probability | 30% | 40% | 50% | 55% | 60% |
|---|---|---|---|---|---|
| Confidence | -0.4 | -0.2 | 0 | 0.1 | 0.2 |
Strategy example: pred > 0.2 opens a long position (60% bullish probability), while pred < -0.2 closes it (only 40% bullish probability).
2.2.3 Regression
Predict an exact return and optimize absolute accuracyRegression requires the model to predict an exact return value. Unlike Ranking, it minimizes the absolute error between prediction and target. Frequent extreme cryptocurrency moves, such as flash crashes and sudden rallies, can dominate regression training, so generalization is often weaker than Binary. The output nevertheless has a clear physical meaning and is useful as an auxiliary signal for position sizing and risk control.
| Property | Description |
|---|---|
| Label requirement | A continuous return such as shift(close, -5) / shift(open, -1) - 1 |
| Output range | Any real number representing predicted return |
| Use cases | Position sizing, risk assessment, and expected-return calibration |
| Frontend field | taskType: "regression" |
2.3 Parameter configuration mode
Choose system-adaptive or manually configured parametersAdaptive mode, which tunes parameters from the data size, and Advanced parameter configuration, which exposes every model parameter. Adaptive mode is the default and is suitable for new users and rapid strategy validation.2.3.1 Adaptive mode
The system chooses parameters automatically from the data sizeThe system calculates model parameters from the number of training samples and features. This is suitable for new users and rapid strategy validation and does not require detailed knowledge of LightGBM model parameters.
No tuning experience required
Start training quickly
Lower overfitting risk
No fine-grained model control
Parameters may not be optimal
2.3.2 Advanced parameter configuration
Configure every parameter manually for fine-grained tuningAdvanced mode displays the full panel in three parts: model architecture, training parameters, and regularization. It is intended for experienced users performing detailed tuning.
These parameters control decision-tree complexity. Deeper trees and more leaves create a more complex model, but also increase the risk of overfitting. Leave a field blank to let the system calculate it adaptively.
| Parameter | Allowed range | Adaptive range | Description |
|---|---|---|---|
| Maximum depth | 1–15 | 4–8 | Maximum depth of each tree |
| Number of leaves | 8–256 | 18–30 | Maximum number of leaves in each tree |
| Minimum samples per child | 5–2000 | 38–90 | Minimum number of samples required in a leaf |
These parameters control model training. A smaller learning rate requires more boosting rounds, but usually produces better results.
| Parameter | Default | Allowed range | Description |
|---|---|---|---|
| Boosting rounds | Adaptive | 1–1000 | Number of boosting iterations |
| Learning rate | Adaptive | 0.001–0.5 | Weight assigned to each tree |
| Validation split | 0.2 | 0–0.5 | Used for early stopping; 0 disables validation |
| Early-stopping patience | 10 | 1–100 | Stop after N rounds without improvement |
Regularization prevents overfitting. Higher dropout applies stronger regularization and produces a simpler model. Leave a field blank to let the system calculate it adaptively.
| Parameter | Allowed range | Adaptive range | Description |
|---|---|---|---|
| Sample dropout | 0–0.5 | 0.10–0.25 | Proportion of data sampled out at random |
| Feature dropout | 0–0.5 | 0.10–0.25 | Proportion of features sampled out at random |
3. Output data structure
The LightGBM model node adds a prediction column to its input data and returns the following structure:
| Column | Type | Source | Description |
|---|---|---|---|
| datetime | datetime | Passed through | Timestamp |
| symbol | string | Passed through | Trading pair |
| open/high/low/close/volume | float | Passed through | Raw OHLCV data |
| [factor columns…] | float | Passed through | Factors calculated by the data-processing node |
| pred | float | Added | Model prediction; the name is controlled by predictionColumn |