Building a Next-Day Price-Limit Status Label for Chinese Stocks
Summary
This tutorial describes how to create a forward-looking label for whether a Chinese stock will close limit-down, outside a price limit, or limit-up on the next trading day. It uses a precomputed stock factor table and a price-limit status field whose values distinguish those three outcomes. A lead operation shifts the status forward by one row, aligning tomorrow’s observed status with today’s data; filtering for the limit-up code creates a binary-style target for that event.
The article outlines selecting a date range and historical lookback in a data extraction workflow, then viewing the resulting table. It explains the data transformation, but provides no predictive features, trained model, backtest, or evidence of forecasting performance. Because the target is shifted into the feature dataset, users must ensure that it is used only as an outcome label and not as an input available to a model at prediction time, or future information would leak into the analysis.
Key ideas
- The price-limit status field encodes limit-down, no-limit, and limit-up outcomes.
- A one-row lead aligns the next trading day’s status with the current row.
- Filtering on the limit-up value creates a target for next-day limit-up events.
- The tutorial covers data construction and viewing rather than a prediction model or performance test.
- The shifted future status must remain a label to avoid look-ahead leakage.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.