Financial market state prediction method and device, electronic equipment, medium and product
By screening and training prediction models based on multiple market factors, the problem of inaccurate prediction of financial market status caused by relying on a single indicator in the existing technology is solved, and accurate quantitative prediction of financial market status is achieved.
Patent Information
- Application Number
- CN202311676140.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-07
- Publication Date
- 2025-06-10
AI Technical Summary
The existing financial market status prediction scheme relies on single-dimensional indicators, resulting in inaccurate prediction results and it is difficult to accurately predict the future status of the financial market.
By obtaining the factor values of multiple market factors and the dependent variables of market up and down trends in the current historical time period, determine the degree of impact of each market factor on the dependent variables of market up and down trends, filter out the current effective factors, and use these factor values to train the prediction model, and dynamically adjust the model parameters to predict the current market temperature value.
Accurate quantitative prediction of financial market status is achieved, and the accuracy of prediction is improved by dynamically screening effective factors and adjusting model parameters.
Smart Images

Figure CN120125341A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of financial information technology, and in particular, to a method, apparatus, electronic device, medium, and product for predicting the state of a financial market. Background Art
[0002] The prediction technology, also known as the "prediction method", is a technology that, based on the historical data of things in the past and present, makes predictions and speculations on the future development trend of things through certain scientific methods and logical reasoning, and seeks the future development law of things. For the financial market, existing state prediction schemes mostly predict the future state trend of the market through single-dimensional indicators such as the current price-to-earnings ratio (PE), price-to-sales ratio (PS), and price-to-book ratio (PB). The prediction results obtained by such prediction schemes are not accurate; therefore, how to accurately predict the future state of the financial market has become an urgent technical problem to be solved at present. Summary of the Invention
[0003] To solve the problems in the related art, embodiments of the present disclosure provide a method, apparatus, electronic device, medium, and product for predicting the state of a financial market.
[0004] In a first aspect, embodiments of the present disclosure provide a method for predicting the state of a financial market, which is applied to a server. The method includes:
[0005] Obtaining the factor values of multiple market factors and the variable values of the market rise and fall trend dependent variable within a current historical time period;
[0006] Determining the influence degree of the multiple market factors on the market rise and fall trend dependent variable according to the factor values of the multiple market factors and the variable values of the market rise and fall trend dependent variable within the current historical time period, and screening the current effective factors from the multiple market factors according to the influence degree of the multiple market factors on the market rise and fall trend dependent variable;
[0007] Training a prediction model using the factor values of the current effective factors corresponding to the historical time points within the current historical time period and the marked market temperature values to obtain a trained prediction model, where the trained prediction model is used to predict the current market temperature value according to the current factor values of the current effective factors;
[0008] Inputting the current factor values corresponding to the current effective factors into the trained prediction model, executing the trained prediction model, and obtaining the current market temperature value output by the trained prediction model.
[0009] In a second aspect, embodiments of the present disclosure provide a device for predicting the state of a financial market, including:
[0010] An acquisition module, configured to acquire factor values of multiple market factors and the dependent variable of the market rise and fall trend within the current historical time period;
[0011] A screening module, configured to determine the influence degree of the multiple market factors on the dependent variable of the market rise and fall trend according to the factor values of the multiple market factors and the variable values of the dependent variable of the market rise and fall trend within the current historical time period, and screen the current effective factors from the multiple market factors according to the influence degree of the multiple market factors on the dependent variable of the market rise and fall trend;
[0012] A training module, configured to train a prediction model using the factor values of the current effective factors corresponding to historical time points within the current historical time period and the marked market temperature values, to obtain a trained prediction model, and the trained prediction model is used to predict the current market temperature value according to the current factor values of the current effective factors;
[0013] A prediction module, configured to input the current factor values corresponding to the current effective factors into the trained prediction model, execute the trained prediction model, and obtain the current market temperature value output by the trained prediction model.
[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device, including a memory and a processor, wherein the memory is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor to implement the method according to any one of the first aspect.
[0015] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, on which computer instructions are stored, and when the computer instructions are executed by a processor, the method according to any one of the first aspect is implemented.
[0016] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including computer instructions, and when the computer instructions are executed by a processor, the method steps according to any one of the first aspect are implemented.
[0017] According to the technical solution provided by the embodiments of the present disclosure, the server can obtain the factor values of multiple market factors and the dependent variable of the market rise and fall trend in the current historical time period, and screen the current effective factors from the multiple market factors according to the influence degree of the multiple market factors on the dependent variable of the market rise and fall trend in the current historical time period; after obtaining the current effective factors, the factor values of the current effective factors corresponding to the historical time points in the current historical time period and the marked market temperature values can be used to train the prediction model to obtain a trained prediction model, and the trained prediction model is used to predict the current market temperature value according to the current factor values of the current effective factors; in this way, the current factor values corresponding to the current effective factors can be input into the trained prediction model, and the trained prediction model can be executed to obtain the current market temperature value output by the trained prediction model. In this way, the server dynamically screens the effective factors in the current market environment, and dynamically adjusts the model parameters of the prediction model as time and the effective factors change, and uses the trained prediction model to predict the current market temperature value, so that the current market temperature value can be accurately predicted, and the state of the financial market can be accurately quantified and predicted.
[0018] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In combination with the drawings, through the following detailed description of non-limiting embodiments, other features, objects, and advantages of the present disclosure will become more apparent. In the drawings:
[0020] Figure 1 Show a flowchart of a method for predicting the state of a financial market according to an embodiment of the present disclosure;
[0021] Figure 2 Show a schematic diagram of backtest data according to an embodiment of the present disclosure;
[0022] Figure 3 Show a structural block diagram of a device for predicting the state of a financial market according to an embodiment of the present disclosure;
[0023] Figure 4 Show a structural block diagram of an electronic device according to an embodiment of the present disclosure;
[0024] Figure 5 Show a schematic diagram of the structure of a computer system suitable for implementing the method according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0025] In the following, the exemplary embodiments of the present disclosure will be described in detail with reference to the drawings, so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts irrelevant to the description of the exemplary embodiments are omitted in the drawings.
[0026] In the present disclosure, it should be understood that terms such as "including" or "having" are intended to indicate the presence of features, numbers, steps, actions, components, parts, or combinations thereof disclosed in this specification, and are not intended to exclude the possibility of the presence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.
[0027] In addition, it should be noted that, without conflict, the embodiments in the present disclosure and the features in the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0028] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data that have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of the relevant data need to comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entrances are provided for the user to select to authorize or refuse.
[0029] Figure 1 A flowchart showing a method for predicting the state of a financial market according to an embodiment of the present disclosure.
[0030] As Figure 1 shown, the method for predicting the state of the financial market may include the following steps S101 - S104:
[0031] In step S101, obtain the factor values of multiple market factors and the dependent variable of the market rise and fall trend within the current historical time period;
[0032] In step S102, determine the influence degree of the multiple market factors on the dependent variable of the market rise and fall trend according to the factor values of the multiple market factors and the variable values of the dependent variable of the market rise and fall trend within the current historical time period, and screen the current effective factors from the multiple market factors according to the influence degree of the multiple market factors on the dependent variable of the market rise and fall trend;
[0033] In step S103, use the factor values of the current effective factors corresponding to the historical time points within the current historical time period and the marked market temperature values to train a prediction model, and obtain a trained prediction model, where the trained prediction model is used to predict the current market temperature value according to the current factor values of the current effective factors;
[0034] In step S104, input the current factor values corresponding to the current effective factors into the trained prediction model, execute the trained prediction model, and obtain the current market temperature value output by the trained prediction model.
[0035] In a possible implementation, the method for predicting the state of the financial market is applicable to devices such as computers, computing devices, servers, and server clusters that can perform predictions on the state of the financial market.
[0036] In a possible implementation, the market factor refers to any indicator factor that can reflect market trading conditions. The market factor may include at least one of the following factors: 30-day rolling average turnover, share issuance of equity funds, increase in margin trading balance / A-share turnover, net northbound capital inflow information, PE-TTM (Price-to-Earning Ratio Trailing Twelve Month), PB-LF (Price-to-Book Ratio Last File), dividend rate, ERP (Equity Risk Premium), moving average, market turnover rate, difference between the number of daily limit up and limit down stocks, position of equity funds, and VIX (Volatility Index) of 50ETF (Exchange Traded Funds) options.
[0037] Among them, the factors in the market factor can be divided into four levels: the capital aspect, the valuation aspect, the technical aspect, and the sentiment aspect.
[0038] The market factors of the capital aspect include 30-day rolling average turnover, share issuance of equity funds, increase in margin trading balance / A-share turnover, and net northbound capital inflow information;
[0039] 30-day rolling average turnover: This factor is used to measure the average daily fund trading volume in the past month. The factor value can be the percentile of the 30-day rolling average turnover in the past 12 months, and the percentile can be the percentage.
[0040] Share issuance of equity funds: This factor is used to measure the share issuance of equity funds each month. The equity fund refers to a fund mainly invested in stocks. The factor value can be the rolling percentile of the share issuance of equity funds in the past 12 months. The rolling percentile refers to the value of the percentile calculated for the share issuance of equity funds within the rolling window range (the past 12 months).
[0041] Increase in margin trading balance / A-share turnover: This factor is used to measure the daily increase ratio of the margin trading balance and can reflect the liquidity and prosperity of the market. The margin trading balance refers to the cumulative difference between the daily margin trading purchases and the repayment of loans by investors. The factor value can be the rolling percentile of the increase in margin trading balance / A-share turnover in the past 12 months.
[0042] Net northbound capital inflow: This factor is used to measure the daily northbound capital inflow, which refers to the funds used to buy mainland stocks through the Hong Kong Stock Exchange. The factor value can be the rolling percentile of the net northbound capital inflow in the past 12 months.
[0043] The market factors of this valuation aspect include PE-TTM (Price-to-Earning Ratio Trailing TwelveMonth), PB-LF (Price-to-Book Ratio Last File), dividend yield and ERP (Equity Risk Premium);
[0044] PE-TTM: This factor refers to the price-to-earnings ratio over a rolling 12-month period. The factor value can be taken as the rolling percentile of PE-TTM over the past three years.
[0045] PB-LF: This factor refers to the ratio of the share price (Price) to the book value (Book Value) per share. The factor value can be taken as the rolling percentile of PB-LF in the past three years.
[0046] Dividend yield: This factor refers to the ratio of dividends to market price. The factor value can be taken as the rolling percentile of dividend yields in the past three years;
[0047] ERP: This factor refers to the difference between the return of the market portfolio or stocks with market average risk and the risk-free rate. This factor can be taken as the rolling percentile of ERP in the past three years;
[0048] The technical market factors may include moving average, market turnover rate, and the difference between the number of stocks with daily limit up and limit down;
[0049] Moving average: Moving average is also called moving average, often abbreviated as M or MA. It is based on the "average cost concept" of Dow Jones and uses the "moving average" principle in statistics to connect the average price over a period of time into a curve. The moving average here can be short-term, medium-term and long-term moving averages. The factor value of the moving average can be whether the short-term, medium-term and long-term moving averages form a bullish arrangement. For example, it can be whether the 10-day, 30-day and 60-day moving averages form a bullish arrangement.
[0050] Market turnover rate: This factor refers to the frequency of transactions within a certain period of time. The factor value can be taken as the rolling percentile of the market turnover rate in the past 12 months;
[0051] Daily difference between the number of stocks hitting the daily limit and those hitting the daily down limit: This factor is used to measure the market's rise and fall. The value of this factor can be the rolling percentile of the daily difference between the number of stocks hitting the daily limit and those hitting the daily down limit within the past 12 months.
[0052] These market factors related to sentiment can include the position of equity funds and the VIX (Volatility Index) of 50ETF (Exchange Traded Funds) options.
[0053] Position of equity funds: This factor refers to the proportion of equity funds issued each month in the current market to the stock assets, and is used to measure the position of equity funds. The value of this factor can be the rolling percentile of the position of equity funds within the past 5 years.
[0054] VIX of 50ETF options: This factor is used to measure the market panic index. The value of this factor can be the rolling percentile of the VIX of 50ETF options within the past 12 months.
[0055] In a possible implementation, the dependent variable of the market's rise and fall trend refers to a variable that can represent the index of the market's rise and fall trend. For example, the dependent variable of the market's rise and fall trend can be the CSI 300 Index, etc.
[0056] It should be noted here that the factor values of the above various market factors refer to the daily factor values. The factor values of multiple market factors within the current historical time period refer to the daily factor values of multiple market factors within the current historical time period. For the above various market factors, except for the position of equity funds, the factor values of the market factors can be obtained daily; the position of equity funds is a market factor whose factor value is obtained once a month. At this time, the daily factor value of the position of equity funds can be the factor value corresponding to the month of the date; the variable value of the dependent variable of the market's rise and fall trend refers to the daily variable value of the dependent variable of the market's rise and fall trend within the current historical time period.
[0057] In a possible implementation, the current historical time period refers to the historical time period starting from the current moment (such as the past three years, etc.). The current historical time period can be divided into multiple historical sub - time periods. Data analysis can be performed on the factor values corresponding to multiple market factors within the current historical sub - time period (such as a 3 - month historical sub - time period) and the dependent variable of the market's rise and fall trend in the next historical sub - time period (for example, when the current historical sub - time period is January - March of a certain year in the historical time period, the next historical time period is April - June of that year in the historical sub - time period) to determine the influence degree of multiple market factors on the dependent variable of the market's rise and fall trend. The market factors with a greater influence degree are screened as the current effective factors. The current effective factors are market factors that have an effective impact on the dependent variable of the future market's rise and fall trend in the current market environment.
[0058] In a possible implementation, market factors that affect market trends are different in different market environments. Therefore, the factor values of multiple market factors and the variable values of the dependent variable of market rise and fall trends within the current historical time period can be analyzed, and the market factors that have a greater impact on market trends in the current market environment can be screened out as effective factors.
[0059] In a possible implementation, since there are different effective factors in different market environments, different prediction models need to be trained for different effective factors to conduct market prediction. The training data set required for training this prediction model can be the factor values of the current effective factors corresponding to historical time points and the marked market temperature values. For example, if the historical time point is November 11, 2019, then the factor values of the current effective factors on November 11, 2019 can be obtained, and at the same time, the market temperature value on November 12, 2019 marked manually can be obtained. This market temperature value is marked by professionals in the field according to the market rise and fall conditions after November 11, 2019. In this way, a piece of training data can be obtained. There are multiple pieces of training data like the above example in this training data set. It should be noted here that this market temperature value is a quantitative value reflecting the market state. A lower market temperature value indicates a sluggish market, showing a downward trend in the short term as a whole and being in the relatively bottom range of the market in the medium and long term. A higher market temperature value indicates a booming market, showing an upward trend in the short term and being in the relatively high range of the market in the medium and long term.
[0060] In a possible implementation, the factor values of the current effective factors corresponding to the historical time point in the training data set can be input into the prediction model to obtain the market temperature prediction value output by the prediction model. By comparing this market temperature prediction value with the corresponding marked market temperature value, it can be judged whether the market temperature prediction value is accurate. The model parameters in the prediction model can be continuously adjusted until the error value between the market temperature prediction value output by the prediction model and the market temperature value is less than a preset threshold, and the accuracy rate that the market temperature prediction value is located in the preset temperature range where the market temperature value is located exceeds a predetermined value such as 90%, etc., then a trained prediction model can be obtained. This prediction model is trained based on the factor values of the current effective factors corresponding to historical time points within the current historical time period. Therefore, the model parameters in this prediction model will be dynamically adjusted with time and different effective factors.
[0061] In a possible implementation, the current factor value refers to the factor value of the current effective factor one day before the current moment. The current factor value corresponding to the current effective factor can be input into the prediction model, and by executing the prediction model, the current market temperature value output by the prediction model can be obtained.
[0062] In a possible implementation, after determining the current market temperature value, the server can send the current market temperature value to the client, and the client can display the current market temperature value for the user to understand the current market status. At the same time, the client will also display a line graph of the historical market temperature values before the current moment so that the user can understand the historical market temperature changes.
[0063] In this implementation, the server can obtain the factor values of multiple market factors and the dependent variable of the market rise and fall trend in the current historical period, and screen the current effective factors from the multiple market factors according to the influence degree of the multiple market factors on the dependent variable of the market rise and fall trend in the current historical period. After obtaining the current effective factors, the factor values of the current effective factors corresponding to the historical time points in the current historical period and the marked market temperature values can be used to train the prediction model to obtain a trained prediction model. The trained prediction model is used to predict the current market temperature value according to the current factor values of the current effective factors. In this way, the current factor values corresponding to the current effective factors can be input into the trained prediction model, and the trained prediction model can be executed to obtain the current market temperature value output by the trained prediction model. In this way, the server dynamically screens the effective factors in the current market environment, dynamically adjusts the model parameters of the prediction model as time and effective factors change, and uses the trained prediction model to predict the current market temperature value, so that the current market temperature value can be accurately predicted and the state of the financial market can be accurately quantified and predicted.
[0064] In a possible implementation, determining the influence degree of the multiple market factors on the dependent variable of the market rise and fall trend according to the factor values of the multiple market factors and the variable value of the dependent variable of the market rise and fall trend in the current historical period includes:
[0065] Calculate the influence significance and monotonicity of the multiple market factors on the dependent variable of the market rise and fall trend according to the factor values of the multiple market factors and the variable value of the dependent variable of the market rise and fall trend in the current historical period.
[0066] In this implementation, the influence degree of the multiple market factors on the dependent variable of the market rise and fall trend can be the significance and monotonicity of each market factor relative to the market trend index. The market factors that satisfy the predetermined significance index condition and the predetermined monotonicity index condition among the multiple market factors can be used as effective factors.
[0067] In a possible implementation, screening the current effective factors from the multiple market factors according to the influence significance and monotonicity of the multiple market factors on the dependent variable of the market rise and fall trend in the current historical period includes:
[0068] For each market factor, the regression algorithm is used to calculate the correlation coefficient between the factor value of the market factor on each day within the t-th historical sub-period and the variable value of the dependent variable of the market rise and fall trend on the corresponding date within the (t + 1)-th historical sub-period as the information coefficient IC value corresponding to each day of the market factor within the t-th historical sub-period;
[0069] Calculate the average value and standard deviation of the IC values corresponding to each day of the market factor within multiple historical sub-periods;
[0070] Determine the IR value of the market factor according to the average value and the standard deviation;
[0071] Conduct a significance test on the IC values corresponding to each day of the market factor within the multiple historical sub-periods to obtain the significance index of the IC value of the market factor;
[0072] For each market factor, conduct a grouped monotonicity test on the monotonicity of the market factor with respect to the dependent variable of the market rise and fall trend to obtain the monotonicity index value of the market factor;
[0073] Screen the current effective factors from the multiple market factors according to the influence degree of the multiple market factors on the dependent variable of the market rise and fall trend, including:
[0074] Screen the market factors with IC values, IC means, IC value significance indexes, and IR values that meet the predetermined significance index conditions and monotonicity index values that meet the predetermined monotonicity index conditions from the multiple market factors as effective factors.
[0075] In this embodiment, the significance of the market factor can be determined by calculating the IC (Information Coefficient) value and the IR (Information Ratio) value, and the significance of the market factor can be determined by calculating the grouped monotonicity P value.
[0076] Exemplarily, assuming that the current historical trading data are the factor values of multiple market factors and the variable values of the dependent variable of the market rise and fall trend within the historical period from January 1, 2018 to September 31, 2023, a quarter (or half a year, or one year, etc.) in the historical period can be divided into a historical sub-period, and thus multiple historical sub-periods are obtained and denoted as the t-th historical sub-period, where t can take values of 1, 2, 3...; the factor values of the n market factors within the t-th historical sub-period can be obtained and denoted as X 1,t , X 2,t , ……X i,t , ……X n,t , and the dependent variable of the market rise and fall trend within the (t + 1)-th historical sub-period is denoted as Y t+1 , where, Xi,t is a time - series vector, including the factor values of the i - th market factor on each day within the t - th historical sub - time period, Y t+1 is a time - series vector, including the variable values of the market rise - fall trend dependent variable on each day within the historical sub - time period where t = 1. By means of regression, calculate X i,t the factor value of the i - th market factor on each day in X and the Y in the next quarter t+1 the correlation coefficient β between the variable value of the market rise - fall trend dependent variable on the corresponding date within. For example, if the t - th historical sub - time period is from January to March and the (t + 1) - th historical sub - time period is from April to June, X can be calculated i,t the factor value of the i - th market factor on January 1 in X and Y t+1 the correlation coefficient β between the variable value of the market rise - fall trend dependent variable on April 1 in is an IC value corresponding to the i - th market factor. Denote the time - series vector of the IC values corresponding to the i - th market factor within the t - th historical sub - time period as IC i,t ; According to the above method, the time - series vectors of the IC values corresponding to the i - th market factor at each historical sub - time period within multiple historical sub - time periods can be calculated as IC i,1 , IC i,2 , ……IC i,t , ……; For the multiple time - series vectors of the IC values corresponding to this i - th market factor, namely IC i,1 , IC i,2 , ……IC i,t , ……, the average value of all the IC values in them can be calculated to obtain the IC mean corresponding to the i - th market factor; At the same time, calculate the standard deviation of all the IC values in the multiple time - series vectors of the IC values corresponding to the i - th market factor, namely IC i,1 , IC i,2 , ……IC i,p , …… as the IC standard deviation corresponding to the i - th market factor. The ratio between the IC mean corresponding to the i - th market factor and the IC standard deviation corresponding to the i - th market factor can be used as the IR value of this market factor, or an approximate value of the ratio between the IC mean corresponding to the i - th market factor and the IC standard deviation corresponding to the i - th market factor can also be used as the IR value of this market factor. The multiple time - series vectors of the IC values corresponding to the i - th market factor, namely IC i,1 , IC i,2 , ……IC i,p, perform a significance test on all IC values in..., and obtain the IC value significance index of the i-th market factor, such as the p-value of the factor IC value significance test. The i-th market factor can be sorted in ascending order of factor values and equally divided into five groups (denoted as group 1, group 2, group 3, group 4, and group 5). Use the factor values of each group to calculate the correlation with the dependent variable Y of the market rise and fall trend, obtain the correlation coefficient, and perform a statistical test on the correlation coefficient to obtain the factor grouping monotonicity test P value as the monotonicity index value.
[0077] In this embodiment, the significance index condition can be that multiple IC values, IC mean, IR value, and IC value significance index corresponding to the market factor are all within a predetermined value range, and the predetermined monotonicity index condition can be that the monotonicity index value is within a predetermined monotonicity index value range. For example, it can be that the IC mean > 0.04, the proportion of the absolute value of the IC value > 0.02 in all IC values of multiple historical sub-time periods exceeds the predetermined ratio value of 75%, the IR value > 0.3, the p value of the factor IC value significance test < 0.05, and the P value of the factor grouping monotonicity test < 0.05, etc.
[0078] In a possible embodiment, when the current effective factor includes the equity risk premium ERP, training the prediction model using the factor values of the current effective factor corresponding to the historical time points in the current historical time period and the marked market temperature values to obtain a trained prediction model, including:
[0079] Correct the factor value x of the ERP according to the following formula:
[0080]
[0081] Train the prediction model using the corrected factor value of the ERP corresponding to the historical time points in the current historical time period, the factor values of other current effective factors, and the marked market temperature values to obtain a trained prediction model;
[0082] Inputting the current factor value corresponding to the current effective factor into the trained prediction model and executing the trained prediction model to obtain the current market temperature value output by the trained prediction model, including
[0083] Correct the current factor value x* of the ERP according to the following formula:
[0084]
[0085] Input the corrected current factor value corresponding to the ERP and the current factor values corresponding to other currently valid factors into the trained prediction model, and execute the trained prediction model to obtain the current market temperature value output by the trained prediction model.
[0086] In this embodiment, the disadvantage of the factor value of the existing ERP is that it does not take into account the momentum effect existing in the domestic market itself, that is, due to the irrational investment behavior of investors, it may cause deviations in the model estimation. Using the factor value of the existing ERP cannot well predict the current market temperature value. Therefore, in order to cope with the market momentum effect, the factor value of the ERP can be modified so that it can be correspondingly corrected in different market environments of bull and bear markets, and it can better predict the current market temperature value. Therefore, in this embodiment, when the currently valid factors include the ERP, when training the prediction model, first, the factor value x of the ERP corresponding to each historical time point in the current historical time period is corrected according to the above formula ; use the corrected factor value of the ERP to train the prediction model. When calculating the current market temperature value, it is also necessary to first correct the current factor value x* of the ERP according to the formula for correction.
[0087] In a possible embodiment, the method further includes:
[0088] Perform backtesting on the trained prediction model to obtain a backtesting result;
[0089] The step of inputting the current factor value corresponding to the currently valid factor into the trained prediction model, executing the trained prediction model, and obtaining the current market temperature value output by the trained prediction model includes:
[0090] In response to the backtesting result being a pass, input the current factor value corresponding to the currently valid factor into the trained prediction model, execute the trained prediction model, and obtain the current market temperature value output by the trained prediction model;
[0091] The method further includes:
[0092] In response to the backtesting result being a failure, continue to train the prediction model.
[0093] In this embodiment, the feasibility and effectiveness of the trained prediction model can be verified by performing backtesting on the trained prediction model. If the backtesting result is good, the trained prediction model is used to predict the current market temperature value. If the backtesting result is not good, the prediction model needs to be continuously trained until a good backtesting result is obtained.
[0094] For example, during backtesting, the predicted market temperature values predicted by the trained prediction model can be subjected to a grouped monotonicity test. The market temperature prediction values are equally divided into 5 groups from large to small, such as: overheated group 80°-100°, high temperature group 60°-80°, moderate group 40°-60°, low temperature group 20°-40°, cold group 0-20°. Then, regression tests are performed on the positive returns and average returns within different future time periods (such as 90 days, 180 days, 270 days, and 360 days, etc.) for these 5 groups of market temperature prediction values. The statistical p-value is used to indicate whether the grouping is monotonic. Figure 2 FIG. shows a schematic diagram of backtest data according to an embodiment of the present disclosure. Assume the relationship between the positive returns within different future time periods and these 5 groups of market temperature prediction values is as Figure 2 shown. That is, the lower the temperature, the higher the probability of positive returns, indicating that the market temperature prediction values have monotonicity with respect to the positive returns. Then, the backtest result is that the backtest passes.
[0095] This embodiment adopts a backtest mechanism, which ensures the stability of the model's winning rate and makes the market trading prompt information more objective.
[0096] In a possible implementation, the prediction model is an XGBoost (eXtreme Gradient Boosting) model.
[0097] In this implementation, the prediction model can be an XGBoost model. The XGBoost model optimizes the model parameters using the gradient descent algorithm by calculating the error between the predicted value and the true value, and finally outputs the market temperature value that meets the performance of the objective function. The objective function can be RMSE (Root Mean Square Error).
[0098] Figure 3 FIG. shows a structural block diagram of a financial market state prediction device according to an embodiment of the present disclosure. Among them, the device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. As Figure 3 shown, the financial market state prediction device includes:
[0099] An acquisition module 301, configured to acquire the factor values of multiple market factors and the dependent variable of the market rise and fall trend within the current historical time period;
[0100] A screening module 302, configured to determine the influence degree of the multiple market factors on the dependent variable of the market rise and fall trend according to the factor values of the multiple market factors and the variable values of the dependent variable of the market rise and fall trend within the current historical time period, and screen the current effective factors from the multiple market factors according to the influence degree of the multiple market factors on the dependent variable of the market rise and fall trend;
[0101] The training module 303 is configured to train a prediction model using the factor values of the current effective factors corresponding to historical time points within the current historical time period and the labeled market temperature values, so as to obtain a trained prediction model, and the trained prediction model is used to predict the current market temperature value according to the current factor values of the current effective factors;
[0102] The prediction module 304 is configured to input the current factor values corresponding to the current effective factors into the trained prediction model, execute the trained prediction model, and obtain the current market temperature value output by the trained prediction model.
[0103] In a possible implementation manner, the part in the screening module 302 that determines the influence degree of the multiple market factors on the dependent variable of the market rise and fall trend according to the factor values of the multiple market factors and the variable values of the dependent variable of the market rise and fall trend within the current historical time period is configured to:
[0104] Calculate the influence significance and monotonicity of the multiple market factors on the dependent variable of the market rise and fall trend according to the factor values of the multiple market factors and the variable values of the dependent variable of the market rise and fall trend within the current historical time period.
[0105] In a possible implementation manner, the part in the screening module that calculates the influence significance and monotonicity of the multiple market factors on the dependent variable of the market rise and fall trend according to the factor values of the multiple market factors and the variable values of the dependent variable of the market rise and fall trend within the current historical time period is configured to:
[0106] Obtain the factor values of the multiple market factors within the t-th historical sub-time period and the variable values of the dependent variable of the market rise and fall trend within the (t + 1)-th historical sub-time period, where t is an integer greater than or equal to 1, and the (t + 1)-th historical sub-time period is the time period continuously arranged after the t-th historical sub-time period within the current historical time period;
[0107] For each market factor, use a regression algorithm to calculate the correlation coefficient between the factor values of the market factor on each day within the t-th historical sub-time period and the variable values of the dependent variable of the market rise and fall trend on the corresponding date within the (t + 1)-th historical sub-time period as the information coefficient IC value corresponding to each day of the market factor within the t-th historical sub-time period;
[0108] Calculate the average value and standard deviation of the IC values corresponding to each day of the market factor within multiple historical sub-time periods;
[0109] Determine the IR value of the market factor according to the average value and the standard deviation;
[0110] Perform a significance test on the IC values corresponding to the market factors daily within the multiple historical sub - time periods to obtain the IC value significance index of the market factors;
[0111] For each market factor, perform a grouped monotonicity test on the monotonicity of the market factor with respect to the market rise - fall trend dependent variable to obtain the monotonicity index value of the market factor;
[0112] The part of the screening module that screens the current effective factors from the multiple market factors according to the influence degree of the multiple market factors on the market rise - fall trend dependent variable is configured as:
[0113] Screen market factors from the multiple market factors whose IC values, IC means, IC value significance indices, and IR values meet the predetermined significance index conditions and whose monotonicity index values meet the predetermined monotonicity index conditions as effective factors.
[0114] In a possible implementation manner, when the current effective factor includes the equity risk premium ERP, the training module is configured as:
[0115] Correct the factor value x of the ERP according to the following formula:
[0116]
[0117] Use the corrected factor value of the ERP corresponding to the historical time points within the current historical time period, the factor values of other current effective factors, and the labeled market temperature values to train the prediction model to obtain the trained prediction model;
[0118] The prediction module is configured as:
[0119] Correct the current factor value x* of the ERP according to the following formula:
[0120]
[0121] Input the corrected current factor value corresponding to the ERP and the current factor values corresponding to other current effective factors into the trained prediction model, execute the trained prediction model, and obtain the current market temperature value output by the trained prediction model.
[0122] In a possible implementation manner, the device further includes:
[0123] Perform backtesting on the trained prediction model to obtain the backtesting result;
[0124] The training module is configured as:
[0125] In response to the backtest result being a pass, input the current factor value corresponding to the current valid factor into the trained prediction model, execute the trained prediction model, and obtain the current market temperature value output by the trained prediction model;
[0126] The apparatus further includes:
[0127] A continuous training module, configured to continuously train the prediction model in response to the backtest result being a failure.
[0128] In a possible implementation manner, the prediction model is an Extreme Gradient Boosting (XGBoost) model.
[0129] The technical terms and technical features mentioned in the embodiments of the present apparatus are the same as or similar to those in the above method embodiments. For the explanations and descriptions of the technical terms and technical features involved in the present apparatus, reference can be made to the explanations and descriptions of the above method embodiments, which will not be elaborated here.
[0130] The present disclosure also discloses an electronic device, Figure 4 showing a structural block diagram of an electronic device according to an embodiment of the present disclosure.
[0131] As Figure 4 shown, the electronic device 400 includes a memory 401 and a processor 402. Among them, the memory 401 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor 402 to implement the method according to the embodiment of the present disclosure.
[0132] Figure 5 showing a structural schematic diagram of a computer system suitable for implementing the method according to an embodiment of the present disclosure.
[0133] As Figure 5 shown, the computer system 500 includes a processing unit 501, which can execute various processes in the above embodiments according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage section 508 into the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the computer system 500 are also stored. The processing unit 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. The input / output (I / O) interface 505 is also connected to the bus 504.
[0134] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. as well as a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as required. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as required so that a computer program read from it can be installed into the storage section 508 as required. Among them, the processing unit 501 can be implemented as a processing unit such as a CPU, a GPU, a TPU, an FPGA, an NPU, etc.
[0135] Specifically, according to an embodiment of the present disclosure, the method described above can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes computer instructions that implement the method steps described above when executed by a processor. In such an embodiment, the computer program product can be downloaded and installed from a network through the communication section 509, and / or installed from the removable medium 511.
[0136] The flowcharts and block diagrams in the drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0137] The units or modules involved in the embodiments described in the present disclosure can be implemented in software or in a programmable hardware manner. The described units or modules can also be provided in a processor, and the names of these units or modules do not constitute a limitation to the units or modules themselves in some cases.
[0138] As another aspect, the present disclosure also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the electronic device or computer system in the above embodiments; or it may exist separately and be a computer-readable storage medium not assembled into the device. The computer-readable storage medium stores one or more programs, and the one or more programs are used by one or more processors to execute the methods described in the present disclosure.
[0139] The above description is only the preferred embodiments of the present disclosure and the description of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present disclosure.
Claims
1. A method for predicting the state of a financial market, characterized in that, applied to a server, the method includes: Obtaining the factor values of multiple market factors and the variable values of the dependent variable of the market rise and fall trend within the current historical time period; According to the factor values of multiple market factors and the variable values of the dependent variable of the market rise and fall trend within the current historical time period, determining the influence degree of the multiple market factors on the dependent variable of the market rise and fall trend, and screening the current effective factors from the multiple market factors according to the influence degree of the multiple market factors on the dependent variable of the market rise and fall trend; Using the factor values of the current effective factors corresponding to the historical time points within the current historical time period and the marked market temperature values to train a prediction model, obtaining a trained prediction model, and the trained prediction model is used to predict the current market temperature value according to the current factor values of the current effective factors; Inputting the current factor values corresponding to the current effective factors into the trained prediction model, executing the trained prediction model, and obtaining the current market temperature value output by the trained prediction model.
2. The method according to claim 1, characterized in that, The determining the influence degree of the multiple market factors on the dependent variable of the market rise and fall trend according to the factor values of multiple market factors and the variable values of the dependent variable of the market rise and fall trend within the current historical time period includes: Calculating the influence significance and monotonicity of the multiple market factors on the dependent variable of the market rise and fall trend according to the factor values of multiple market factors and the variable values of the dependent variable of the market rise and fall trend within the current historical time period.
3. The method according to claim 2, characterized in that, The calculating the influence significance and monotonicity of the multiple market factors on the dependent variable of the market rise and fall trend according to the factor values of multiple market factors and the variable values of the dependent variable of the market rise and fall trend within the current historical time period includes: Obtaining the factor values of the multiple market factors within the t-th historical sub-time period and the variable values of the dependent variable of the market rise and fall trend within the (t + 1)-th historical sub-time period, where t is an integer greater than or equal to 1, and the (t + 1)-th historical sub-time period is the time period continuously arranged after the t-th historical sub-time period within the current historical time period; For each market factor, using a regression algorithm to calculate the correlation coefficient between the factor value of the market factor on each day within the t-th historical sub-time period and the variable value of the dependent variable of the market rise and fall trend on the corresponding date within the (t + 1)-th historical sub-time period as the information coefficient IC value corresponding to each day of the market factor within the t-th historical sub-time period; Calculating the average value and standard deviation of the IC values corresponding to each day of the market factor within multiple historical sub-time periods; Determining the information ratio IR value of the market factor according to the average value and the standard deviation; Performing a significance test on the IC values corresponding to each day of the market factor within the multiple historical sub-time periods to obtain the IC value significance index of the market factor; For each market factor, performing a grouped monotonicity test on the monotonicity of the market factor with respect to the dependent variable of the market rise and fall trend to obtain the monotonicity index value of the market factor; Screening the current effective factors from the multiple market factors according to the influence degrees of the multiple market factors on the dependent variable of the market rise and fall trend, including: Screening the market factors whose IC value, IC mean value, IC value significance index, and IR value meet the predetermined significance index conditions and the monotonicity index value meets the predetermined monotonicity index conditions from the multiple market factors as the effective factors.
4. The method according to claim 1, wherein, when the current effective factor includes the equity risk premium ERP, training the prediction model by using the factor values of the current effective factors corresponding to the historical time points within the current historical time period and the marked market temperature values, to obtain a trained prediction model, including: Modifying the factor value x of the ERP according to the following formula: Training the prediction model by using the modified factor value of the ERP, the factor values of other current effective factors, and the marked market temperature values corresponding to the historical time points within the current historical time period, to obtain a trained prediction model; Inputting the current factor value corresponding to the current effective factor into the trained prediction model, executing the trained prediction model, to obtain the current market temperature value output by the trained prediction model, including Modifying the current factor value x* of the ERP according to the following formula: Inputting the modified current factor value corresponding to the ERP and the current factor values corresponding to other current effective factors into the trained prediction model, executing the trained prediction model, to obtain the current market temperature value output by the trained prediction model.
5. The method according to claim 1, wherein, the method further includes: Performing backtesting on the trained prediction model to obtain a backtesting result; Inputting the current factor value corresponding to the current effective factor into the trained prediction model, executing the trained prediction model, to obtain the current market temperature value output by the trained prediction model, including: In response to the backtesting result being a passed backtest, inputting the current factor value corresponding to the current effective factor into the trained prediction model, executing the trained prediction model, to obtain the current market temperature value output by the trained prediction model; the method further includes: In response to the backtesting result being a failed backtest, continuing to train the prediction model.
6. The method according to claim 1, wherein, the prediction model is an Extreme Gradient Boosting (XGBoost) model.
7. A state prediction device for a financial market, wherein, applied to a server, the device includes: An acquisition module, configured to acquire the factor values of multiple market factors and the dependent variable of the market rise and fall trend within the current historical time period; A screening module, configured to determine the influence degrees of the multiple market factors on the dependent variable of the market rise and fall trend according to the factor values of the multiple market factors and the variable values of the dependent variable of the market rise and fall trend within the current historical time period, and screen the current effective factors from the multiple market factors according to the influence degrees of the multiple market factors on the dependent variable of the market rise and fall trend; A training module, configured to train a prediction model using the factor values of the current effective factors corresponding to historical time points within the current historical time period and the labeled market temperature values, to obtain a trained prediction model, where the trained prediction model is used to predict the current market temperature value based on the current factor values of the current effective factors; A prediction module, configured to input the current factor values corresponding to the current effective factors into the trained prediction model, execute the trained prediction model, and obtain the current market temperature value output by the trained prediction model.
8. The apparatus according to claim 7, wherein, the part in the screening module for determining the influence degree of the multiple market factors on the market rise and fall trend dependent variable according to the factor values of the multiple market factors and the variable values of the market rise and fall trend dependent variable within the current historical time period is configured to: calculate the influence significance and monotonicity of the multiple market factors on the market rise and fall trend dependent variable according to the factor values of the multiple market factors and the variable values of the market rise and fall trend dependent variable within the current historical time period.
9. The apparatus according to claim 8, wherein, the part in the screening module for calculating the influence significance and monotonicity of the multiple market factors on the market rise and fall trend dependent variable according to the factor values of the multiple market factors and the variable values of the market rise and fall trend dependent variable within the current historical time period is configured to: obtain the factor values of the multiple market factors within the t-th historical sub-time period and the variable values of the market rise and fall trend dependent variable within the (t + 1)-th historical sub-time period, where t is an integer greater than or equal to 1, and the (t + 1)-th historical sub-time period is the time period continuously arranged after the t-th historical sub-time period within the current historical time period; for each market factor, use a regression algorithm to calculate the correlation coefficient between the factor value of the market factor on each day within the t-th historical sub-time period and the variable value of the market rise and fall trend dependent variable on the corresponding date within the (t + 1)-th historical sub-time period as the information coefficient IC value corresponding to each day of the market factor within the t-th historical sub-time period; calculate the average value and standard deviation of the IC values corresponding to each day of the market factor within multiple historical sub-time periods; determine the IR value of the market factor according to the average value and the standard deviation; perform a significance test on the IC values corresponding to each day of the market factor within the multiple historical sub-time periods to obtain the IC value significance index of the market factor; for each market factor, perform a grouped monotonicity test on the monotonicity of the market factor with respect to the market rise and fall trend dependent variable to obtain the monotonicity index value of the market factor; the part in the screening module for screening the current effective factors from the multiple market factors according to the influence degree of the multiple market factors on the market rise and fall trend dependent variable is configured to: screen the market factors whose IC values, IC mean values, IC value significance indexes, and IR values meet the predetermined significance index conditions and whose monotonicity index values meet the predetermined monotonicity index conditions from the multiple market factors as effective factors.
10. The apparatus according to claim 7, wherein, When the current effective factor includes the equity risk premium (ERP), the training module is configured to: Correct the factor value x of the ERP according to the following formula: Train a prediction model using the corrected factor value of the ERP corresponding to historical time points within the current historical time period, the factor values of other current effective factors, and the labeled market temperature values, to obtain a trained prediction model; The prediction module is configured to: Correct the current factor value x* of the ERP according to the following formula: Input the corrected current factor value corresponding to the ERP and the current factor values corresponding to other current effective factors into the trained prediction model, execute the trained prediction model, and obtain the current market temperature value output by the trained prediction model.
11. The apparatus according to claim 7, wherein, The apparatus further includes: Perform backtesting on the trained prediction model to obtain a backtesting result; The training module is configured to: In response to the backtesting result being a pass, input the current factor value corresponding to the current effective factor into the trained prediction model, execute the trained prediction model, and obtain the current market temperature value output by the trained prediction model; The apparatus further includes: A continued training module, configured to continue training the prediction model in response to the backtesting result being a failure.
12. The apparatus according to claim 7, wherein, The prediction model is an Extreme Gradient Boosting (XGBoost) model.
13. An electronic device, including a memory and a processor; wherein, The memory is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor to implement the method steps of any one of claims 1 to 6.
14. A computer-readable storage medium, having computer instructions stored thereon, wherein, When the computer instructions are executed by a processor, the method of any one of claims 1 - 6 is implemented.
15. A computer program product, including computer instructions, wherein, When the computer instructions are executed by a processor, the method steps of any one of claims 1 to 6 are implemented.