Air temperature prediction method and system for air temperature derivatives
Through the CAR-wavelet neural network combination model, the problem of low accuracy in the existing temperature prediction model when characterizing temperature continuous changes and temperature difference fluctuations is solved, and a higher precision temperature prediction is achieved.
Patent Information
- Application Number
- CN202510484442.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-05-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing temperature prediction model has problems with low accuracy when characterizing temperature continuous changes, temperature difference volatility and the influence of multiple meteorological factors.
The CAR-wavelet neural network combination model is used to calculate the continuous change of temperature and the greenhouse effect trend through the CAR model, and combine the wavelet neural network model to predict the uncertainty of temperature. The combined model is constructed by calculating the weight values of the two models to improve the temperature prediction accuracy.
It improves the accuracy of temperature prediction and can more accurately reflect the continuous changes in temperature, seasonality and the influence of multiple meteorological factors.
Smart Images

Figure CN119989956A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of temperature prediction, and more specifically, relates to a temperature prediction method and system for temperature derivatives. Background Art
[0002] Temperature has a profound impact on core industries of the national economy, such as agriculture, electricity, and energy. Temperature derivatives combine temperature and derivatives trading to hedge against economic losses caused by temperature risks. As an innovative financial strategy, temperature derivatives have attracted increasing attention in recent years. Temperature forecasts are the basis for pricing temperature derivatives, so temperature forecasts are particularly important.
[0003] Chinese patent document CN115510767A discloses a regional temperature prediction method based on a deep spatiotemporal network, the regional temperature prediction method comprising: obtaining temperature values detected at multiple time points by temperature monitoring points in a target area; generating a temperature distribution map of the target area at multiple time points based on the temperature values detected by the temperature monitoring points; generating a spatiotemporal map of the target area based on the temperature distribution map of the target area at multiple time points, the spatiotemporal map being used to characterize the temperature change of the target area over time; constructing a temperature prediction model based on a ConvLSTM model incorporating an attention mechanism module; and inputting the spatiotemporal map of the target area into the temperature prediction model to obtain a temperature prediction result for the target area.
[0004] According to the pricing principle of temperature derivatives, temperature data is regarded as time series data with characteristics such as periodicity, seasonality, trend and randomness. Usually, a time series model is first constructed based on the characteristics of the temperature value to predict the temperature, and then the Monte Carlo method is used to further simulate the predicted temperature data to improve the accuracy of the prediction. However, there is a technical drawback of low prediction accuracy, so it is crucial to choose a suitable temperature prediction model.
[0005] In summary, firstly, the discrete time series model cannot better adapt to the characteristics of continuous temperature changes; secondly, other models usually assume that the temperature difference fluctuation is a constant when describing the volatility characteristics of temperature difference. However, the constant assumption of temperature fluctuation will lead to the predicted temperature volatility being significantly lower than the actual temperature fluctuation; thirdly, the temperature change is caused by a variety of uncertain meteorological factors, while the existing models only describe the temperature change for individual influencing meteorological factors.
[0006] The above defects determine the technical problem of low temperature prediction accuracy. In view of this, the present invention designs a temperature prediction method and system for temperature derivatives to solve the above defects. Summary of the invention
[0007] The present invention aims to overcome at least one defect of the above-mentioned prior art and provide a temperature prediction method for temperature derivatives to solve the problem of low temperature prediction accuracy.
[0008] The invention also discloses a temperature prediction system of a CAR-wavelet neural network combination model for temperature derivatives.
[0009] The detailed technical scheme of the present invention is as follows: A temperature prediction method for temperature derivatives, the method comprising: S1: Obtain temperature data of different regions, and select the highest temperature, the lowest temperature and the average temperature of the obtained temperature data of different regions; S2: Remove the temperature data on February 29th of leap years from the acquired temperature data to obtain the daily temperature values between years, and divide them into a prediction set and a test set. The prediction set is used for temperature prediction, and the test set is used to test the accuracy of temperature prediction. S3: Input the prediction set into the CAR model and the wavelet neural network model for model training; S4: Calculate the weight values of each according to the relative errors of the temperature prediction of the trained CAR model and the wavelet neural network model, and construct a CAR-wavelet neural network combination model; S5: Use the prediction evaluation index to test the predicted temperature value of the constructed CAR-wavelet neural network combination model, and repeat S1-S4 until the temperature prediction accuracy of the constructed CAR-wavelet neural network combination model reaches the set accuracy threshold.
[0010] Furthermore, S3 includes the construction and training of the CAR model: = + (1); In formula (1), It refers to the daily temperature value between years, T represents the temperature value, and day represents the date; Indicates the temperature values with seasonality and warm trends every day between years; It represents the daily temperature value that eliminates seasonality and warm trends between years; In the CAR model, we first calculate : =y 1 +y 2 +y 3 cos( )(2); In formula (2), y1, y2, y3, and y4 are seasonal and trend parameter values, which belong to model parameters.1 +y 2 Used to calculate the warming trend of temperature; 3 cos( ) is used to calculate seasonal variations in temperature; Secondly, calculate : (3); In formula (3), p represents the autoregressive order, and o represents that the autoregressive order starts from 1; is the temperature autoregressive parameter value, which is a model parameter and is obtained through model training; represents the white noise characteristics of temperature, where represents white noise, T is the temperature value; represents the seasonal variation of the daily temperature residual value between years, where Indicates the seasonal variation of residual values; The characteristic of the mean recovery rate of temperature is set to A, which changes from a constant to a variable mean recovery rate, and formula (3) becomes: (4); in: A=-log (5); In formula (5), σ represents the volatility, T represents the temperature, represents the temperature fluctuation rate; It is expressed as the temperature value with an increasing trend of (day-1) days caused by the greenhouse effect. Day represents the date, Day represents the deadline, and day-1 represents (day-1) days.
[0011] Using Fourier function To model: The modeling formula is expressed as: (6); In formula (6), represents the seasonal variation of the daily temperature residual value between years, represents the seasonal variation of the residual value, T represents the temperature, and k is the series of the Fourier function; The parameter values in the formula for calculating the seasonal variation of daily temperature residual values between years are obtained through model training.
[0012] Input the temperature data in the prediction set, estimate the parameter values in the CAR model through the CAR model, and then predict the temperature data based on the parameter values in the CAR model.
[0013] Furthermore, S3 also includes the construction and training of a wavelet neural network model: The wavelet neural network model includes input layer, hidden layer and output layer: Input layer: At the input layer The temperature value of the prediction set As the input value of the wavelet neural network model, through the hidden layer, the wavelet basis function is used; Hidden layer: The wavelet function of the hidden layer is expressed as: h(j)= (7); In formula (7), is the wavelet basis function of the jth neuron in the hidden layer, x is the input value, i.e., the temperature value of the prediction set, i is the i-th input value, j represents the jth neuron in the hidden layer, i=1,2,3,…,q, j=1,2,3,…,m, represents the weight value from the input layer to the hidden layer neurons, q is the total number of input values, and m represents the total number of hidden layer neurons; is the wavelet basis function The translation factor, is the wavelet basis function The scaling factor; h(j) is the output value of the jth neuron in the hidden layer, that is, the predicted temperature value is output by the output layer after the wavelet function of the neurons in the hidden layer is transmitted.
[0014] The calculation formula of the output layer is expressed as: h(j)(8) In formula (8), F( u ) is the prediction network output, is the weight value from the hidden layer to the input layer, u =1,2,3,…, n,n is the number of neurons in the output layer; Compare the predicted temperature value with the temperature value of the test set and calculate the relative error of the wavelet neural network model prediction e ; (9); In formula (9), e It represents the wavelet relative error, that is, the relative error of the wavelet neural network model prediction. is the expected output temperature value, i.e. the actual temperature value in the test set. is the temperature value predicted by the wavelet neural network model. v is the forecast start date, r is the forecast end date; According to the wavelet relative error e , the gradient correction method is used to continuously correct the weight value of the wavelet neural network model. The gradient correction algorithm is: +Δ (10); = +Δ (11); = +Δ (12); In formulas (10) to (12), s is used as the abbreviation of the input layer of the wavelet neural network model. To represent the weight value connecting the input layer to the hidden layer at the zth iteration, is the weight value connecting the input layer to the hidden layer at the z+1th iteration, is the wavelet basis function of the jth neuron in the hidden layer at the zth iteration The expansion factor, is the wavelet basis function of the jth neuron in the hidden layer at the z+1th iteration The expansion factor, is the wavelet basis function of the jth neuron in the hidden layer at the zth iteration The translation factor, is the wavelet basis function of the jth neuron in the hidden layer at the z+1th iteration The translation factor of .
[0015] Δ represents the error propagation partial derivative between the input layer and the hidden layer at the z+1th iteration, Δ is the wavelet basis function of the jth neuron in the hidden layer at the z+1th iteration The error propagation partial derivative of the scaling factor, Δ The wavelet basis function of the jth neuron in the hidden layer at the z+1th iteration is The error propagation partial derivative of the translation factor is calculated as: Δ =-η (13); Δ =-η (14); Δ -η (15); In formulas (13) to (15), η is the learning rate in the hidden layer of the wavelet neural network model, which is adjusted according to the actual situation. represents partial derivative; When the relative error between the temperature value predicted by the wavelet neural network model and the expected value tends to be stable or the difference is less than 1°C, the process stops.
[0016] S4: Calculate the weight value according to the relative error of temperature prediction of CAR model and wavelet neural network model, and construct the CAR-wavelet neural network combination model; The relationship between CAR model and wavelet neural network model and CAR-wavelet neural network model: Usually, a model can only characterize the law of temperature in one aspect and cannot fully reflect the entire law characteristics of temperature change.
[0017] Furthermore, the S4 specifically includes: Based on the CAR model, the data of the prediction set is input to predict the actual annual temperature value in the test set to obtain the CAR predicted temperature value. The CAR predicted temperature value is calculated with the actual temperature value of the test set, and the difference between the two is the CAR relative error: Similarly, based on the wavelet neural network model, the data of the prediction set is input to predict the actual annual temperature value in the test set, and the wavelet neural network predicted temperature value is obtained. The wavelet neural network predicted temperature value is calculated with the actual temperature value of the test set, and the difference between the two is the wavelet neural network relative error; The calculation method of the combined model is:
[0018] (16); f(x) is the temperature predicted by the combined model; is the weight value of the CAR model, is the weight value of the wavelet neural network model, is the temperature value predicted by the CAR model, The temperature value predicted by the wavelet neural network model; The weight values are calculated using the inverse mean square error method: ; (17); In formula (17), v is the forecast start date, r is the forecast end date, Predict temperature values for CAR, For wavelet neural network to predict temperature value, Indicates the actual temperature value.
[0019] Furthermore, the calculation of weight values can be replaced by using the advantage matrix method to calculate the weight values: The weight value algorithm formula for the model is: = , = (18); It indicates the number of times that the temperature value predicted by the CAR model is better than that of the wavelet neural network model within the forecast period. Indicates the number of times the temperature value predicted by the wavelet neural network model is better than that of the CAR model during the forecast period.
[0020] Furthermore, the calculation of weight values can be replaced by using the equal weight method to calculate the weight values: the equal weight method means that each prediction model has the same weight value. In the CAR-wavelet neural network combination model, there are a CAR model and a wavelet neural network model. Therefore, the two models have the same weight value: = = .
[0021] In another aspect of the present invention, a temperature prediction system of a CAR-wavelet neural network combination model for temperature derivatives is provided, the system comprising: Temperature data acquisition module, temperature data preprocessing module, temperature prediction module, temperature prediction evaluation module; The temperature data acquisition module is used to acquire temperature data of different regions; The temperature data preprocessing module includes a selection module and a processing module; The selection module is used to select temperature data and obtain temperature data of different regions, including the highest temperature, the lowest temperature, and the average temperature; The processing module is used to remove the temperature data of February 29 of a leap year from the selected temperature data, and construct a prediction set and a test set for temperature prediction; The temperature prediction module is used to predict the temperature using the CAR model, the wavelet neural network model, and the CAR-wavelet neural network combination model respectively; The temperature prediction and evaluation module is used to use prediction evaluation indicators to evaluate the temperature prediction effect of the CAR-wavelet neural network combination model with different weight value assignments under the equal weight method, the inverse residual method and the advantage matrix method.
[0022] In another aspect of the present invention, there is also provided an electronic device, comprising: at least one processor; and A memory storing instructions, which, when executed by the at least one processor, causes the at least one processor to execute a temperature prediction method for temperature derivatives as described above.
[0023] In another aspect of the present invention, a computer-readable storage medium is provided, which stores executable instructions, and when the instructions are executed, the machine executes a temperature prediction method for temperature derivatives as described above.
[0024] Compared with the prior art, the present invention has the following beneficial effects: The present invention provides a temperature prediction method and system for temperature derivatives, which use a CAR model to calculate the continuous change of temperature and the trend of greenhouse effect of temperature; introduce Fourier function into the CAR model to calculate the seasonal change of temperature, and add the mean reversion rate that changes with time into the CAR model to replace the principle of constant temperature fluctuation to calculate the volatility of temperature; at the same time, use a wavelet neural network model to predict the temperature, and optimize the wavelet neural network model by using a gradient correction method according to the wavelet relative error; combine the characteristics of the CAR model in reflecting the law of temperature change and the characteristics of the wavelet neural network model in reflecting the uncertainty of temperature, and construct a combined model of the CAR-wavelet neural network model by calculating the weight values of the two models to improve the accuracy of the model in predicting the temperature value. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a flow chart of a temperature prediction method for temperature derivatives described in the present invention.
[0026] Figure 2 It is a structural diagram of a temperature prediction system of a CAR-wavelet neural network combination model for temperature derivatives described in the present invention.
[0027] Figure 3 1 is a schematic diagram comparing the temperature value predicted by the CAR model and the actual temperature value in this embodiment 1.
[0028] Figure 4 It is a schematic diagram comparing the temperature value predicted by the wavelet neural network model in this embodiment 1 with the actual temperature value.
[0029] Figure 5 1 is a schematic diagram comparing the temperature value predicted by the CAR-wavelet neural network combination model and the actual temperature value in this embodiment 1. DETAILED DESCRIPTION
[0030] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.
[0031] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present disclosure belongs.
[0032] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present disclosure. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0033] In the absence of conflict, the embodiments in the present disclosure and the features in the embodiments may be combined with each other.
[0034] In order to solve the technical problem that the existing temperature prediction accuracy is low, the present invention provides a temperature prediction method for temperature derivatives. Based on the existing temperature prediction model, the method combines the CAR model with the wavelet neural network model to form a CAR-wavelet neural network combined model for temperature prediction, and improves the accuracy of temperature prediction through the above combined temperature prediction model.
[0035] The following is a further description of a temperature prediction method and system for temperature derivatives of the present invention in conjunction with specific embodiments.
[0036] Example 1 Ginseng Figure 1 This embodiment provides a temperature prediction method for temperature derivatives, the method comprising: S1: Obtain temperature data of different regions, and select the highest temperature, the lowest temperature and the average temperature of the obtained temperature data of different regions; Temperature data are considered as time series data with characteristics such as periodicity, seasonality, trend and randomness.
[0037] S2: Eliminate data and divide the data set: The temperature data obtained were removed from the leap year February 29th temperature data to obtain the annual daily temperature values, and then divided into a prediction set and a test set. The prediction set was used for temperature prediction, and the test set was used to test the accuracy of temperature prediction.
[0038] Preferably, in this embodiment, the prediction set is the temperature values from 2003 to 2023, and the test set is the temperature values during 2024. The present invention uses the temperature values in the prediction set to predict the temperature values during 2024, and compares them with the actual temperature values during 2024 in the test set.
[0039] S3: Input the prediction set into the CAR model and the wavelet neural network model for model training; specifically including; S31. CAR model construction and prediction: It refers to the temperature value of each day between years, that is, the temperature value of the prediction set, which shows the seasonal changes of the alternation of cold and warm temperatures between years, the periodicity and the growth trend of global warming. Among them, T represents the temperature value, day represents the date, and a year of 365 days is a large cycle, and February 29 of the leap year is excluded. For example: It means the temperature on January 31, that is, the average temperature on January 31 is 5 degrees Celsius; = + (1); In formula (1), It refers to the daily temperature value between years, T represents the temperature value, and day represents the date; Indicates the daily temperature values with seasonality and warm trend between years (the total set of seasonality and warm trend between years), It represents the daily temperature value that eliminates seasonality and warm trends between years; In the CAR model, we first calculate : = y 1 +y 2 +y 3 cos( )(2); In formula (2), y 1 ,y 2 ,y 3 ,y 4 is the seasonal and trend parameter value, which belongs to the model parameter and is obtained through model training. 1 +y 2 Used to calculate the warming trend of temperature; 3 cos( ) is used to calculate seasonal variations in temperature; Secondly, calculate : (3); In formula (3), due to It has the characteristics of autoregression, so it adopts the autoregression form, that is, ; p represents the autoregressive order, o represents the autoregressive order starting from 1; is the temperature autoregressive parameter value, which is a model parameter and is obtained through model training; represents the white noise characteristics of temperature, where represents white noise, T is the temperature value; represents the seasonal variation of the daily temperature residual value between years, where Indicates the seasonal variation of residual values; Considering that the temperature is affected by many factors, the characteristic of the mean recovery rate of the temperature is set to A, which is usually set to a constant. In the present invention, A is transformed into a variable mean recovery rate, and formula (3) becomes: (4); in: A=-log (5); In formula (5), σ represents the volatility, T represents the temperature, represents the temperature fluctuation rate; It is expressed as the temperature value with an increasing trend of (day-1) days affected by the greenhouse effect, day represents the date, Day represents the deadline, and day-1 represents (day-1) days; starting from the 1st day, specifically, the 1st day in this embodiment is January 1, 2003. When day-1=0, the formula is invalid.
[0040] Using Fourier function Modeling.
[0041] The modeling formula is expressed as: (6); In formula (6), represents the seasonal variation of the daily temperature residual value between years, represents the seasonal variation of the residual value, T represents the temperature, and k is the series of the Fourier function; The parameter values in the formula for calculating the seasonal variation of daily temperature residual values between years are obtained through model training.
[0042] The CAR model is trained by the prediction set to determine the parameter values in the CAR model, and then the temperature data of the prediction set is input into the trained CAR model to obtain the predicted temperature value set of the CAR model, that is, the temperature prediction value set of the CAR model during 2024. .
[0043] S32. Construction and training of wavelet neural network model: The wavelet neural network model is based on the BP neural network topology. It converts the transfer function of the hidden nodes of the BP neural network into a wavelet basis function, and propagates the signal forward while performing error back propagation.
[0044] The wavelet neural network model consists of an input layer, a hidden layer, and an output layer. The input layer is used to input the original data, and the hidden layer is used to represent the wavelet basis function of the hidden layer nodes. To transfer the function, the output layer is used to represent the result of the predicted output: Input layer: In the input layer, the temperature value of the prediction set is (equivalent to the training samples of the wavelet neural network model) is used as the input value of the wavelet neural network model, through the hidden layer, using the wavelet basis function.
[0045] Hidden layer: The wavelet function of the hidden layer is expressed as: h(j) = (7); In formula (7), is the wavelet basis function of the jth neuron in the hidden layer, x is the input value, i.e., the temperature value of the prediction set, i is the i-th input value, j represents the jth neuron in the hidden layer, i=1,2,3,…,q, j=1,2,3,…,m, represents the weight value from the input layer to the hidden layer neurons, q is the total number of input values, and m represents the total number of hidden layer neurons; is the wavelet basis function The translation factor, is the wavelet basis function The scaling factor; h(j) is the output value of the jth neuron in the hidden layer, that is, the predicted temperature value is output by the output layer after the wavelet function of the neurons in the hidden layer is transmitted.
[0046] After the wavelet function of the hidden layer nodes is transmitted, the predicted temperature value is output by the input layer.
[0047] Output layer: The calculation formula of the output layer is expressed as: F(u)= h(j)(8) In formula (8), F(u) is the prediction network output, is the weight value from the hidden layer to the input layer, u =1,2,3,…, n,n is the number of neurons in the output layer.
[0048] The predicted temperature value is compared with the temperature value of the test set, and the relative error of the wavelet neural network model prediction is calculated, that is, the wavelet relative error e ; e = (9); In formula (9), e represents the wavelet relative error, that is, the prediction error of the wavelet neural network model. is the expected output temperature value, that is, the actual temperature value during 2024 in the test set. The temperature value predicted by the wavelet neural network model is the temperature value predicted by the wavelet in 2024. v is the prediction start date, r is the prediction end date. In this embodiment, the prediction start date is January 1, 2024, and the prediction end date is December 31, 2024.
[0049] According to the wavelet relative error, the gradient correction method is used to continuously correct the weight value of the wavelet neural network model. The gradient correction algorithm is: +Δ (10); = +Δ (11); = +Δ (12); In formulas (10) to (12), s is used as the abbreviation of the input layer of the wavelet neural network model. To represent the weight value connecting the input layer to the hidden layer at the zth iteration, is the weight value connecting the input layer to the hidden layer at the z+1th iteration; is the wavelet basis function of the jth neuron in the hidden layer at the zth iteration The expansion factor, is the wavelet basis function of the jth neuron in the hidden layer at the z+1th iteration The expansion factor, is the wavelet basis function of the jth neuron in the hidden layer at the zth iteration The translation factor, is the wavelet basis function of the jth neuron in the hidden layer at the z+1th iteration The translation factor of .
[0050] Δ represents the error propagation partial derivative between the input layer and the hidden layer at the z+1th iteration, Δ is the wavelet basis function of the jth neuron in the hidden layer at the z+1th iteration The error propagation partial derivative of the scaling factor, Δ The wavelet basis function of the jth neuron in the hidden layer at the z+1th iteration is The error propagation partial derivative of the translation factor is calculated as: Δ =-η (13); Δ =-η (14); Δ -η (15); In formulas (13) to (15), η is the learning rate in the hidden layer of the wavelet neural network model. The learning rate is generally set at 0.001 to 0.01. The specific value of the learning rate will be adjusted according to the actual situation. represents partial derivative.
[0051] Whether the correction algorithm stops is determined by whether the temperature prediction value of the output layer after the hidden layer wavelet function calculation is close to the expected value. When the relative error between the temperature value predicted by the wavelet neural network model and the expected value tends to be stable or the difference is less than 1°C, it stops, and finally the wavelet neural network temperature prediction value set for 2024 is obtained. .
[0052] S4: Calculate the weight value according to the relative error of the temperature prediction of the CAR model and the wavelet neural network model, and build the CAR-wavelet neural network combination model; The CAR model is used to predict the calculation of the relative error value of the temperature. In this embodiment, the prediction set is the temperature values from 2003 to 2023, and the test set is the temperature values from 2024. The present invention uses the temperature values from 2003 to 2023 in the prediction set to predict the temperature values from 2024, and compares them with the actual temperature values from 2024 in the test set. Based on the CAR model, the data of the prediction set is input to predict the actual annual temperature value in the test set to obtain the CAR predicted temperature value; the CAR predicted temperature value is calculated with the actual temperature value of the test set, and the difference between the two is the relative error: Similarly, the wavelet neural network model is used to obtain the wavelet neural relative error; The relationship between the CAR model, the wavelet neural network model and the CAR-wavelet neural network model: Usually, a model can only describe the law of temperature in one aspect and cannot fully reflect the entire regular characteristics of temperature changes.
[0053] The calculation method of the combined model is:
[0054] (16); f(x) is the temperature predicted by the combined model; is the weight value of the CAR model, The weight values of the wavelet neural network model, is the temperature value predicted by the CAR model, The temperature value predicted by the wavelet neural network model.
[0055] There are three ways to calculate the weight value: The inverse mean square error method is the best.
[0056] The first is the inverse mean square error method. The inverse mean square error weighting method means that the model with smaller error is given a larger weight value, and the model with larger error is given a smaller weight value, which can improve the accuracy of the entire model. The calculation formula of the weight value is: , (17); In formula (17), v is the forecast start date, r is the forecast end date, Predict temperature values for CAR, For wavelet neural network to predict temperature value, Represents the actual temperature value, and the subtraction between the two is the relative error of the model.
[0057] The second is the advantage matrix method, which assumes a combined model consisting of two models.
[0058] The weight value algorithm formula for the first model is: = , = (18); In formula (18), It indicates the number of times that the temperature value predicted by the CAR model is better than that of the wavelet neural network model within the forecast period. Indicates the number of times the temperature value predicted by the wavelet neural network model is better than that of the CAR model during the forecast period.
[0059] The third is the equal weight method: The equal weight method means that each prediction model has the same weight value, and the algorithm is: ω = , It represents the number of single models in the combined model. In the CAR-wavelet neural network combined model, there are CAR models and wavelet neural network models, so the two models have the same weight value: = = .
[0060] S5: Repeat S1-S4 to obtain the CAR-wavelet neural network model combination model with expected accuracy: The temperature prediction of the constructed CAR-wavelet neural network combination model is performed using the prediction evaluation index, and S1-S4 are repeated until the temperature prediction accuracy of the constructed CAR-wavelet neural network combination model reaches the set accuracy threshold.
[0061] In summary, a temperature prediction method for temperature derivatives in this embodiment introduces Fourier function and time-varying mean reversion rate on the basis of CAR model, so that CAR model can calculate continuous changes in temperature, greenhouse effect trend of temperature, seasonal changes, volatility; and predicts temperature through wavelet neural network model to reflect the characteristics of temperature uncertainty, and constructs CAR-wavelet neural network combined model to predict temperature based on the relative error of temperature prediction by CAR model and wavelet neural network model, which effectively improves the accuracy of temperature prediction.
[0062] In order to reflect the accuracy of the prediction, the following indicators are used to illustrate the experimental effect of the model, including the unbiased absolute percentage error (UPAE), the standard absolute percentage error (SDAPE) and the mean absolute scaled error (MASE).
[0063] UAPE measures the total error presented by the predicted data. The smaller the UAPE value, the higher the accuracy of the model in predicting the temperature; SDAPE is mainly used to measure the stability of the model prediction. The smaller the SDAPE value, the higher the stability of the model in predicting the temperature; MASE is used to detect whether the predicted data can reflect trends and seasonality. The MASE value range is between 0 and 1. The smaller the MASE value, the stronger the model's ability to predict the temperature.
[0064] UAPE= (19); SDAPE= (20); MASE=mean (twenty one); Formula (19)~(21), represents the daily temperature value predicted by the model, N represents the total number of days, and the experimental results are shown in Table 1: Table 1: Prediction accuracy indicators of CAR model, wavelet neural network model and CAR-wavelet neural network combination
[0065] Annual comparison between the temperature values predicted by the CAR model and the actual temperature values Figure 3 As shown, the temperature values predicted by the CAR model have more discrepancies in the prediction of some days, such as the 43rd to 57th day and the 323rd to 337th day; Annual comparison between the temperature values predicted by the wavelet neural network model and the actual temperature values Figure 4 As shown, although the temperature values predicted by the wavelet neural network model have a small difference in the upper and lower limits, the daily temperature is not accurate; Annual comparison of temperature values predicted by CAR-wavelet neural network combined model and actual temperature values Figure 5 As shown in the figure, T is the actual temperature, and CAR-WNN is the temperature value predicted by the CAR-wavelet neural network combination model. It can be seen that the method of the present invention is relatively accurate in predicting the daily temperature, and the upper and lower limit errors of the daily temperature are extremely small.
[0066] In summary, it can be seen that the accuracy of the method described in this embodiment is much greater than the prediction accuracy of the CAR model and the wavelet neural network model.
[0067] Example 2 Ginseng Figure 2 ,This embodiment provides a temperature prediction system of a CAR-wavelet neural network combination model for temperature derivatives, the system comprising: a temperature data acquisition module, a temperature data preprocessing module, a temperature prediction module, and a temperature prediction evaluation module; The temperature data acquisition module is used to acquire temperature data of different regions; The temperature data preprocessing module includes a selection module and a processing module. The selection module is used to select temperature data to obtain temperature data of different regions, including the highest temperature, the lowest temperature, and the average temperature. The processing module is used to exclude the temperature data of February 29 of a leap year from the selected temperature data, and construct a prediction set and a test set for temperature prediction. The temperature prediction module is used to predict the temperature using the CAR model, the wavelet neural network model, and the CAR-wavelet neural network combination model respectively; The temperature prediction and evaluation module is used to use prediction evaluation indicators to evaluate the temperature prediction effect of the CAR-wavelet neural network combination model with different weight value assignments under the equal weight method, the inverse mean square error method and the advantage matrix method.
[0068] Example 3 This embodiment also provides a computer-readable storage medium storing executable instructions, which, when executed, cause the machine to execute the temperature prediction method and system for temperature derivatives as described above.
[0069] Specifically, a system or device equipped with a readable storage medium can be provided, on which software program codes that implement the functions of any of the above-mentioned embodiments are stored, and a computer or processor of the system or device can read and execute instructions stored in the readable storage medium.
[0070] In this case, the program code itself read from the computer-readable medium can realize the function of any one of the above embodiments, and thus the computer-readable code and the computer-readable storage medium storing the computer-readable code constitute part of this specification.
[0071] Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tapes, non-volatile memory cards, and ROMs. Optionally, the program code may be downloaded from a server computer or a cloud via a communication network.
[0072] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0073] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0074] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0075] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0076] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the technical solution of the present invention, and are not intended to limit the specific implementation methods of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the claims of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. A temperature prediction method for temperature derivatives, characterized in that: The method comprises: S1: Obtain temperature data in different regions; S2: Remove the temperature data on February 29th of leap years from the acquired temperature data to obtain the daily temperature values between years, and divide them into a prediction set and a test set. The prediction set is used for temperature prediction, and the test set is used to test the accuracy of temperature prediction. S3: Input the prediction set into the CAR model and the wavelet neural network model for model training; S4: Calculate the weight values of each according to the relative errors of the temperature prediction of the trained CAR model and the wavelet neural network model, and construct a CAR-wavelet neural network combination model; S5: Use the prediction evaluation index to predict the temperature of the constructed CAR-wavelet neural network combination model, and repeat S1-S4 until the temperature prediction accuracy of the constructed CAR-wavelet neural network combination model reaches the set accuracy threshold.
2. A temperature prediction method for temperature derivatives according to claim 1, characterized in that: The S3 includes the construction and training of the CAR model: = + (1); In formula (1), It refers to the daily temperature value between years, T represents the temperature value, and day represents the date; Indicates the temperature values with seasonality and warm trends every day between years; It represents the daily temperature value that eliminates seasonality and warm trends between years; In the CAR model, we first calculate : =y1+y2 +y3cos( )(2); In formula (2), y1, y2, y3, and y4 are seasonal and trend parameter values, which belong to model parameters. Used to calculate the warming trend of temperature; y3cos( ) is used to calculate seasonal variations in temperature; Secondly, calculate : (3); In formula (3), p represents the autoregressive order, and o represents that the autoregressive order starts from 1; is the temperature autoregressive parameter value, which is a model parameter and is obtained through model training; Represents the white noise characteristics of temperature, where T is the temperature value, represents white noise; represents the seasonal variation of the daily temperature residual value between years, where Indicates the seasonal variation of residual values; The characteristic of the mean recovery rate of temperature is set to A, which changes from a constant to a variable mean recovery rate, and formula (3) becomes: (4); in: A=-log (5); In formula (5), σ represents the volatility, T represents the temperature, represents the temperature fluctuation rate; It is expressed as the temperature value with an increasing trend of (day-1) days caused by the greenhouse effect, where day represents date, Day represents the deadline, and day-1 represents (day-1) days; Using Fourier function Conduct modeling; The modeling formula is expressed as: (6); In formula (6), represents the seasonal variation of the daily temperature residual value between years, represents the seasonal variation of the residual value, T represents the temperature, and k is the series of the Fourier function; is the parameter value in the formula for seasonal variation of daily temperature residual values between years, obtained through model training.
3. A temperature prediction method for temperature derivatives according to claim 1 or 2, characterized in that: The S3 also includes the construction and training of the wavelet neural network model: The wavelet neural network model includes input layer, hidden layer and output layer: Input layer: In the input layer, the temperature value of the prediction set is As the input value of the wavelet neural network model, through the hidden layer, the wavelet basis function is used; Hidden layer: The wavelet function of the hidden layer is expressed as: h(j)= (7); In formula (7), is the wavelet basis function of the jth neuron in the hidden layer, x is the input value, i.e., the temperature value of the prediction set, i is the i-th input value, j represents the jth neuron in the hidden layer, i=1,2,3,…,q, j=1,2,3,…,m, represents the weight value from the input layer to the hidden layer neurons, q is the total number of input values, and m represents the total number of hidden layer neurons; is the wavelet basis function The translation factor, is the wavelet basis function The scaling factor; h(j) is the output value of the jth neuron in the hidden layer, that is, the predicted temperature value is output by the output layer after the wavelet function of the neurons in the hidden layer is transmitted; The calculation formula of the output layer is expressed as: h(j)(8); In formula (8), F( u ) is the prediction network output, is the weight value from the hidden layer to the input layer, u =1,2,3,…, n,n is the number of neurons in the output layer; Compare the predicted temperature value with the temperature value of the test set and calculate the relative error of the wavelet neural network model prediction e ; (9); In formula (9), e It represents the wavelet relative error, that is, the relative error of the wavelet neural network model prediction. is the expected output temperature value, i.e. the actual temperature value in the test set. is the temperature value predicted by the wavelet neural network model. v is the forecast start date, r is the forecast end date; According to the wavelet relative error e , the gradient correction method is used to continuously correct the weight value of the wavelet neural network model. The gradient correction algorithm is: +D (10); = +D (11); = +D (12); In formulas (10) to (12), s is used as the abbreviation of the input layer of the wavelet neural network model. represents the weight value connecting the input layer to the hidden layer at the zth iteration, is the weight value connecting the input layer to the hidden layer at the z+1th iteration, is the wavelet basis function of the jth neuron in the hidden layer at the zth iteration The expansion factor, is the wavelet basis function of the jth neuron in the hidden layer at the z+1th iteration The expansion factor, is the wavelet basis function of the jth neuron in the hidden layer at the zth iteration The translation factor, is the wavelet basis function of the jth neuron in the hidden layer at the z+1th iteration The translation factor of Δ represents the error propagation partial derivative between the input layer and the hidden layer at the z+1th iteration, Δ is the wavelet basis function of the jth neuron in the hidden layer at the z+1th iteration The error propagation partial derivative of the scaling factor, Δ The wavelet basis function of the jth neuron in the hidden layer at the z+1th iteration is The error propagation partial derivative of the translation factor is calculated as: D =-h (13); D =-h (14); D -or (15); In formulas (13) to (15), η is the learning rate in the hidden layer of the wavelet neural network model, which is adjusted according to the actual situation. represents partial derivative; When the relative error between the temperature value predicted by the wavelet neural network model and the expected value tends to be stable or the difference is less than 1°C, the prediction is stopped.
4. A temperature prediction method for temperature derivatives according to claim 3, characterized in that: The S4 specifically includes: Based on the CAR model, the data of the prediction set is input to predict the actual annual temperature value in the test set to obtain the CAR predicted temperature value. The CAR predicted temperature value is calculated with the actual temperature value of the test set, and the difference between the two is the CAR relative error: Based on the wavelet neural network model, the data of the prediction set is input to predict the actual annual temperature value in the test set, and the wavelet neural network predicted temperature value is obtained. The wavelet neural network predicted temperature value is calculated with the actual temperature value of the test set, and the difference between the two is the wavelet neural network relative error; The calculation method of the combined model is: (16); f(x) is the temperature value predicted by the combined model; is the weight value of the CAR model, is the weight value of the wavelet neural network model, is the temperature value predicted by the CAR model, The temperature value predicted by the wavelet neural network model; The weight values are calculated using the inverse mean square error method: 、 (17); In formula (17), v is the forecast start date, r is the forecast end date, Predict temperature values for CAR, For wavelet neural network to predict temperature value, Indicates the actual temperature value.
5. A temperature prediction method for temperature derivatives according to claim 4, characterized in that: The calculation of weight values can be replaced by using the advantage matrix method to calculate the weight values: The weight value algorithm formula for the model is: = 、 = (18); In formula (18), It indicates the number of times that the temperature value predicted by the CAR model is better than that of the wavelet neural network model within the forecast period. Indicates the number of times the temperature value predicted by the wavelet neural network model is better than that of the CAR model during the forecast period.
6. A temperature prediction method for temperature derivatives according to claim 4, characterized in that: Calculate the weight values instead using the equal weight method: The equal weight method means that each prediction model has the same weight value. In the CAR-wavelet neural network combination model, there are CAR model and wavelet neural network model, so the two models have the same weight value: = = .
7. A temperature prediction system for temperature derivatives, characterized in that: The system comprises: Temperature data acquisition module, temperature data preprocessing module, temperature prediction module, temperature prediction evaluation module; The temperature data acquisition module is used to acquire temperature data of different regions; The temperature data preprocessing module includes a selection module and a processing module: The selection module is used to select temperature data and obtain temperature data of different regions, including the highest temperature, the lowest temperature, and the average temperature; The processing module is used to remove the temperature data of February 29 of a leap year from the selected temperature data, and construct a prediction set and a test set for temperature prediction; The temperature prediction module is used for the prediction of temperature by the CAR model, the wavelet neural network model and the CAR-wavelet neural network combination model; The temperature prediction and evaluation module is used to predict the temperature of the CAR-wavelet neural network combination model with different weight values and perform accuracy detection.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores executable instructions, which, when executed, cause the machine to execute a temperature prediction method for temperature derivatives as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Regional air temperature prediction method based on deep space-time network
CN115510767A
Preparation method for ground-based observation air temperature space-time data set
CN104239706A
A public parking lot parking demand prediction method based on a neural network
CN109886459A
Electronic apparatus and image processing method thereof
EP3734546A1