Skip to content
All library documents

LightGBM Stock Ranking Strategy with Periodic Retraining

Article BigQuant

Summary

This Chinese A-share example builds a daily stock-ranking strategy using LightGBM regression. Its features combine market capitalization, recent price and turnover averages, dividend yield and price-to-earnings ranks, plus two custom factors. The target is a forward return measure. At scheduled intervals, the script trains a model on historical data, writes its predictions into a factor table, scores the current universe, and buys the highest-ranked ten stocks with equal target weights. It also tracks portfolio value and retrains early after a specified decline.

The document provides implementation details and a backtest setup over a stated date range, but reports no performance statistics or comparison benchmark. The pasted code is duplicated and visibly truncated, and its model and state files rely on local paths. Since training predictions are written back as features and the custom factors appear derived from the training fit, validation and leakage controls merit careful review before interpreting results. The example is not evidence that the strategy is profitable or ready for live trading.

Key ideas

  • The model ranks Chinese stocks using market, price, turnover, and financial features.
  • LightGBM is trained periodically on a rolling historical sample to predict a forward return label.
  • The strategy selects the highest-scoring ten stocks and assigns them equal target weights.
  • Portfolio-value tracking can trigger retraining after a decline.
  • The document gives no reported returns, and its code excerpt is incomplete and duplicated.

Tags

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