Skip to content
All library documents

Diagnosing LightGBM Training Errors Caused by an Empty Stock Signal

Article BigQuant

Summary

This platform support discussion explains a LightGBM training failure in a stock-selection workflow. The intended factor marks a day when the previous six closes were all below the five-day moving average and the current close moves above it. Inspection of intermediate results reportedly showed that the factor column contained only zeros, so there were no qualifying stock-day observations in either the training or test inputs. With no samples or classes to learn from, the model raised a class-count validation error.

The response says the factor expression itself may be valid, while the combined condition is too restrictive for the available data. It recommends relaxing the screening rule so qualifying observations can occur. The discussion gives no dataset details, revised thresholds, code diagnosis, or model results, so it does not establish that the proposed signal is predictive. The practical lesson is to inspect factor distributions and confirm that nonempty training and test sets reach the learner before investigating the model configuration.

Key ideas

  • The discussed factor requires six prior closes below a five-day average followed by a close above it.
  • The reported factor values were all zero, leaving no observations for model training or testing.
  • The discussion attributes the LightGBM failure to empty input rather than necessarily to a malformed expression.
  • Relaxing a restrictive signal and checking intermediate data counts are suggested diagnostic steps.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.