Long-term futures transaction risk assessment system based on hybrid model

The long-term futures trading risk assessment system based on a hybrid model solves the problems of insufficient robustness and logical conflicts in long-term multi-task prediction using deep learning time series prediction methods, generating stable and consistent long-term prediction sequences that meet business rule constraints.

CN122089323APending Publication Date: 2026-05-26BEIJING LANGE CLOUD BUSINESS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING LANGE CLOUD BUSINESS TECH CO LTD
Filing Date
2026-02-12
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing deep learning time series prediction methods suffer from insufficient model robustness, lack of inherent constraints in multi-task prediction outputs, error accumulation and consistency drift in long-term predictions, especially when dealing with periodic sequence interruptions and logical conflicts in multi-task prediction outputs.

Method used

A long-term futures trading risk assessment system based on a hybrid model is adopted. By establishing a holiday database, data preprocessing, feature engineering, and triple LSTM network prediction, combined with a consistency correction algorithm, a long-term multi-objective prediction sequence that meets business rule constraints is generated.

Benefits of technology

It effectively handles periodic sequence interruptions, ensures that multi-task prediction outputs conform to logical relationships, and generates stable and consistent long-term prediction sequences. This solves the problems of model learning distortion and multi-task output conflicts in traditional methods, and improves the stability and consistency of predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122089323A_ABST
    Figure CN122089323A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a long-term future transaction risk assessment system based on a hybrid model, and the system guarantees that a prediction process is only executed before an effective transaction day through a dynamically updated transaction day detection and screening mechanism. Performing preprocessing and feature engineering on the original data, constructing multi-scale features and performing intelligent screening; then, a point location of a future price and upper and lower limits of a fluctuation interval are respectively predicted by adopting a triple LSTM network, and a prediction result is subjected to rationality constraint; and finally, performing weighted fusion on the LSTM output and the sequence of the short-term prediction model through a consistency correction algorithm to generate a final prediction result, and generating risk assessment data according to the prediction result. According to the method, time sequence modeling, feature engineering and result correction strategies are fused, and the technical problems of model learning distortion and multi-task output logic conflicts caused by neglecting the market calendar effect and depending on a single model in a traditional method are effectively solved, so that a prediction sequence which is high in stability and high in consistency and meets a predefined constraint relation is generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, specifically to a long-term futures trading risk assessment system based on a hybrid model. Background Technology

[0002] In the field of time-series data processing and computation, it is often necessary to generate and populate sequence values ​​on the corresponding date indexes for a future time period based on a discontinuous date indexing system (such as a "transaction calendar" that excludes weekends and fixed holidays). This requirement is widespread in systems that rely on specific calendars for operation. For example, generating load forecast sequences for future working days for resource scheduling systems, generating capacity sequences for future effective production days for production planning systems, or generating indicator sequences for future maintenance windows for system performance monitoring.

[0003] Existing deep learning temporal prediction methods, especially Long Short-Term Memory (LSTM) networks, can effectively capture sequence dependencies, but they still face several key technical bottlenecks when applied to long-term, multi-task predictions (such as simultaneously predicting point values ​​and intervals):

[0004] First, the model is not robust enough to sequence interruptions (non-sampling points). Traditional methods usually input continuous date sequences directly into the model, ignoring the inherent and regular interruptions in the actual business cycle (such as non-trading days and non-working days). This causes the model to learn invalid time step patterns and produce unstable prediction jumps at the interruption boundaries, affecting the continuity and reliability of the output sequence.

[0005] Secondly, there is a lack of inherent constraints and synergy among the multi-task prediction outputs. When using independent models or multiple output heads to predict related target sequences (such as point estimates and the upper and lower limits of their possible fluctuation ranges) respectively, the prediction results may violate basic logical constraints (such as the lower limit being higher than the upper limit). This output conflict reduces the usability of the prediction results and requires additional and complex ex-post correction logic.

[0006] Furthermore, long-term forecasts suffer from error accumulation and consistency drift issues. As the forecast step size increases, the errors accumulated from model autoregression generation or single-step forecasts gradually amplify, causing unreasonable drift in the long-term trend or level of the forecast sequence. This lack of consistency with a reliable short-term benchmark weakens the credibility of the entire long-term forecast trajectory.

[0007] Therefore, there is an urgent need for an innovative time series forecasting method that can systematically handle periodic sequence interruptions, ensure that multi-task forecasting outputs conform to predefined logical relationships, and anchor long-term forecasts to reliable short-term benchmarks through an effective mechanism, thereby generating stable, consistent, and business rule-compliant long-term multi-objective forecasting sequences under complex periodic constraints. Summary of the Invention

[0008] To address these issues, this invention provides a long-term futures trading risk assessment system based on a hybrid model, thereby resolving the technical problems in existing long-term futures price forecasting, such as neglecting market calendar effects, relying on a single model leading to model learning distortion, and multiple task output logic conflicts.

[0009] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0010] This invention provides a long-term futures trading risk assessment system based on a hybrid model, the system comprising:

[0011] Establish and maintain a holiday database, and identify trading days and non-trading days through a date type determination algorithm; execute the subsequent prediction process only when the current day is detected as a trading day and the next day is a non-trading day;

[0012] The original data is cleaned, normalized, and diurnalized. Missing values ​​are linearly interpolated and backfilled, and outliers are handled using a quantile-based Windsor method.

[0013] A feature set is constructed, including cross-product correlation features, multi-scale time lag features, market microstructure features, and futures-spot structure features, and a recursive feature elimination algorithm is used for feature selection;

[0014] Using normalized feature data, a triple prediction model consisting of three independent long short-term memory networks is trained to output the point prediction value, the lower limit of the prediction interval, and the upper limit of the prediction interval for a specified number of days in the future, respectively.

[0015] Numerical rationality constraints are imposed on the original output of the triple prediction model to ensure that the predicted point values ​​are within the interval; and a consistency correction algorithm based on first-order difference is used to weight and fuse the constrained predicted point sequence with the benchmark sequence provided by the short-term prediction model to generate the final prediction result.

[0016] The model performance is evaluated using mean squared error and mean relative error indices, and the final point prediction results and prediction interval statistics are output, along with risk assessment data.

[0017] Furthermore, establish and maintain a holiday database, including:

[0018] A dynamic update mechanism that automatically detects versions through command parsing, intelligently triggers updates, and verifies the integrity of year coverage after the update.

[0019] Furthermore, the upper and lower boundaries for handling outliers by the Windsorization method are determined by the following formula:

[0020]

[0021]

[0022] Q1 is the 5th percentile, and Q3 is the 95th percentile.

[0023] Furthermore, the multi-scale time-delay features are constructed using lag operators, and the time-delay feature set is defined as follows: , where K is a set of lag orders, including multiple scales such as short-term K={1,2,3,4,5}, medium-term K={10,15} and long-term K={21}.

[0024] Furthermore, the recursive feature elimination algorithm uses a logistic regression model as the base estimator and filters the feature subset that has the greatest influence on the prediction target by recursively removing the features with the smallest weights.

[0025] Furthermore, the cell state and hidden state of each LSTM unit in the triple prediction model are updated through a mechanism of forget gate, input gate, and output gate.

[0026] Furthermore, the consistency correction algorithm specifically includes:

[0027] Calculate the first-order difference sequence of the point prediction sequence after the constraints are applied;

[0028] Starting with the predicted values ​​for day 1 and days 1 to 5 provided by the short-term forecast model, the difference sequences are accumulated to construct a 1-day consensus sequence and a 5-day consensus sequence.

[0029] The final prediction result is obtained by weighting the mean of the constrained point prediction sequence with the mean of the 1-day and 5-day consistency sequences.

[0030] Furthermore, the short-term prediction model is a hybrid model combining the ARIMA model and the Prophet model.

[0031] Furthermore, the output prediction interval statistics should include at least the interval width, the interval center position, and the relative fluctuation range.

[0032] The embodiments of the present invention have the following advantages:

[0033] This invention employs a dynamically updated trading day detection and filtering mechanism to ensure that the prediction process is executed only before valid trading days. Next, the raw data undergoes preprocessing and feature engineering to construct multi-scale features and perform intelligent filtering. Then, a triple LSTM network is used to predict future price levels and the upper and lower limits of the fluctuation range, with reasonableness constraints applied to the prediction results. Finally, a consistency correction algorithm is used to weightedly fuse the LSTM output with the sequence of the short-term prediction model to generate the final prediction result and risk assessment data. This invention integrates time series modeling, feature engineering, and result correction strategies, effectively solving the technical problems of traditional methods that neglect market calendar effects, rely on a single model leading to model learning distortion, and have conflicting logic in multi-task outputs. This results in a highly stable, highly consistent prediction sequence that satisfies predefined constraints. Attached Figure Description

[0034] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0035] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.

[0036] Figure 1 A schematic diagram of the logical structure of a long-term futures trading risk assessment system based on a hybrid model, provided for an embodiment of the present invention;

[0037] Figure 2 A flowchart illustrating a long-term futures trading risk assessment system based on a hybrid model, provided as an embodiment of the present invention;

[0038] Figure 3 This is a schematic diagram of the first process of a long-term futures trading risk assessment system based on a hybrid model, provided as an embodiment of the present invention. Detailed Implementation

[0039] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0040] To address the technical problems in existing long-term futures price forecasting, such as neglecting market calendar effects, relying on a single model leading to model learning distortion, and multiple task output logic conflicts.

[0041] refer to Figure 1 This invention discloses a long-term futures trading risk assessment system based on a hybrid model. The system includes: a trading day detection and screening module 1; a data preprocessing module 2; a feature engineering module 3; a model training and prediction module 4; a prediction result post-processing and correction module 5; and a model evaluation and output module 6.

[0042] refer to Figures 2 to 3 Establish and maintain a holiday database, and identify trading days and non-trading days through a date type determination algorithm; execute the subsequent prediction process only when the current day is detected as a trading day and the next day is a non-trading day;

[0043] The original data is cleaned, normalized, and diurnalized. Missing values ​​are linearly interpolated and backfilled, and outliers are handled using a quantile-based Windsor method.

[0044] A feature set is constructed, including cross-product correlation features, multi-scale time lag features, market microstructure features, and futures-spot structure features, and a recursive feature elimination algorithm is used for feature selection;

[0045] Using normalized feature data, a triple prediction model consisting of three independent long short-term memory networks is trained to output the point prediction value, the lower limit of the prediction interval, and the upper limit of the prediction interval for a specified number of days in the future, respectively.

[0046] Numerical rationality constraints are imposed on the original output of the triple prediction model to ensure that the predicted point values ​​are within the interval; and a consistency correction algorithm based on first-order difference is used to weight and fuse the constrained predicted point sequence with the benchmark sequence provided by the short-term prediction model to generate the final prediction result.

[0047] The model performance is evaluated using mean squared error and mean relative error indices, and the final point prediction results and prediction interval statistics are output.

[0048] 1. Trading day detection and screening mechanism

[0049] This invention establishes a comprehensive trading day detection and screening mechanism to ensure that the prediction process is executed only on valid trading days. The specific process is as follows:

[0050] Holiday database dynamic update mechanism:

[0051] Establish an automated holiday data maintenance system:

[0052] Version detection: Real-time detection of the latest version of the Chinese holiday database through command parsing.

[0053] Smart Update: Automatically installs upgrades when a new version is detected, ensuring the accuracy and timeliness of data during holidays.

[0054] Year Coverage Validation: After the update, verify the integrity of the holiday data for the current year to ensure that all transaction dates are covered.

[0055] Date type determination algorithm:

[0056] A three-level decision logic is used to accurately identify date types, classifying dates into three categories: weekends, holidays, and trading days.

[0057] Process control and execution management:

[0058] Implement differentiated process control based on date type determination results:

[0059] Non-trading day handling: When it is detected that today is not a trading day or today is a trading day but the next day is also a trading day, the system will immediately terminate the subsequent prediction process and return an error code.

[0060] Execution on trading days: When it is detected that today is a trading day and the next day is a non-trading day, the system continues to execute core processes such as data processing, feature engineering, and model prediction, and returns a success code to ensure that the program can complete and output the prediction results on Friday or the day before a holiday.

[0061] Quarterly update strategy: Automatically trigger holiday database update checks between October and December each year to ensure the accuracy of the next year's transaction calendar.

[0062] 2. Data Preprocessing

[0063] Data normalization and daily processing: First, the raw data is cleaned and normalized. For weekly fundamental data (such as production, inventory, etc.), daily processing is performed using the forward imputation method to generate continuous daily time series, ensuring that all data remain consistent in time frequency.

[0064] Data integrity and continuity processing:

[0065] To ensure the continuity of the time series, a double imputation strategy is used for missing values ​​in the feature summary table:

[0066] Linear interpolation: Fills in missing values ​​in a time series using linear interpolation to ensure a smooth transition of data;

[0067] Backfill: For missing values ​​that still exist after linear interpolation, the backfill method is used to fill them with subsequent valid data to ensure the integrity of the dataset.

[0068] Outlier handling:

[0069] The Windsorization method is used to handle outliers in the data, based on and Set upper and lower boundaries to ensure the quality of training data. Among them: ( It is the 5th percentile. (95th percentile)

[0070]

[0071]

[0072] 3. Feature Engineering

[0073] Feature derivation and construction:

[0074] Cross-commodity correlation characteristics: Calculate the price difference and ratio between different futures commodities to capture the relative strength of commodities and the transmission effect of the industrial chain.

[0075] Time delay characteristics:

[0076] By calculating the lagged values ​​of various prices, trading volumes, and open interest over multiple historical time windows, a multi-scale time-lag architecture is employed to capture:

[0077] Short-term memory (K={1,2,3,4,5}): Capturing recent market shocks and intraday effects;

[0078] Medium-term memory (K={10,15}): reflects cyclical fluctuations and trend continuation;

[0079] Long-term memory (K={21}): corresponds to monthly market structure and fundamental changes.

[0080] Definition of lag operator:

[0081] Let L be a lag operator that satisfies:

[0082]

[0083] Time delay feature set:

[0084] For each basic feature x_t, construct a time-delay feature set:

[0085]

[0086] Where K represents the set of subsequent orders, k represents the lag order, L is the lag operator, x_t is the observation of the time series at time t, and x_{tk} is the observation of the time series at time tk.

[0087] Market microstructure and capital sentiment characteristics:

[0088] Characteristics of volume-price relationship:

[0089] Volume-price correlation: measures the synergistic effect between increased trading volume and the direction of price changes.

[0090] Characteristics of fund flows:

[0091] Open interest change rate: reflects the net inflow and outflow of funds in futures funds.

[0092] Price behavior characteristics:

[0093] Intraday volatility: Indicates the degree of price fluctuation within a single day.

[0094] Closing / Closing Ratio: Reflects the strength of the closing price relative to the average price level of the day.

[0095] Liquidity characteristics:

[0096] Turnover rate: a measure of market trading activity and contract liquidity.

[0097] Futures-spot structure characteristics:

[0098] The futures market premium / discount structure and its changing trends are characterized by calculating the ratio (futures-spot ratio) and the difference (futures-spot difference) between futures prices and spot prices.

[0099] Feature selection:

[0100] To avoid the curse of dimensionality and improve model efficiency, a recursive feature elimination algorithm is employed to filter all constructed features. This algorithm uses a logistic regression model as the base estimator and recursively removes features with the smallest weights, ultimately retaining the subset of features most influential on the prediction target (closing price). This achieves automated and intelligent feature selection, providing high-quality signal input for subsequent model predictions.

[0101] 4. Model Training and Prediction System

[0102] Data transformation:

[0103] Data normalization: Min-Max normalization is used to map features to the [0,1] interval, which improves the model's convergence stability.

[0104] For feature vectors Min-Max normalization is defined as:

[0105]

[0106] After the prediction is completed, the results need to be inversely normalized to the original dimensions:

[0107]

[0108] in, These are the normalized eigenvalues. The minimum value of the characteristic. For the maximum value of the characteristic, These are the original feature values.

[0109] LSTM basic mathematical model:

[0110] LSTM cell state update equation:

[0111] Forgotten Gate:

[0112]

[0113] Input Gate:

[0114]

[0115]

[0116] Cell status update:

[0117]

[0118] Output gate:

[0119]

[0120]

[0121] Triple LSTM network structure:

[0122] Three independent LSTM models are built to predict different targets:

[0123] Point prediction model: Predicts the specific closing price for the next 21 days.

[0124]

[0125] Minimum value prediction model: Predicts the lower limit of the price fluctuation range for the next 21 days.

[0126]

[0127] Maximum value prediction model: Predicts the upper limit of the price fluctuation range for the next 21 days.

[0128]

[0129] Training objective construction:

[0130] Point prediction target:

[0131]

[0132] Rolling extreme value target:

[0133]

[0134]

[0135] in

[0136] Prediction result constraints:

[0137] Numerical rationality constraints:

[0138] Ensure that the minimum prediction is no greater than the maximum prediction:

[0139]

[0140]

[0141] Ensure that the predicted point values ​​are constrained to be within the range of minimum and maximum values:

[0142]

[0143] Statistical analysis and correction of prediction results:

[0144] Prediction results statistics:

[0145] Prediction interval width statistics:

[0146]

[0147] Predict the center location of the interval:

[0148]

[0149] Relative fluctuation range:

[0150]

[0151] Consistency Correction Algorithm:

[0152] Forecast values ​​after prediction interval correction Further adjustments to the starting point of the numerical values ​​will be made.

[0153] Difference sequence calculation:

[0154] First-order difference definition:

[0155]

[0156] Where T is the total number of days in the forecast. This is the corrected LSTM prediction sequence.

[0157] Construction of consistent sequences:

[0158] 1-day consistent sequence:

[0159]

[0160]

[0161] 5-day consensus sequence:

[0162]

[0163]

[0164] Weighted fusion calculation:

[0165] Consistent mean calculation:

[0166] Final prediction fusion:

[0167] Model performance evaluation:

[0168] The training set and the test set were divided in a 9:1 ratio.

[0169] MSE and RMASE are used as model evaluation metrics, where ε is a minimal constant to prevent division by zero.

[0170]

[0171]

[0172] in, For the true value, These are predicted values.

[0173] It is important to note that the core purpose of the method provided by this invention is to solve the technical problems of model learning distortion and logical conflicts in multi-task output caused by the reliance on a single model in existing futures forecasting. The output forecast results are merely technical output signals generated by the model based on historical data and set algorithms, and do not constitute any form of investment advice, buy / sell recommendation, or profit guarantee. The application of this method should be strictly limited to the technical system itself, and users must combine it with other independent analytical methods and their own risk tolerance to make investment decisions. This invention assumes no responsibility for the accuracy, reliability, or actual investment results of the forecast results.

[0174] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.

Claims

1. A long-term futures trading risk assessment system based on a hybrid model, characterized in that, The system includes: The trading day detection and filtering module is used to establish and maintain a holiday database. It identifies trading days and non-trading days through a date type determination algorithm. The subsequent prediction process is only executed when the current day is detected as a trading day and the next day is a non-trading day. The data preprocessing module is used to clean, normalize and diversify the raw data, perform linear interpolation and backfilling for missing values, and use the quantile-based Windsor method to handle outliers. The feature engineering module is used to construct a feature set including cross-product correlation features, multi-scale time lag features, market microstructure features, and futures-spot structure features, and uses a recursive feature elimination algorithm for feature selection; The model training and prediction module is used to train a triple prediction model consisting of three independent long short-term memory networks using normalized feature data, and outputs the point prediction value, the lower limit of the prediction interval, and the upper limit of the prediction interval for a specified number of days in the future, respectively. The prediction result post-processing and correction module is used to impose numerical rationality constraints on the original output of the triple prediction model to ensure that the predicted point values ​​are within the interval; and to use a consistency correction algorithm based on first-order difference to perform weighted fusion of the constrained point prediction sequence and the benchmark sequence provided by the short-term prediction model to generate the final prediction result. The model evaluation and output module is used to evaluate model performance using mean squared error and mean relative error indices, and outputs the final point prediction results and prediction interval statistics, as well as generate risk assessment data.

2. The long-term futures trading risk assessment system based on a hybrid model as described in claim 1, characterized in that, Establish and maintain a holiday database, including: A dynamic update mechanism that automatically detects versions through command parsing, intelligently triggers updates, and verifies the integrity of year coverage after the update.

3. The long-term futures trading risk assessment system based on a hybrid model as described in claim 1, characterized in that, The upper and lower boundaries for handling outliers by the Windsorization method are determined by the following formula: Q1 is the 5th percentile, and Q3 is the 95th percentile.

4. The long-term futures trading risk assessment system based on a hybrid model as described in claim 1, characterized in that, The multi-scale time-delay features are constructed using lag operators, and the time-delay feature set is defined as follows: , where K is a set of lag orders, including multiple scales such as short-term K={1,2,3,4,5}, medium-term K={10,15} and long-term K={21}.

5. The long-term futures trading risk assessment system based on a hybrid model as described in claim 1, characterized in that, The recursive feature elimination algorithm uses a logistic regression model as the base estimator and filters the feature subset that has the greatest influence on the prediction target by recursively removing the features with the smallest weights.

6. The long-term futures trading risk assessment system based on a hybrid model as described in claim 1, characterized in that, The cell state and hidden state of each LSTM unit in the triple prediction model are updated through a mechanism of forget gate, input gate, and output gate.

7. The long-term futures trading risk assessment system based on a hybrid model as described in claim 1, characterized in that, The consensus correction algorithm specifically includes: Calculate the first-order difference sequence of the point prediction sequence after the constraints are applied; Starting with the predicted values ​​for day 1 and days 1 to 5 provided by the short-term forecast model, the difference sequences are accumulated to construct a 1-day consensus sequence and a 5-day consensus sequence. The final prediction result is obtained by weighting the mean of the constrained point prediction sequence with the mean of the 1-day and 5-day consistency sequences.

8. The long-term futures trading risk assessment system based on a hybrid model as described in claim 7, characterized in that, The short-term prediction model is a hybrid model combining the ARIMA model and the Prophet model.

9. The long-term futures trading risk assessment system based on a hybrid model as described in claim 1, characterized in that, The output forecast interval statistics should include at least the interval width, the interval center position, and the relative fluctuation range.