Method and device for formulating power transaction strategy

By preprocessing and predictive model training of power transaction-related data and formulating power trading strategies based on risk assessment results, the problems of insufficient prediction accuracy and difficulty in strategy formulation in the power transaction field are solved, and the accuracy and benefits of transactions are improved.

CN119671622APending Publication Date: 2025-03-21HUANENG JIANGSU COMPREHENSIVE ENERGY SERVICE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411740157.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The power trading field faces problems of insufficient forecast accuracy and difficulty in formulating strategies, which affects loss of returns and market stability.

Method used

By obtaining data related to power transactions for preprocessing, determining prediction tasks and selecting corresponding prediction algorithm models for training, using the trained model for prediction, and formulating power trading strategies based on risk assessment results.

Benefits of technology

It improves the prediction accuracy of key indicators in the power market, formulates effective power trading strategies, and reduces the risks of loss of returns and market instability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119671622A_ABST
    Figure CN119671622A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electricity transaction, and particularly provides an electricity transaction strategy making method and device, and the method comprises the steps: obtaining data related to electricity transaction, and carrying out the preprocessing of the data; determining prediction tasks of the power transaction, selecting corresponding prediction algorithm models according to different prediction tasks, and training the prediction algorithm models by using the preprocessed data; performing corresponding prediction by adopting the trained prediction algorithm model to obtain a prediction result; performing risk assessment on the power transaction to obtain a risk assessment result; and formulating a power transaction strategy according to the prediction result and the risk assessment result. Therefore, the prediction algorithm model is selected according to the prediction task to perform corresponding prediction, and the power transaction strategy is formulated according to the prediction result and the risk assessment result, so that the power prediction accuracy is improved, and the effective power transaction strategy is formulated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power trading, and in particular to a method for formulating a power trading strategy and a device for formulating a power trading strategy. Background Art

[0002] Power trading activities are becoming more frequent and more complex. The success of power trading depends largely on the accurate prediction of power market dynamics and the formulation of efficient strategies. However, the current power trading field mainly faces the following challenges and pain points:

[0003] Insufficient forecasting accuracy: Key indicators of the electricity market, such as price, load, and renewable energy output, are affected by a variety of complex factors, and the coupling relationship between these factors is complex, making it difficult to improve forecasting accuracy.

[0004] Difficulty in strategy formulation: Due to the complexity and uncertainty of the power market, it is particularly difficult to formulate effective trading strategies. Incorrect declaration strategies may lead to loss of revenue and even affect the stable operation of the power market.

[0005] Therefore, how to accurately predict the key indicators of the electricity market and formulate effective trading strategies has become an urgent problem to be solved in the current electricity trading field. Summary of the invention

[0006] In order to solve one of the above technical problems, the present invention proposes the following technical solution.

[0007] The first aspect of the embodiment of the present invention proposes a method for formulating an electricity trading strategy, comprising the following steps: obtaining data related to electricity trading and preprocessing the data; determining the prediction task of electricity trading, selecting a corresponding prediction algorithm model according to different prediction tasks, and using the preprocessed data to train the prediction algorithm model; using the trained prediction algorithm model to perform corresponding predictions to obtain prediction results; performing risk assessment on electricity trading to obtain risk assessment results; and formulating an electricity trading strategy based on the prediction results and the risk assessment results.

[0008] In addition, the method for formulating an electricity trading strategy according to the above embodiment of the present invention may also have the following additional technical features.

[0009] According to one embodiment of the present invention, the method for formulating an electricity trading strategy further includes: evaluating the electricity trading strategy to obtain a strategy evaluation result; and adjusting the prediction algorithm model and / or the electricity trading strategy according to the strategy evaluation result.

[0010] According to one embodiment of the present invention, the data related to power trading includes NWP (Numerical Weather Prediction) data, meteorological data, energy data, site location data and user-defined data.

[0011] According to one embodiment of the present invention, the forecasting task includes at least one of market trend forecasting, price forecasting, price fluctuation forecasting, price difference forecasting, load forecasting, energy production forecasting and energy demand forecasting.

[0012] According to one embodiment of the present invention, corresponding prediction algorithm models are selected according to different prediction tasks, including: when the prediction task includes energy prediction, a deep learning model is used as the prediction algorithm model, wherein the deep learning model includes a long short-term memory network model and a graph convolutional network model; when the prediction task includes price prediction, a hybrid model based on factor decomposition technology and a constrained optimization algorithm is used as the prediction algorithm model; when the prediction task includes price difference prediction, a hybrid model based on a time series analysis model and a dynamic regression model is used as the prediction algorithm model; wherein the prediction algorithm model is an integrated learning model, and the prediction algorithm model is trained using a cross-validation method.

[0013] According to one embodiment of the present invention, the prediction results include a day-ahead price prediction curve, the risk assessment results include a spot trading risk assessment result, and the trading strategy includes a spot volume quotation strategy and a risk control strategy, wherein the spot trading risk assessment result is determined based on price volatility risk, supply and demand change risk, market liquidity risk and policy risk assessment.

[0014] According to one embodiment of the present invention, an electricity trading strategy is formulated based on the prediction result and the risk assessment result, including: analyzing the trend of the day-ahead price prediction curve; if the day-ahead price prediction curve is rising and the spot trading risk assessment result is within a first acceptable range, increasing the spot quotation volume and setting a first stop loss point; if the day-ahead price prediction curve is falling and the spot trading risk assessment result reaches a first risk threshold, reducing the spot quotation volume or performing a reverse operation, and setting a second stop loss point and a first profit stop point, wherein the first risk threshold is not within the first acceptable range and is greater than the maximum value of the first acceptable range; if the day-ahead price prediction curve is oscillating, maintaining the preset quotation volume and paying attention to market dynamics, and setting a third stop loss point and a second profit stop point, wherein the first stop loss point, the second stop loss point and the third stop loss point are different, and the first profit stop point is different from the second profit stop point.

[0015] According to one embodiment of the present invention, the prediction results include a medium- and long-term price prediction curve, the risk assessment results include a medium- and long-term trading risk assessment result, and the trading strategy includes a medium- and long-term position management strategy and a risk control strategy, wherein the medium- and long-term trading risk assessment result is determined based on market volatility risk, policy risk, business operation risk and macroeconomic risk assessment.

[0016] According to one embodiment of the present invention, an electricity trading strategy is formulated based on the prediction result and the risk assessment result, including: analyzing the trend of the medium- and long-term forecast price forecast curve; if the trend of the medium- and long-term forecast price forecast curve is rising and the medium- and long-term trading risk assessment result is within the second acceptable range, increasing the position ratio and setting a fourth stop loss point and a third stop profit point; if the trend of the medium- and long-term forecast price forecast curve is falling or the medium- and long-term trading risk assessment result reaches the second risk threshold, reducing the position ratio or closing the position, and setting a fifth stop loss point and a fourth stop profit point, wherein the second risk threshold is not within the second acceptable range and is greater than the maximum value of the second acceptable range; if the trend of the medium- and long-term forecast price forecast curve is stable and the medium- and long-term trading risk assessment result is within the second acceptable range, maintaining the existing position ratio and paying attention to market dynamics, and setting a sixth stop loss point and a fifth stop profit point, wherein the fourth stop loss point, the fifth stop loss point and the sixth stop loss point are different, and the third stop profit point, the fourth stop profit point and the fifth stop profit point are different from the fifth stop profit point

[0017] The second aspect of the embodiment of the present invention proposes a device for formulating electricity trading strategies, including: an acquisition module, used to acquire data related to electricity trading and pre-process the data; a training module, used to determine the prediction task of electricity trading, select the corresponding prediction algorithm model according to different prediction tasks, and use the pre-processed data to train the prediction algorithm model; a prediction module, used to use the trained prediction algorithm model to perform corresponding predictions to obtain prediction results; a risk assessment module, used to perform risk assessment on electricity trading to obtain risk assessment results; a formulation module, used to formulate electricity trading strategies based on the prediction results and the risk assessment results.

[0018] The technical solution of the embodiment of the present invention selects a prediction algorithm model according to the prediction task to perform corresponding predictions, and formulates an electricity trading strategy based on the prediction results and risk assessment results, which is conducive to improving the accuracy of electricity predictions and formulating effective electricity trading strategies. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 The present invention is a flowchart of a method for formulating a power trading strategy according to an embodiment of the present invention.

[0020] Figure 2This is an example of a price and forecast analysis flow chart for the electricity trading market of the present invention.

[0021] Figure 3 A block diagram of a device for formulating a power trading strategy according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0023] The embodiment of the present invention proposes a method for formulating a power trading strategy, aiming to solve the above pain points. The method can achieve accurate prediction of power market prices, loads, and new energy output, and formulate effective power trading strategies based on the prediction results. The specific architecture of the system is as follows:

[0024] Core components: Integrates advanced data analysis engine and optimization algorithm platform, supports multiple mathematical programming and machine learning technologies. Utilizes multi-source data (such as NWP (Numerical Weather Prediction), meteorological, energy and geographic information data), as well as user-defined data as information resources. The data analysis engine has powerful data processing capabilities and can efficiently process large amounts of information; the optimization algorithm platform can solve optimization problems with complex constraints and find solutions within a reasonable time. The quality and accuracy of information resources meet industry standards to ensure the reliability of algorithm models.

[0025] Functional modules: Provides market trend forecasting, real-time data analysis, price fluctuation forecasting, energy production forecasting, energy demand forecasting, user behavior forecasting and other forecasting functions. Including market strategy formulation, transaction effect evaluation, long-term market trend analysis, asset management and other strategic planning related modules.

[0026] Figure 1 The present invention is a flowchart of a method for formulating a power trading strategy according to an embodiment of the present invention.

[0027] like Figure 1 As shown, the method for formulating the power trading strategy includes the following steps S1 to S5.

[0028] S1, obtains data related to power trading and preprocesses it.

[0029] Among them, data related to electricity trading include NWP (Numerical Weather Prediction) data, meteorological data (from various meteorological agencies), energy data (regional wind power and photovoltaic output data and other energy data), site location data and user-defined data.

[0030] Specifically, first collect relevant data and preprocess the collected data, including data cleaning, format conversion and other operations, to make it suitable for the input requirements of the prediction algorithm model. Specifically, the following steps are included:

[0031] S101, establish data acquisition connections with various meteorological agencies. Understand and follow the data interface specifications and data transmission protocols provided by various agencies. For example, some agencies may provide a web service-based interface that uses a specific request and response format (such as XML or JSON) for meteorological data interaction.

[0032] S102, negotiate with the energy market / enterprise to determine the data format (such as CSV format, database table structure, etc.) and transmission method (such as transmission via the network, regular provision of data files, etc.). Ensure that energy data can be accurately and timely transmitted to the data collection system.

[0033] S103 integrates the wind power and photovoltaic output data obtained from different energy companies and stores them in a local database. During the integration process, the data needs to be labeled, and the station name, timestamp and other information of the data source need to be noted for subsequent analysis.

[0034] S104: Perform integrity check to check whether there is any missing data. For missing data, record the data set, field, and corresponding timestamp information for subsequent processing.

[0035] S105, identifying abnormal values ​​in the data by setting a reasonable range of data and statistical methods. For example, for temperature data, if its value exceeds the local historical extreme value range or does not conform to physical common sense (such as below absolute zero), it will be marked as abnormal data.

[0036] S106: For abnormal data, the cause of the abnormal data may be further analyzed, which may be caused by data collection error, transmission error or real extreme weather conditions. Appropriate treatment measures may be taken according to different causes.

[0037] S107, check whether there are duplicate data records in the data set. If there are duplicate data, decide to keep the latest data record or merge the duplicate data according to factors such as the importance of the data and the timestamp.

[0038] S108, unify the data formats of different data sources. For example, unify the temperature data obtained from different meteorological agencies into Celsius format, unify the timestamp into a specific date and time format (such as YYYY-MM-DD, HH:MM:SS), and unify the wind power and photovoltaic output data into a specific power unit (such as megawatt).

[0039] S109, the data storage format may also be unified according to the requirements of the algorithm model, such as storing all data in a CSV file format or in a database table with a specific structure.

[0040] S110, if there is a character encoding problem in the data (such as data collection in different language environments may result in inconsistent character encoding), perform character encoding conversion to ensure that the data can be correctly displayed and processed. For example, convert UTF-8 encoded text data to ASCII encoding if necessary.

[0041] S111, feature scaling is performed on the data to make different features comparable. For example, for meteorological elements such as temperature and wind speed and data such as wind power and photovoltaic output, a standardized method is used to map their values ​​to a specific interval (such as the [0,1] interval).

[0042] S112, commonly used feature scaling methods include the minimum-maximum normalization method, and its calculation formula is:

[0043]

[0044] Where x is the original data value, min(x) is the minimum value of the feature, max(x) is the maximum value of the feature, and x new is the new value after normalization.

[0045] S113, normalizing the data according to the requirements of the prediction algorithm model. The purpose of normalization is to make the mean of the data 0 and the variance 1. For example, for some machine learning algorithms, the normalized data can improve the operation efficiency and accuracy of the algorithm.

[0046] S114, the commonly used normalization method is Z-normalization, and its calculation formula is:

[0047]

[0048] Among them, x is the original data value, μ is the mean of the feature, σ is the standard deviation of the feature, and z is the new value after normalization.

[0049] Through the above data collection and preprocessing implementation plan and calculation steps, it can be ensured that the collected NWP data, meteorological data, regional wind power and photovoltaic output data, site location data and other relevant energy data and custom data meet the input requirements of the prediction algorithm model after preprocessing, thereby providing a reliable data basis for the accurate operation of the power trading algorithm.

[0050] S2, determine the prediction task of power trading, select the corresponding prediction algorithm model according to different prediction tasks, and train the prediction algorithm model.

[0051] The forecasting tasks include at least one of market trend forecasting, real-time price forecasting, price fluctuation forecasting, load forecasting, energy production forecasting and energy demand forecasting.

[0052] The prediction algorithm model is an ensemble learning model (obtained by combining multiple or various different models or sub-learners using an ensemble learning method). The prediction algorithm model is trained using a cross-validation method.

[0053] Specifically, according to different forecasting tasks (such as price forecasting, new energy output forecasting, load forecasting, etc.), select the corresponding forecasting algorithm model (such as deep learning model, machine learning model, etc. or a combination of different models). Use preprocessed data, meteorological, wind power, photovoltaic, electricity consumption and other data as input, weather, load, price and other data as output, train the forecasting algorithm model, and adjust the model parameters to improve the forecasting accuracy. And optimize the trained model, such as using ensemble learning methods to improve the forecasting accuracy, and prevent overfitting through cross-validation and other technologies.

[0054] Specifically, model training and optimization are performed through the following steps:

[0055] S201, divide the preprocessed data set into a training set, a validation set, and a test set according to a certain ratio. Generally speaking, the training set accounts for 60%-80%, the validation set accounts for 10%-20%, and the test set accounts for 10%-20%. For example, for a data set with 1,000 samples, 600 samples can be used as a training set, 200 samples as a validation set, and 200 samples as a test set. Ensure that the divided data set is representative in terms of data distribution, that is, the training set, validation set, and test set can reflect the characteristics and rules of the original data set.

[0056] S202, initialize the parameters of the model according to the type of the selected model. For deep learning models, a random initialization method is usually used to randomly generate parameters such as weights and biases of the model within a certain range of values. For example, for an MLP (Multilayer Perceptron) model, the weights can be randomly initialized in the interval of [-0.1, 0.1]. Some advanced initialization methods, such as Xavier initialization, He initialization, etc., can also be selected according to the structure and characteristics of the model to improve the training effect of the model.

[0057] S203, define a suitable loss function according to the target of the prediction task. For regression tasks (such as price prediction, new energy output prediction, load prediction, etc.), commonly used loss functions include mean square error (MSE), mean absolute error (MAE), etc.

[0058] Taking mean square error (MSE) as an example, its calculation formula is:

[0059]

[0060] Where n is the number of samples, y i is the true value, is the predicted value.

[0061] S204, select a suitable optimization algorithm to adjust the parameters of the model to minimize the loss function. Common optimization algorithms include stochastic gradient descent (SGD) and its variants, such as Adagrad, Adadelta, Adam, etc. The Adam optimization algorithm is a commonly used adaptive learning rate optimization algorithm that combines the advantages of Adagrad and Adadelta. In most cases, it can converge quickly and achieve good optimization results. Its formula is as follows:

[0062] m t =β 1 m t-1 +(1-β 1 ) t

[0063]

[0064] Among them, m t and t are the first-order moment estimate and the second-order moment estimate at the t-th step, respectively. and are the first-order momentum and second-order momentum of gradient descent, β 1 and β 2 is a hyperparameter, g t is the gradient at step t, θ tis the model parameter at the tth step, α is the learning rate, and ∈ is a small positive number used to prevent the denominator from being zero.

[0065] S205, train the model using the training set, calculate the gradient of the loss function with respect to the model parameters in each round of training, and then update the model parameters using the selected optimization algorithm. For example, for a model using the Adam optimization algorithm, update the model parameters according to the above formula.

[0066] S206, repeat the training process until a stop condition is met. The stop condition may be that a predetermined number of training rounds (such as 100 rounds) is reached, or the loss function value on the validation set no longer decreases (ie, reaches a convergence state).

[0067] S207, using ensemble learning methods to improve prediction accuracy. Ensemble learning is to combine multiple different models together, and integrate their prediction results in a certain way to obtain more accurate predictions. Common ensemble learning methods include bagging, boosting, and random forest. Taking random forest as an example, it is an ensemble learning method based on bagging, which obtains the final prediction result by constructing multiple decision trees and averaging their prediction results. Different types of models (such as deep learning models and machine learning models) can be combined together and integrated through bagging or boosting. For example, multiple multilayer perceptron MLP (MultilayerPerceptron) models and multiple support vector machine SVM (Support Vector Machine) models are combined together and integrated using bagging to obtain a comprehensive prediction algorithm model.

[0068] S208, prevent overfitting through cross-validation and other techniques. Cross-validation is an effective method for evaluating model performance and selecting model parameters. Common cross-validation methods include K-fold cross validation.

[0069] Taking K-fold cross validation as an example, the data set is divided into K subsets of similar size (such as K = 5), and K-1 subsets are used as training sets each time, and the remaining subset is used as the validation set. Repeat K times so that each subset has a chance to be used as a validation set. Calculate the loss function value on each validation set and take the average value as the validation loss of the model. By observing the changes in the validation loss, determine whether the model is overfitting. If the validation loss continues to decrease during the training process, but the performance on the test set is poor, it means that the model is overfitting.

[0070] According to the results of cross-validation, adjust the parameters of the model (such as increasing or decreasing the number of model layers, adjusting the learning rate, etc.) to improve the performance of the model and prevent overfitting.

[0071] S3, using the trained prediction algorithm model to perform corresponding predictions to obtain prediction results.

[0072] Specifically, data related to the current transaction is obtained and input into the trained prediction algorithm model to obtain corresponding prediction results, such as price prediction results, energy prediction results, etc.

[0073] S4, conducting risk assessment on power transactions to obtain risk assessment results.

[0074] Specifically, risk assessment of electricity trading is performed based on forecasting tasks such as price forecasting and taking relevant factors into consideration.

[0075] S5, formulate power trading strategies based on the prediction results and risk assessment results.

[0076] Among them, power trading strategy refers to the relevant strategies formulated for realizing power trading, including declaration strategy and risk control strategy. Declaration strategy includes spot volume declaration strategy and medium- and long-term position management strategy, etc. Risk control strategy refers to the strategy formulated to control risks and prevent high risks, including risk control indicators such as stop loss point and take profit point.

[0077] Specifically, according to the prediction results (such as price prediction results) and risk assessment results, the declaration strategy and risk control strategy are formulated. The algorithm automatically participates in spot market transactions, and the transaction process is reviewed and analyzed to continuously adjust and optimize the transaction strategy.

[0078] Therefore, the method for formulating power trading strategies of the embodiments of the present invention selects a prediction algorithm model according to the prediction task to perform corresponding predictions, and formulates power trading strategies based on the prediction results and risk assessment results, which is conducive to improving the accuracy of power predictions and formulating effective power trading strategies.

[0079] In one embodiment of the present invention, in step S2, selecting a corresponding prediction algorithm model according to different prediction tasks may include: when the prediction task includes energy prediction, using a deep learning model as the prediction algorithm model, wherein the deep learning model includes a long short-term memory network model and a graph convolutional network model; when the prediction task includes price prediction, using a hybrid model based on factor decomposition technology and a constrained optimization algorithm as the prediction algorithm model; when the prediction task includes price difference prediction, using a hybrid model based on a time series analysis model and a dynamic regression model as the prediction algorithm model.

[0080] Among them, the prediction algorithm model is an integrated learning model, and the cross-validation method is used to train the prediction algorithm model.

[0081] Specifically, when the forecasting task includes energy forecasting, such as new energy output forecasting, regional new energy forecasting technology based on deep learning is used for forecasting, and the forecasting algorithm model may include at least one long short-term memory (LSTM) network model and / or graph convolutional network (GCN) model, and the LSTM network or GCN is used to model the time series data. The LSTM network can effectively capture long-term dependencies in time series, and is particularly suitable for energy types with large fluctuations such as wind and solar energy. Combined with the GCN model, data from different meteorological stations and power generation equipment in the region can be further integrated to explore spatial correlations and improve forecasting accuracy.

[0082] When the forecasting task includes price forecasting, the forecasting algorithm model includes a hybrid model based on factor decomposition technology and constrained optimization algorithm. This forecasting method combines factor decomposition technology and constrained optimization algorithm to improve the forecasting accuracy of electricity prices. First, the key factors affecting electricity price fluctuations, including market supply and demand, meteorological data, power generation output, etc., are extracted through factor decomposition technology, and the potential relationship between factors is identified using matrix decomposition method. Then, a mathematical model of electricity prices is established using constrained optimization algorithms (such as linear programming and quadratic programming), and the weights and mutual constraints of each factor are optimized to ensure the rationality and stability of the forecast results in different market scenarios.

[0083] When the forecasting task includes price difference forecasting, the forecasting algorithm model includes a hybrid model based on the time series analysis model and the dynamic regression model. Based on the time series analysis and dynamic regression model, key features are extracted by analyzing the historical data of the day-ahead market and the real-time market electricity prices, load fluctuations and meteorological conditions. The sliding window technology is used to capture short-term fluctuation trends, and combined with machine learning regression models (such as decision trees and support vector machines) for training to predict the price difference between the two. At the same time, through the real-time data feedback mechanism, the forecasting model is dynamically adjusted to ensure that it can cope with sudden fluctuations in the market. This method is suitable for accurate market scheduling and trading decisions.

[0084] Therefore, by selecting the corresponding prediction algorithm model for different prediction tasks and optimizing it, the accuracy of the prediction algorithm model can be improved, thereby solving the situation where the prediction accuracy is difficult to improve due to a variety of complex factors and improving the prediction accuracy.

[0085] In a specific example of the present invention, the declaration strategy may include a spot trading strategy and a medium- and long-term trading strategy. The following uses the spot trading strategy and the medium- and long-term trading strategy as examples to illustrate the specific trading strategy formulation method.

[0086] In the first example, the forecast results include the day-ahead price forecast curve, the risk assessment results include the spot trading risk assessment results, and the trading strategies include the spot volume quotation strategy and the risk control strategy, wherein the spot trading risk assessment results are determined based on the price volatility risk, supply and demand change risk, market liquidity risk and policy risk assessment.

[0087] Further, step S5, i.e. formulating an electricity trading strategy based on the prediction results and risk assessment results, may include: analyzing the trend of the day-ahead price prediction curve; if the day-ahead price prediction curve shows an upward trend and the spot trading risk assessment result is within the first acceptable range (indicating that the risk is acceptable), then increasing the spot quotation and setting a first stop loss point; if the day-ahead price prediction curve shows a downward trend and the spot trading risk assessment result reaches the first risk threshold (indicating that the risk is relatively high), then reducing the spot quotation or performing a reverse operation, and setting a second stop loss point and a first profit stop point, wherein the first risk threshold is not within the first acceptable range and is greater than the maximum value of the first acceptable range; if the day-ahead price prediction curve shows an oscillating trend, then maintaining the preset quotation and paying attention to market dynamics, and setting a third stop loss point and a second profit stop point, wherein the first stop loss point, the second stop loss point and the third stop loss point are different, the first profit stop point is different from the second profit stop point, and the preset guaranteed volume is 70%-90% of the normal level of quotation.

[0088] Among them, the first risk threshold, the first to third stop loss points, and the first and second stop profit points are respectively specific risk thresholds, stop loss points, and stop profit points set in advance according to actual requirements.

[0089] Specifically, the spot trading strategy is formulated through the following steps S501 to S503:

[0090] S501, price forecast analysis: obtain the spot price forecast results output by the price forecast model, including the day-ahead price forecast and the real-time price forecast. Analyze the trend of the price forecast curve to determine the price trend (increase, decrease or fluctuation) as well as the key price turning points and fluctuation range. For example, if the day-ahead price forecast shows that the price will rise first and then fall in the next 24 hours, and the increase will be larger and the decrease will be smaller, this will provide an important basis for the subsequent volume reporting strategy.

[0091] S502, Risk Assessment: Assess the risks of spot market transactions. Factors to be considered include price volatility risk (measured by calculating the standard deviation or volatility of prices), supply and demand change risk (analyzing the impact of changes in regional renewable energy output and load demand on prices), market liquidity risk (observing market trading volume and trading activity) and policy risk (paying attention to the impact of changes in energy policies on the power market), and conduct risk assessment on the price difference forecast results.

[0092] S503, spot volume quotation strategy determination: formulate spot volume quotation strategy and risk control strategy based on price forecast results and spot transaction risk assessment results.

[0093] If the price is expected to rise and the risk is within the first acceptable range, increase the spot quotation and set the stop loss point as the first stop loss point. The specific quotation quantity can be determined according to the price increase, your own risk tolerance and market expectations. For example, if the price is expected to rise by 10%, your own risk tolerance is strong and the market expectations are optimistic, you can consider increasing the quotation by 20%-30%. At the same time, set a reasonable first stop loss point, which can generally be set at a certain percentage below the cost price (such as 5%-10%) to prevent a sudden price reversal from causing significant losses.

[0094] If the price is predicted to fall and the risk is high, reduce the bid volume or consider the opposite operation (if the market allows short selling), and set the stop loss point and the take profit point as the second stop loss point and the first stop profit point respectively. For example, if the price is expected to fall by 15%, reduce the bid volume to 50%-70% of the normal level, or in a market where short selling is allowed, determine the short selling volume based on risk assessment, but pay attention to setting reasonable take profit points and stop loss points.

[0095] If the price fluctuates, keep the preset quotation volume and pay close attention to market dynamics, and set the stop loss point and take profit point as the third stop loss point and the second stop profit point respectively. The quotation volume can be maintained at 70%-90% of the normal level, and a narrow stop loss and take profit range can be set to capture the small profits brought by price fluctuations in time and control risks.

[0096] In the second example, the forecast results include the medium- and long-term price forecast curve, the risk assessment results include the medium- and long-term trading risk assessment results, and the trading strategies include the medium- and long-term position management strategies and risk control strategies, wherein the medium- and long-term trading risk assessment results are determined based on the market volatility risk, policy risk, business operation risk and macroeconomic risk assessment.

[0097] Furthermore, an electricity trading strategy is formulated based on the forecast results and risk assessment results, including: analyzing the trend of the medium- and long-term forecast price forecast curve; if the trend of the medium- and long-term forecast price forecast curve is rising and the medium- and long-term trading risk assessment result is within the second acceptable range (indicating that the risk is acceptable), and the fourth stop loss point and the third stop profit point are set, then the position ratio is increased; if the trend of the medium- and long-term forecast price forecast curve is falling or the medium- and long-term trading risk assessment result reaches the second risk threshold (indicating that the risk is high), then the position ratio is reduced or the position is closed, and the fifth stop loss point and the fourth stop profit point are set, wherein the second risk threshold is not within the second acceptable range and is greater than the maximum value of the second acceptable range; if the trend of the medium- and long-term forecast price forecast curve is stable and the medium- and long-term trading risk assessment result is within the second acceptable range, then the existing position ratio is maintained and market dynamics are paid attention to, and the sixth stop loss point and the fifth stop profit point are set, wherein the fourth stop loss point, the fifth stop loss point and the sixth stop loss point are different, and the third stop profit point, the fourth stop profit point and the fifth stop profit point are different.

[0098] The second risk threshold, the fourth to sixth stop loss points, and the third to fifth stop profit points are specific risk thresholds, stop loss points, and stop profit points set in advance according to actual requirements, respectively, and may be different from the values ​​in the first example.

[0099] Specifically, a medium- and long-term position management strategy is formulated through the following steps S504 to S506:

[0100] S504, medium- and long-term price forecast analysis: Obtain medium- and long-term price forecast results, which may be based on the analysis of macroeconomic factors (such as GDP growth, inflation rate, etc.), energy policies (such as new energy development plans, power system reform direction, etc.), industrial development trends (such as the expansion of new energy industries or the transformation of traditional energy industries), and long-term changes in market supply and demand (such as the impact of population growth on electricity demand, the impact of new energy technology progress on energy supply), etc. Analyze the trend of the medium- and long-term price forecast curve, determine the long-term trend of prices (increase, decrease or stability) and key price change nodes and change ranges. For example, if the medium- and long-term price forecast shows that electricity prices will rise year by year in the next five years, and the increase will be between 3% and 5%, this will provide an important basis for subsequent position management strategies.

[0101] S505, Risk Assessment: Assess the risks of medium- and long-term transactions. Factors to consider include market volatility risk (although there is a trend in medium- and long-term prices, there may still be fluctuations during the period), policy risk (energy policy may change significantly in the medium- and long-term), business operation risk (if it involves investment in power companies, the company's own operating conditions may affect the asset value) and macroeconomic risks (such as economic recession may affect electricity demand and prices).

[0102] S506, determine the medium- and long-term position management strategy: formulate a position management strategy based on the medium- and long-term price forecast results and the medium- and long-term transaction risk assessment results.

[0103] If the medium- and long-term price forecast shows that the price will rise and the risk is within the second acceptable range, increase the position ratio and set the fourth stop loss point and the third stop profit point. The specific position ratio can be determined according to the price increase, your own risk tolerance and market expectations. For example, if the price is expected to rise by 5%, your own risk tolerance is strong and the market expectations are optimistic, you can consider increasing the position ratio by 30%-50%. At the same time, set a reasonable fourth stop loss point and third stop profit point. The fourth stop loss point can generally be set at a certain percentage below the cost price (such as 8%-12%), and the third stop profit point can be set at a certain percentage of the expected price increase (such as 60%-80%) to prevent sudden price reversals from causing significant losses.

[0104] If the medium- to long-term price forecast shows that the price will fall or the risk is high, reduce the position ratio or close the position, and set the fifth stop loss point and the fourth stop profit point. For example, if the price is expected to fall by 3%, reduce the position ratio to 20%-40% of the normal level, or directly close the position when the situation permits. At the same time, set a reasonable fourth stop profit point and fifth stop loss point. The fourth stop profit point can be set at a certain proportion of the expected price decline (such as 40%-60%), and the fifth stop loss point can be set at a certain proportion above the cost price (such as 8%-12%) to prevent a sudden price reversal from causing significant losses.

[0105] If the medium- and long-term price forecast shows that the price will be stable and the risk is within the second acceptable range, consider maintaining the existing position ratio and pay close attention to market dynamics. At the same time, set a reasonable sixth stop loss point and fifth stop profit point. The sixth stop loss point can generally be set at a certain percentage below the cost price (such as 5%-8%), and the fifth stop profit point can be set at a certain percentage of the expected price increase (such as 30%-50%) to prevent a sudden price reversal from causing significant losses.

[0106] After formulating the electricity trading strategy based on the above content, in order to further optimize the trading strategy, it can be evaluated, adjusted and optimized.

[0107] That is, in one embodiment of the present invention, the method for formulating an electricity trading strategy further includes: evaluating the electricity trading strategy to obtain a strategy evaluation result; and adjusting the prediction algorithm model and / or the electricity trading strategy according to the strategy evaluation result.

[0108] Specifically, by analyzing historical trading data, we can understand the performance of the algorithm under different market conditions, including prediction accuracy, effectiveness of trading strategies, etc. We can identify problems in the trading process, such as large prediction errors, unreasonable declaration strategies, etc., and determine the direction and focus of improvement. Based on the review results, we can adjust and optimize the existing trading strategies to adapt to market changes and improve trading returns and risk management capabilities. We can conduct transaction review and analysis through the following steps:

[0109] Transaction record data collection: Extract all historical transaction records from the transaction system database, including transaction time, transaction type, buying and selling direction, transaction price, transaction volume, handling fee and other information. Ensure the integrity and accuracy of the data, and conduct preliminary sorting and classification of the data for subsequent analysis.

[0110] Market-related data collection: Collect market data related to transactions, such as price trend data (including spot prices, medium- and long-term prices, etc.), transaction volume change data, meteorological data (if it involves the impact of meteorological factors on power transactions), load data (regional load demand data), new energy output data (regional wind power, photovoltaic output data), etc. These data should cover the same time period as the transaction records to ensure data consistency and relevance. Obtain market-related data from different data sources, such as market data providers, meteorological agencies, energy companies, etc., and integrate and preprocess them to meet analysis requirements.

[0111] Forecast accuracy metrics calculation: For price forecast accuracy, the root mean square error (RMSE) and mean absolute error (MAE) are calculated.

[0112] The root mean square error (RMSE) calculation formula is:

[0113]

[0114] Where n is the number of samples, y i is the actual price, is the predicted price.

[0115] The mean absolute error (MAE) calculation formula is:

[0116]

[0117] For the prediction accuracy of renewable energy output and load, the above formula is also used to calculate RMSE and MAE. i and They are replaced by the actual output value and the predicted output value, or the actual load value and the predicted load value respectively.

[0118] Trading strategy effectiveness indicator calculation:

[0119] Calculate the winning rate (ratio of profitable trades to total trades);

[0120] Calculate the profit-loss ratio (the ratio of the average profit amount to the average loss amount);

[0121] The Sharpe ratio (a measure of the ability to obtain excess returns while taking a certain amount of risk) is calculated as follows:

[0122]

[0123] Among them, the average rate of return can be obtained by calculating the ratio of the total profit amount to the initial investment amount, the standard deviation of the rate of return can be obtained by statistically analyzing the fluctuations of the transaction rate of return, and the risk-free interest rate can be selected according to market conditions.

[0124] Forecast error analysis: Based on the calculated forecast accuracy indicators, analyze the situations where the forecast error is large. For price forecasts, if the RMSE or MAE value is large, find the corresponding trading time period and market conditions. Analyze the possible causes of the error, such as sudden changes in meteorological factors that are not accurately considered, sudden changes in market supply and demand, and limitations of the forecast model itself. For new energy output forecasts and load forecasts, also analyze the time periods and causes of large errors, which may involve factors such as ineffective correction of meteorological deviations and untimely detection of station equipment failures.

[0125] Analysis of declaration strategy: Analyze whether the declaration strategy in the transaction record is reasonable. Check the declaration quantity and price under different market conditions and compare them with the actual transaction situation. If the declaration quantity is too large or too small, resulting in no transaction or unsatisfactory transaction price, analyze whether it is caused by wrong judgment of market trend, inaccurate price forecast or improper risk control strategy. For example, if the declaration quantity is too small in the price rising trend, resulting in missed profit opportunities, it may be that the judgment of price increase and market demand is inaccurate; if the declaration price is too high and the transaction is not completed, it may be that the price forecast is too high or market competition factors are not considered.

[0126] Strategy evaluation: Based on the calculated trading strategy effectiveness indicators and trading process analysis results, the trading strategy is comprehensively evaluated. If the winning rate is high and the profit and loss ratio is reasonable, it means that the trading strategy performs well in terms of profitability; if the Sharpe ratio is high, it means that the trading strategy performs well in terms of risk control.

[0127] Compare the expected and actual trading results of the strategy to find out the differences and reasons. For example, if the actual trading results are not as expected, it may be due to inaccurate price forecasts, unreasonable declaration strategies, improper risk control strategies, etc.

[0128] Strategy adjustment: adjust the model and trading strategy according to the strategy evaluation results. If problems are found in the price prediction model, such as low prediction accuracy, optimize the price prediction model, which may include adjusting model parameters, changing model structure or introducing new prediction methods; if the declaration strategy is unreasonable, adjust the declaration strategy parameters according to market conditions and analysis results, such as the method for determining the declaration quantity and the rules for setting the declaration price; if the risk control strategy is inappropriate, re-evaluate the risk factors and adjust the risk control indicators, such as modifying the calculation methods of stop loss points, take profit points and other indicators.

[0129] In general, the power trading strategy formulation process of the embodiment of the present invention mainly includes data collection and data processing, model training and optimization, trading strategy formulation, trading review and analysis. The specific process is as follows: Figure 2 As shown, first collect NWP, meteorological, wind power and photovoltaic output, location and other related energy data and custom data, and perform preprocessing such as cleaning and format conversion. Then select appropriate prediction algorithm models such as deep learning models and machine learning models according to the prediction task, use the preprocessed data to train the model, adjust the parameters, use ensemble learning methods to improve the prediction accuracy, and prevent overfitting through cross-validation. According to the price prediction results and risk assessment results, formulate spot volume reporting strategies and long-term position management strategies, and review and analyze the transaction process to adjust and optimize the transaction strategy.

[0130] In summary, the embodiments of the present invention have the following advantages:

[0131] (1) Improve forecast accuracy: Solve the problem of inaccurate forecasts of electricity prices, renewable energy output and load caused by complex and changeable meteorological factors and the mutual influence of multiple factors. The accuracy of various forecasts is improved through regional renewable energy forecasting technology based on deep learning, hybrid model based on factor decomposition and constraint optimization, and price forecasting technology based on time series analysis, dynamic regression model and integrated learning.

[0132] (2) Optimizing trading strategies: In view of the uncertainty of spot price difference forecasts, a forecast- and risk-based declaration strategy is adopted to select reasonable trading strategies, which solves the problem of profit loss caused by incorrect declaration strategies, optimizes trading strategies, and improves trading profits.

[0133] Corresponding to the method for formulating a power trading strategy in the above-mentioned embodiment, the present invention further proposes a device for formulating a power trading strategy.

[0134] Figure 3 A block diagram of a device for formulating a power trading strategy according to an embodiment of the present invention.

[0135] like Figure 3As shown, the device for formulating the power trading strategy includes an acquisition module 10 , a training module 20 , a prediction module 30 , a risk assessment module 40 and a formulation module 50 .

[0136] Among them, the acquisition module 10 is used to acquire data related to electricity trading and pre-process it; the training module 20 is used to determine the prediction task of electricity trading, select the corresponding prediction algorithm model according to different prediction tasks, and use the pre-processed data to train the prediction algorithm model; the prediction module 30 is used to use the trained prediction algorithm model to perform corresponding predictions to obtain prediction results; the risk assessment module 40 is used to perform risk assessment on electricity trading to obtain risk assessment results; the formulation module 50 is used to formulate electricity trading strategies based on the prediction results and the risk assessment results.

[0137] In one embodiment, the method for formulating a power trading strategy further includes a strategy evaluation module and an adjustment module. The strategy evaluation module is used to evaluate the power trading strategy to obtain a strategy evaluation result; the adjustment module is used to adjust the prediction algorithm model and / or the power trading strategy according to the strategy evaluation result.

[0138] In one embodiment, when the training module selects the corresponding prediction algorithm model according to different prediction tasks, it is specifically used to: when the prediction task includes energy prediction, use the deep learning model as the prediction algorithm model, wherein the deep learning model includes a long short-term memory network model and a graph convolutional network model; when the prediction task includes price prediction, use a hybrid model based on factor decomposition technology and a constrained optimization algorithm as the prediction algorithm model; when the prediction task includes price difference prediction, use a hybrid model based on a time series analysis model and a dynamic regression model as the prediction algorithm model; wherein the prediction algorithm model is an integrated learning model, and the prediction algorithm model is trained using a cross-validation method.

[0139] It should be noted that the specific implementation of the device for formulating the power trading strategy can refer to the specific implementation of the method for formulating the power trading strategy mentioned above. To avoid redundancy, it will not be described in detail here.

[0140] The device for formulating power trading strategies in the embodiment of the present invention selects a prediction algorithm model according to the prediction task to perform corresponding predictions, and formulates power trading strategies according to the prediction results and risk assessment results, which is conducive to improving the accuracy of power predictions and formulating effective power trading strategies.

[0141] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be construed as limitations on the present invention, and those of ordinary skill in the art can change, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. A method for formulating an electricity trading strategy, characterized in that: The following steps are involved: Acquire and pre-process data related to power trading; Determine the prediction task of power trading, select corresponding prediction algorithm model according to different prediction tasks, and use the preprocessed data to train the prediction algorithm model; Use the trained prediction algorithm model to make corresponding predictions to obtain prediction results; Conduct risk assessment on power transactions to obtain risk assessment results; Formulate an electricity trading strategy based on the prediction results and the risk assessment results.

2. The method for formulating a power trading strategy according to claim 1, characterized in that: Also includes: Evaluating the power trading strategy to obtain a strategy evaluation result; According to the strategy evaluation result, the prediction algorithm model and / or the power trading strategy are adjusted.

3. The method for formulating a power trading strategy according to claim 1, characterized in that: Data related to electricity trading include NWP data, meteorological data, energy data, site location data and user-defined data.

4. The method for formulating a power trading strategy according to claim 1, characterized in that: The forecasting task includes at least one of market trend forecasting, price forecasting, price fluctuation forecasting, price difference forecasting, load forecasting, energy production forecasting and energy demand forecasting.

5. The method for formulating a power trading strategy according to claim 1, characterized in that: Select the corresponding prediction algorithm model according to different prediction tasks, including: When the prediction task includes energy prediction, a deep learning model is used as a prediction algorithm model, wherein the deep learning model includes a long short-term memory network model and a graph convolution network model; When the forecasting task includes price forecasting, a hybrid model based on factor decomposition technology and constrained optimization algorithm is used as the forecasting algorithm model; When the forecasting task includes price difference forecasting, a hybrid model based on the time series analysis model and the dynamic regression model is used as the forecasting algorithm model; The prediction algorithm model is an integrated learning model, and a cross-validation method is used to train the prediction algorithm model.

6. The method for formulating a power trading strategy according to any one of claims 1 to 5, characterized in that: The prediction results include a day-ahead price prediction curve, the risk assessment results include a spot trading risk assessment result, and the trading strategy includes a spot volume quotation strategy and a risk control strategy, wherein the spot trading risk assessment result is determined based on an assessment of price volatility risk, supply and demand change risk, market liquidity risk, and policy risk.

7. The method for formulating a power trading strategy according to claim 6, characterized in that: Formulate an electricity trading strategy based on the prediction results and the risk assessment results, including: Analyze the trend of the day-ahead price forecast curve; If the trend of the day-ahead price forecast curve is rising and the spot transaction risk assessment result is within the first acceptable range, the spot quotation volume is increased and the first stop loss point is set; If the trend of the day-ahead price forecast curve is downward and the spot transaction risk assessment result reaches the first risk threshold, the spot quotation volume is reduced or reversed, and a second stop loss point and a first stop profit point are set, wherein the first risk threshold is not within the first acceptable range and is greater than the maximum value of the first acceptable range; If the trend of the day-ahead price forecast curve is volatile, maintain the preset volume and pay attention to market dynamics, and set a third stop loss point and a second stop profit point, wherein the first stop loss point, the second stop loss point and the third stop loss point are different, and the first stop profit point is different from the second stop profit point.

8. The method for formulating a power trading strategy according to any one of claims 1 to 5, characterized in that: The prediction results include medium- and long-term price prediction curves, the risk assessment results include medium- and long-term transaction risk assessment results, and the trading strategies include medium- and long-term position management strategies and risk control strategies, wherein the medium- and long-term transaction risk assessment results are determined based on market volatility risks, policy risks, business operating risks, and macroeconomic risk assessments.

9. The method for formulating a power trading strategy according to claim 8, characterized in that: Formulate an electricity trading strategy based on the prediction results and the risk assessment results, including: Analyze the trend of the medium- and long-term forecast price forecast curve; If the trend of the medium- and long-term forecast price prediction curve is rising and the medium- and long-term transaction risk assessment result is within the second acceptable range, the position ratio is increased, and the fourth stop loss point and the third stop profit point are set; If the trend of the medium- and long-term forecast price prediction curve is downward or the medium- and long-term transaction risk assessment result reaches the second risk threshold, the position ratio is reduced or the position is closed, and the fifth stop loss point and the fourth stop profit point are set, wherein the second risk threshold is not within the second acceptable range and is greater than the maximum value of the second acceptable range; If the trend of the medium- and long-term forecast price prediction curve is stable and the medium- and long-term transaction risk assessment result is within the second acceptable range, the existing position ratio is maintained and market dynamics are followed, and the sixth stop loss point and the fifth stop profit point are set, wherein the fourth stop loss point, the fifth stop loss point and the sixth stop loss point are different, and the third stop profit point, the fourth stop profit point and the fifth stop profit point are different.

10. A device for formulating power trading strategies, characterized in that: include: An acquisition module, used for acquiring data related to power transactions and preprocessing the data; A training module, used to determine the prediction task of power trading, select a corresponding prediction algorithm model according to different prediction tasks, and train the prediction algorithm model using preprocessed data; A prediction module is used to use the trained prediction algorithm model to perform corresponding predictions and obtain prediction results; A risk assessment module is used to conduct risk assessment on power transactions and obtain risk assessment results; A formulation module is used to formulate an electricity trading strategy based on the prediction results and the risk assessment results.

Citation Information

Cited By

  • Risk early warning method for bulk commodities

    CN120707185A

  • Intelligent decision-making system and method for simulating electric power spot transaction based on reinforcement learning

    CN120725727A