Power market price risk scenario generation method based on dual-domain weighted kernel density

By combining dual-domain weighted kernel density and Copula function, the asymmetry of error distribution and multivariate correlation in electricity market price forecasting are resolved, generating more reliable risk scenarios and providing more accurate support for risk assessment and optimization decision-making in the electricity market.

CN123141010APending Publication Date: 2026-11-20JIANGSU LINYANG ZHIWEI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611220137.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-12
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing electricity market price forecasting methods are unable to effectively characterize the asymmetry and heavy-tailed characteristics of error distribution, especially in terms of extreme risk samples, and the nonlinear dependencies between multiple variables are difficult to describe, affecting the reliability of risk assessment and optimization decision-making.

Method used

A method based on dual-domain weighted kernel density is adopted to divide the error samples into main domain samples and tail risk domain samples. The error distribution function is constructed by quantile weighted kernel density estimation and tail enhanced kernel density estimation, respectively. The joint correlation of multiple variables is characterized by the Copula function to generate the error risk scenario of electricity market price prediction.

Benefits of technology

It enables a comprehensive characterization of electricity market price forecasting errors, enhances the ability to express extreme risks, and improves the reliability of risk assessment and optimization decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123141010A_ABST
    Figure CN123141010A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of power market uncertainty modeling and risk scenario generation, and particularly relates to a power market price risk scenario generation method based on double-domain weighted kernel density. The present application builds a price prediction error distribution model, divides error samples into a main domain and a tail risk domain, and respectively adopts quantile weighted kernel density estimation and tail enhanced kernel density estimation for modeling, thereby ensuring stability of a conventional error distribution while strengthening extreme risk information expression capability, further combining a Copula function for correlation modeling of multivariate errors, realizing depiction of joint dependency relationship between different market variables, and finally generating error scenarios through random sampling, superimposing to a prediction benchmark value, and forming a typical risk scenario set after constraint correction and scenario reduction, thereby providing support for power market day-ahead clearing, bidding optimization and risk assessment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power market uncertainty modeling and risk scenario generation technology, specifically involving a method for generating power market price risk scenarios based on dual-domain weighted kernel density. Background Technology

[0002] With the deepening of power market reform, the electricity spot market has been gradually established and developed rapidly. Market clearing prices exhibit high-frequency volatility, strong randomness, and significant nonlinear characteristics. Against the backdrop of high-proportion integration of renewable energy, increased uncertainty in power supply and demand, and the coupled operation of multiple markets, electricity market prices are not only affected by load changes and generation structure, but also by multiple factors such as weather conditions, trading behavior, and market mechanism switching, making price prediction significantly more difficult.

[0003] Currently, electricity market price forecasting methods have gradually evolved from traditional statistical models to machine learning and deep learning models, but the forecast results still generally contain a certain degree of error. To reduce the impact of forecast errors on market decisions, related research typically constructs probability distribution models based on historical forecast errors and uses scenario generation methods to characterize future uncertainties. However, most existing methods are based on a unified modeling of the entire error sample, usually assuming that the error distribution follows a Gaussian distribution or using a fixed kernel density estimation method, which makes it difficult to effectively reflect the asymmetry and heavy-tailed characteristics of the error distribution.

[0004] Furthermore, in actual operation of the electricity market, price forecast errors often exhibit a clear characteristic of "concentrated error at the main body and abrupt changes at the tail." That is, most errors are concentrated within the main stable range, but under extreme weather conditions, sudden load changes, or changes in market mechanisms, large deviations or even abnormal fluctuations such as zero prices or peak prices can occur. Traditional scenario generation methods fit the main range well, but they do not pay enough attention to extreme risk samples at the tail, resulting in insufficient ability of the generated scenarios to represent extreme risks, thus affecting the reliability of electricity market risk assessment and optimization decisions.

[0005] Meanwhile, there is often a significant correlation between electricity market price forecasting error and load error, renewable energy output error and market conditions. Existing methods mostly use independent modeling or simple correlation coefficients to describe the complex nonlinear dependencies between multiple variables, especially the tail correlation under extreme market conditions.

[0006] Therefore, how to construct a method for generating power market price forecasting error risk scenarios that can simultaneously characterize the main error distribution characteristics and tail extreme risk characteristics, and effectively describe the multivariate joint correlation structure, has become a key problem that urgently needs to be solved in the field of power market uncertainty modeling and risk analysis. Summary of the Invention

[0007] The purpose of this invention is to provide a method for generating electricity market price risk scenarios based on dual-domain weighted kernel density, which can provide more reliable and engineering-applicable scenario support for electricity market day-ahead clearing decisions, pricing optimization strategy formulation, and risk assessment analysis.

[0008] The specific technical solution adopted by this invention is as follows:

[0009] A method for generating electricity market price risk scenarios based on dual-domain weighted kernel density includes:

[0010] Acquire historical and forecast data of the electricity market, calculate price forecast error based on historical data, and construct a context feature vector that includes market status characteristics, time characteristics, and supply and demand characteristics;

[0011] Based on the quantile distribution characteristics of the prediction error, the error samples are divided into main domain samples and tail risk domain samples. The main domain samples correspond to the normal error range, and the tail risk domain samples correspond to the extreme error range.

[0012] The conditional error distribution function of the main domain is constructed by using quantile-weighted kernel density estimation for the main domain samples. The tail enhancement weight mechanism is introduced for the tail risk domain samples and the tail enhancement error distribution function is constructed by using kernel density estimation. The conditional error distribution function of the main domain and the tail enhancement error distribution function are then fused to form the conditional margin prediction error distribution model.

[0013] The prediction error margin distribution of different market variables is jointly modeled based on the Copula function, and the joint distribution model is output. Then, random sampling is performed based on the joint distribution model to generate an initial scenario set.

[0014] By superimposing the prediction error scenarios onto the price prediction benchmark value, and after constraint correction and scenario reduction, the final set of electricity market price prediction error risk scenarios is obtained.

[0015] In a preferred embodiment, the prediction error is defined as the random deviation of electricity price, load, and power generation from their respective point prediction results.

[0016] In a preferred embodiment, the quantile division method determines the boundary between the main domain and the tail risk domain based on the cumulative distribution function of the error samples, and the specific process is as follows:

[0017] Obtain the cumulative distribution function values ​​of historical error samples and record them as reference sample values;

[0018] Statistical calculations of the mean and standard deviation of the reference sample values ​​are performed, and the mean is used as the adjustment benchmark and the standard deviation is used as the adjustment range to determine the boundary point between the main domain and the tail risk domain.

[0019] If the cumulative distribution function value of the error sample is less than the boundary point, then the corresponding error sample is assigned to the main domain.

[0020] If the cumulative distribution function value of the error sample is greater than or equal to the boundary point, the corresponding error sample is assigned to the tail risk domain.

[0021] In a preferred embodiment, the step of constructing the subject domain conditional error distribution function using quantile-weighted kernel density estimation for the subject domain samples includes:

[0022] All error samples belonging to the main domain are selected from historical samples to form the main domain sample set;

[0023] Based on the quantile position of each error sample in the main domain among all historical error samples, a corresponding quantile weight is assigned. The quantile weight of a sample located in the high-frequency error region is higher than that of a sample located in the low-frequency error region.

[0024] By combining the context feature vector at the current moment, the similarity between each subject domain sample and the current context feature is calculated, and the quantile weights are adjusted according to the similarity to obtain the first comprehensive weight of each sample.

[0025] Substitute the error value of each subject domain sample into the kernel function, and perform a weighted summation using the first comprehensive weight to obtain the density estimate of the subject domain conditional error distribution function.

[0026] In a preferred embodiment, the step of introducing a tail-enhancing weight mechanism to the tail-risk domain samples and constructing the tail-enhancing error distribution function using a kernel density estimation method includes:

[0027] All error samples belonging to the tail risk domain are selected from historical samples to form the tail risk domain sample set;

[0028] The tail enhancement weight is calculated based on the error magnitude of each error sample in the tail risk domain. The sample with the larger error magnitude receives a higher enhancement weight, and the weight increases monotonically with the error magnitude.

[0029] By combining the context feature vector at the current moment, the similarity between each tail risk domain sample and the current context feature is calculated, and the tail enhancement weight is adjusted according to the similarity to obtain the second comprehensive weight of each error sample.

[0030] Substitute the error value of each tail risk domain sample into the kernel function, and perform a weighted summation using the second comprehensive weight to obtain the density estimate of the tail enhancement error distribution function.

[0031] In a preferred embodiment, the step of fusing the main domain conditional error distribution function with the tail enhancement error distribution function includes:

[0032] Obtain the fusion weight coefficients used to balance the contribution ratios of the main domain distribution function and the tail augmentation distribution function in the final model;

[0033] The weighted distributions of the main domain conditional error distribution function and the tail enhancement error distribution function are obtained by multiplying them with the corresponding fusion weight coefficients, respectively.

[0034] The weighted distribution of the main domain part is superimposed with the weighted distribution of the tail enhancement part to obtain the fused conditional edge prediction error distribution model.

[0035] In a preferred embodiment, the steps of establishing the joint distribution model of the output include:

[0036] Calculate and output the marginal cumulative distribution functions of the prediction errors for electricity price, load, and power generation, respectively.

[0037] By using probability integral transformation, the prediction errors of electricity price, load, and power generation are mapped to uniformly distributed variables under the same dimension, thus obtaining uniformly distributed values.

[0038] The t-Copula was chosen as the joint distribution function to characterize the general linear correlation between variables;

[0039] Based on the correlation structure between the uniform distribution values ​​of each variable in the historical sample, estimate the parameters of the selected Copula function, including the degree of freedom parameter and the correlation matrix;

[0040] By substituting the uniform distribution values ​​of electricity price, load, and power generation into the Copula function of the estimated parameters, a joint distribution model of multivariate prediction error is constructed.

[0041] In a preferred embodiment, the step of generating an initial scene set by random sampling based on the joint distribution model includes:

[0042] Based on the current risk state probability, a state label is randomly selected as the conditional state for this sampling.

[0043] From the Copula joint distribution model corresponding to the extracted state labels, a set of uniformly distributed three-dimensional random variables with the same dimension are generated, corresponding to the homogenized values ​​of electricity price, load and power generation, respectively.

[0044] Substitute each set of homogenized values ​​into the inverse function of the marginal cumulative distribution function of the prediction error for electricity price, load, and power generation, and obtain the corresponding prediction error sample value through inverse transformation;

[0045] The prediction error sample values ​​are superimposed onto the corresponding variable's point prediction baseline value to form complete scenario values ​​for electricity price, load, and power generation;

[0046] Repeat the random sampling and inverse transformation process for all state labels until a preset number of scene samples are generated, forming the initial scene set.

[0047] In a preferred embodiment, the scene reduction process includes:

[0048] Set a target number of scenes to retain, which is much smaller than the total number of scenes in the initial scene set;

[0049] Calculate the distance between any two scenes in the initial scene set, and cluster and merge the scenes in the initial scene set based on the distance between the scenes to obtain multiple clusters;

[0050] A scene is randomly selected from each cluster as a representative scene, and the probability weights of the merged scenes in this cluster are accumulated and added to the representative scene.

[0051] The representative scenarios within all clusters and their updated probability weights are combined to form a reduced set of scenarios for electricity market price prediction error risk.

[0052] This invention also provides a power market price risk scenario generation system based on dual-domain weighted kernel density, which uses the above-mentioned power market price risk scenario generation method based on dual-domain weighted kernel density, including:

[0053] The initialization module is used to acquire historical and forecast data of the electricity market, calculate price forecast errors based on historical data, and construct a context feature vector that includes market status characteristics, time characteristics, and supply and demand characteristics.

[0054] The error classification module is used to divide the error samples into main domain samples and tail risk domain samples based on the quantile distribution characteristics of the prediction error. The main domain samples correspond to the normal error range, and the tail risk domain samples correspond to the extreme error range.

[0055] The model building module is used to construct the conditional error distribution function of the main domain samples using quantile-weighted kernel density estimation, introduce a tail enhancement weight mechanism for the tail risk domain samples and construct the tail enhancement error distribution function using kernel density estimation, and then fuse the conditional error distribution function of the main domain with the tail enhancement error distribution function to form a conditional margin prediction error distribution model.

[0056] The scene generation module is used to jointly model the marginal distribution of prediction errors of different market variables based on the Copula function, output the joint distribution model, and then perform random sampling based on the joint distribution model to generate an initial scene set;

[0057] The scenario correction module is used to superimpose the prediction error scenarios onto the price prediction benchmark value. After constraint correction and scenario reduction, the final set of electricity market price prediction error risk scenarios is obtained.

[0058] The technical effects achieved by this invention are as follows:

[0059] This invention constructs a price prediction error distribution model, dividing the error samples into a main domain and a tail risk domain. It then uses quantile-weighted kernel density estimation and tail-enhanced kernel density estimation for modeling, respectively. This approach enhances the ability to express extreme risk information while ensuring the stability of the conventional error distribution. Furthermore, it combines the Copula function to model the correlation of multivariate errors, thereby depicting the joint dependence between different market variables. Finally, it generates error scenarios through random sampling and superimposes them onto the prediction benchmark. After constraint correction and scenario reduction, it forms a set of typical risk scenarios, providing support for day-ahead clearing, price optimization, and risk assessment in the electricity market. Attached Figure Description

[0060] Figure 1 This is a schematic diagram of the method flow of the present invention;

[0061] Figure 2 This is a schematic diagram of the system modules of the present invention. Detailed Implementation

[0062] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0063] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0064] Secondly, the term "an embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in a preferred embodiment" appearing in different places throughout this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that mutually excludes other embodiments.

[0065] Please see Figure 1As shown, this invention provides a method for generating electricity market price risk scenarios based on dual-domain weighted kernel density. This invention constructs uncertainty modeling and scenario generation, aiming not only to provide a single predicted value for future moments, but also to characterize the possible future changes, distribution patterns, and joint coupling relationships between electricity prices, loads, and generation, thereby providing more informative input for subsequent market strategy optimization, including:

[0066] S1. Obtain historical and forecast data of the electricity market, calculate price forecast error based on historical data, and construct a context feature vector that includes market status characteristics, time characteristics, and supply and demand characteristics.

[0067] In step S1, the historical operating data of the electricity market includes electricity market clearing price, load, renewable energy output, and market operating status data (such as unit start-up and shutdown, line congestion, etc.). The electricity market clearing price includes day-ahead market clearing price and real-time market clearing price, which are used to reflect the price formation mechanism and supply-demand balance of the electricity market. The load includes total system load, regional load, and user-side load data, which are used to characterize the changing characteristics of electricity demand. Renewable energy output includes wind power and photovoltaic output, which are used to characterize the uncertainty characteristics of renewable energy generation. The market operating status data includes unit start-up and shutdown status, line congestion, and reserve capacity level, which are used to reflect the operating constraints and safety boundaries of the power system. The forecast data includes the price forecast, load forecast, and power generation forecast at the corresponding time. The price forecast reflects the market's expectation of future prices, the load forecast characterizes the changing trend of future electricity demand, and the power generation forecast characterizes the potential changes on the future electricity supply side. The forecast error is specifically defined as the random deviation of the electricity price, load, and power generation from their respective point-in-time forecast results.

[0068] ;

[0069] In the formula, , and These represent the electricity market clearing price, load, and renewable energy output, respectively. , and These represent the price forecast, load forecast, and power generation forecast, respectively. , and These represent the price forecast error series, load forecast error series, and power generation forecast error series, respectively.

[0070] Based on this, contextual features can be constructed, including time labels (such as hours, days of the week, and seasons), point forecast values, market status indicators, load levels, and renewable energy output levels. This allows for the construction of contextual feature vectors that can reflect the distribution characteristics of prediction errors under different market operation scenarios, providing an input basis for subsequent quantile regression or conditional probability modeling.

[0071] S2. Based on the quantile distribution characteristics of the prediction error, the error samples are divided into main domain samples and tail risk domain samples. The main domain samples correspond to the normal error range, and the tail risk domain samples correspond to the extreme error range.

[0072] In step S2, after the prediction error is determined, the error space is divided into a main domain and a tail risk domain based on the distribution characteristics of the error samples. The main domain corresponds to the normal error range, covering most of the prediction error samples, whose error amplitude is relatively small and the distribution is relatively concentrated. The tail risk domain corresponds to the extreme error range, covering extreme samples with large error amplitude and low probability of occurrence. Although these samples are few in number, they have a certain impact on market risk pricing and decision-making. The quantile division method determines the boundary between the main domain and the tail risk domain based on the cumulative distribution function of the error samples. The specific process is as follows:

[0073] The cumulative distribution function values ​​of historical error samples are obtained and recorded as reference sample values. Historical error samples refer to the prediction error sequence extracted from historical operating data. They are obtained by subtracting the actual values ​​of historical electricity prices, loads, and renewable energy output from the corresponding predicted values ​​to obtain the error values ​​at each time point. These are then arranged in chronological order to form an error sample set. The cumulative distribution function values ​​are determined by kernel density estimation. This yields a large number of reference samples, which serve as the basis for subsequent division of the main domain and the tail risk domain.

[0074] The mean and standard deviation of the reference sample values ​​are statistically calculated, and the mean is used as the adjustment benchmark and the standard deviation as the adjustment range to determine the boundary between the main domain and the tail risk domain. The mean reflects the overall distribution center of the error samples, while the standard deviation describes the dispersion of error fluctuations. When setting the boundary point, the mean plus or minus a certain number of standard deviations is usually used as the threshold to define the boundary between the main domain and the tail risk domain. At the same time, it can avoid the division bias caused by uneven sample distribution or extreme value fluctuations, ensuring that the boundary point has both statistical robustness and adaptability to the changes in error distribution patterns under different market conditions. Thus, while ensuring sufficient sample coverage in the main domain, it effectively identifies extreme samples in the tail risk domain.

[0075] If the cumulative distribution function value of the error sample is less than the boundary point, the corresponding error sample is assigned to the main domain. If the cumulative distribution function value of the error sample is greater than or equal to the boundary point, the corresponding error sample is assigned to the tail risk domain. This completes the division of the error space into the main domain and the tail risk domain, providing a differentiated input basis for subsequent conditional probability modeling in different domains.

[0076] S3. For the main domain samples, the quantile-weighted kernel density estimation method is used to construct the main domain conditional error distribution function. For the tail risk domain samples, a tail enhancement weight mechanism is introduced and the kernel density estimation method is used to construct the tail enhancement error distribution function. Then, the main domain conditional error distribution function and the tail enhancement error distribution function are fused to form a conditional margin prediction error distribution model.

[0077] In step S3, after the main domain and tail risk domain are divided, the conditional probability density is estimated for the error samples in the main domain and tail risk domain respectively, thereby constructing the conditional error distribution function of the main domain and the conditional error distribution function of the tail risk domain. For the main domain, the conventional kernel density estimation method is used, while for the tail risk domain, the domain kernel density estimation method is introduced. By increasing the bandwidth of the tail region or using a local adaptive kernel function, the fitting ability to extreme samples is enhanced, and the estimation bias caused by the sparsity of tail samples is avoided, thereby constructing the tail-enhanced error distribution function. Finally, the conditional error distribution function of the main domain and the tail-enhanced error distribution function are weighted and fused to form a conditional edge prediction error distribution model covering the entire error space. The conditional edge prediction error distribution model retains the high-precision fitting characteristics of the error distribution in the main domain and improves the ability to capture extreme risk events through the tail enhancement mechanism, thereby achieving a more comprehensive and accurate characterization of the prediction error distribution as a whole.

[0078] To construct the error distribution model for conditional margin prediction, the historical samples are first divided into states based on the output state labels, and then a weighted kernel density estimation method under state conditions is adopted, assuming time... The output probability vectors for the five states are as follows:

[0079] ;

[0080] For any type of state Select a set of deviation samples belonging to this state from the historical samples:

[0081] ;

[0082] in, The context features corresponding to the sample include information such as time labels, point prediction values, market status indicators, load levels, and renewable energy output levels. By introducing context features, the model can avoid coarse-grained fitting based solely on state labels, and instead further identify locally similar samples within the same state, thereby enhancing the specificity of marginal distribution estimation.

[0083] For a given time Any prediction object This invention employs a weighted kernel density estimation method under state conditions to construct its marginal probability density function. Specifically, it defines time... The context features are Then in the state Next, the The conditional density of the deviation of each variable can be expressed as:

[0084] ;

[0085] in, For the kernel function, this study uses a Gaussian kernel:

[0086] ;

[0087] These are the bandwidth parameters for the corresponding states. Representing historical samples The Middle Deviation of each variable Here are the sample weights. To highlight historical samples with similar operational characteristics to the current time, the weights are constructed based on contextual distance as follows:

[0088] ;

[0089] in, For state The similarity scale parameter is used to make the marginal distribution no longer a static empirical fit result, but can change dynamically with the current market state and operating conditions;

[0090] Since the state probabilities are not determined by a single label, this invention further mixes the conditional densities of each state according to the state probabilities to obtain variables. At any moment Final edge density:

[0091] ;

[0092] Compared to fitting directly based on a single state, this probability-weighted mixing method can handle transitions near state boundaries more smoothly, avoiding abrupt distribution changes caused by hard partitioning. Furthermore, the cumulative distribution function of the marginal distribution can be written as:

[0093] ;

[0094] This allows us to further obtain the confidence interval, quantiles, and other probability indicators of the variable, for example, for a given confidence level. Its two-sided prediction interval can be written as:

[0095] ;

[0096] in, This represents the point prediction result for the corresponding variable;

[0097] The quantile-weighted kernel density estimate of the main domain is:

[0098] ;

[0099] Tail-enhancing kernel density estimation is achieved by introducing an enhancement weight function to the tail samples, the weight of which increases monotonically with the error magnitude;

[0100] The fusion of the main domain and the tail risk domain is achieved through a weighted hybrid model:

[0101] ;

[0102] in, These are the weighting coefficients.

[0103] The following method can also be used to construct the conditional marginal prediction error distribution model:

[0104] First, the steps for constructing the conditional error distribution function of the main domain samples using quantile-weighted kernel density estimation include:

[0105] All error samples belonging to the main domain are selected from historical samples to form the main domain sample set, which provides a data basis for constructing the conditional error distribution function of the main domain.

[0106] Based on the quantile position of each error sample in the main domain among all historical error samples, a corresponding quantile weight is assigned. Samples located in high-frequency error regions receive higher quantile weights than those in low-frequency error regions. This allows the conditional error distribution function of the main domain to more accurately reflect the central tendency and distribution pattern of the error samples. The quantile weights are calculated based on the cumulative distribution function values ​​of the error samples within the main domain. Specifically, an inverse transformation method of kernel density estimation is used to map the cumulative distribution function values ​​of the main domain samples to the weight function. By setting a non-linear relationship between the weights and quantile values, samples located in the central region of the main domain receive higher weights, while samples in the peripheral regions receive relatively lower weights. This achieves local adaptive optimization of the error distribution fitting within the main domain, improving the modeling accuracy for high-frequency error regions. The expression for the weight function is:

[0107] ;

[0108] In the formula, For the first Quantile weights corresponding to each subject domain sample For the first The quantile values ​​corresponding to each subject domain error sample A positive adjustment factor is used to control the rate at which the weight decays as the quantile position changes. The larger the value, the more significant the weight difference between samples in the central and peripheral regions of the main domain. In practical applications, this can be adjusted according to the historical sample size of the target electricity market. After assigning quantile weights, the quantile weights are multiplied by the context similarity weights to obtain the comprehensive weights of the samples. Then, the subject domain conditional error distribution function is calculated through weighted kernel density estimation, thereby achieving the fitting of the distribution pattern of the conventional error interval.

[0109] By combining the context feature vector at the current moment, the similarity between each subject domain sample and the current context feature is calculated. The similarity can be represented by Euclidean distance or cosine distance. The sample with higher similarity corresponds to a larger similarity weight. Finally, the comprehensive weight is obtained by multiplying the quantile weight and the similarity weight. Then, the quantile weight is adjusted according to the similarity to obtain the first comprehensive weight of each sample. The higher the similarity, the larger the corresponding first comprehensive weight.

[0110] Substituting the error value of each subject domain sample into the kernel function and combining it with the first comprehensive weight for weighted summation, we obtain the density estimate of the subject domain conditional error distribution function, specifically expressed as:

[0111] ;

[0112] In the formula, Represents a given context feature The conditional probability density of errors in the time-major domain. For the main domain sample set, For the first Each sample corresponds to the current time. Similarity weights of contextual features The bandwidth for estimating the kernel density of the main domain. This is the Gaussian kernel function.

[0113] Secondly, the steps of introducing a tail-enhancing weight mechanism to the tail-risk domain samples and constructing the tail-enhancing error distribution function using the kernel density estimation method include:

[0114] All error samples belonging to the tail risk domain are selected from historical samples to form the tail risk domain sample set, which is used to represent the set of error samples within the extreme error interval, providing data support for the construction of the tail enhancement error distribution function;

[0115] Tail enhancement weights are calculated based on the error magnitude of each error sample in the tail risk domain. Samples with larger error magnitudes receive higher enhancement weights, and these weights monotonically increase with the error magnitude. This highlights the contribution of extreme error samples to risk characterization, compensates for underfitting due to a small number of tail samples, and prevents extreme risks from being underestimated. The tail enhancement weights can be expressed as:

[0116] ;

[0117] In the formula, For the first The augmentation weights corresponding to each tail risk domain sample A positive enhancement coefficient is used to control the magnitude of weight increase with the error amplitude. The larger the value, the more significant the increase in the weight of samples with large errors. In practical applications, it can be adjusted according to the sample sparsity of the tail risk region. ,

[0118] By combining the context feature vector at the current moment, the similarity between each tail risk domain sample and the current context feature is calculated, and the tail enhancement weight is adjusted according to the similarity to obtain the second comprehensive weight of each error sample. The method for determining the second weight is the same as the method for determining the first weight mentioned above, so it will not be repeated here.

[0119] Substituting the error value of each tail risk domain sample into the kernel function and combining it with the second comprehensive weight for weighted summation, we obtain the density estimate of the tail enhancement error distribution function, which can be specifically expressed as:

[0120] ;

[0121] In the formula, Represents a given context feature The conditional probability density of the error in the tail risk domain. For the tail risk domain sample set, For the first Each sample corresponds to the current time. Similarity weights of contextual features The bandwidth for estimating the kernel density of the tail risk domain.

[0122] Secondly, the step of fusing the main domain conditional error distribution function with the tail enhancement error distribution function includes:

[0123] Obtain the fusion weight coefficients used to balance the contribution ratios of the main domain distribution function and the tail enhancement distribution function in the final model. The fusion weight coefficients are determined by the sample size ratio of the main domain and the tail risk domain, and can also be manually adjusted according to the power market's attention to extreme risks. The higher the attention to extreme risks, the larger the fusion weight corresponding to the tail enhancement error distribution function.

[0124] The weighted distributions of the main domain conditional error distribution function and the tail enhancement error distribution function are multiplied by their respective fusion weight coefficients to obtain the weighted distributions of the main domain and tail enhancement components, respectively. Finally, the weighted distributions of the main domain and tail enhancement components are superimposed to obtain the fused conditional edge prediction error distribution model, which can be specifically expressed as follows:

[0125] ;

[0126] in, The fusion weights are the conditional error distribution functions of the main domain. The fusion weights for the tail enhancement error distribution function satisfy the following conditions: The fused conditional margin prediction error distribution model not only achieves high-precision fitting of the high-frequency error region of the main domain through quantile weighting, but also amplifies the influence of extreme error samples through tail enhancement weights, effectively solving the problem of insufficient fitting of single kernel density estimation in the tail region, and can more accurately reflect the actual distribution law of the error across the entire range.

[0127] S4. Based on the Copula function, jointly model the marginal distribution of prediction errors of different market variables and output the joint distribution model. Then, based on the joint distribution model, perform random sampling to generate an initial scenario set.

[0128] In step S4, after obtaining the conditional marginal prediction error distributions of each variable, since there is a nonlinear correlation between the prediction errors of different variables such as electricity price, load, and renewable energy output in the electricity market, it is necessary to characterize the correlation structure between the errors of different variables using a Copula function to obtain the joint probability distribution of the multivariate prediction errors. The step of outputting the joint distribution model includes:

[0129] The marginal cumulative distribution functions of the prediction errors for electricity price, load, and power generation are calculated and output separately. Through probability integral transformation, the prediction error values ​​for electricity price, load, and power generation are mapped to uniformly distributed variables under the same dimension, yielding the uniformly distributed values. , , ;

[0130] By using probability integral transformation, the prediction errors of electricity price, load, and power generation are mapped to uniformly distributed variables under the same dimension, thus obtaining uniformly distributed values.

[0131] The t-Copula is chosen as the joint distribution function to characterize the general linear correlation between variables, where the t-Copula takes the form:

[0132] ;

[0133] In the formula, Describing the degrees of freedom as The correlation matrix is The multivariate Student-t distribution function, It is the inverse quantile function of the one-dimensional Student-t distribution. Compared with Gaussian Copula, t-Copula can more effectively describe tail dependence.

[0134] Based on the correlation structure between the uniform distribution values ​​of each variable in the historical sample, estimate the parameters of the selected Copula function, including the degree of freedom parameter and the correlation matrix;

[0135] By substituting the uniform distribution values ​​of electricity price, load, and power generation into the Copula function of the estimated parameters, a joint distribution model of multivariate prediction error is constructed.

[0136] Furthermore, to maintain state-aware characteristics, this invention does not simply fit a single Copula, but rather fits Copula parameters under different state conditions for different risk states, for a given time... Based on the state probabilities output by the risk identification model, the Copula structures of each state are probabilistically weighted to form a hybrid joint distribution model. Specifically, two methods can be used: one is to directly construct the hybrid Copula form; the other is to extract state labels according to the state probabilities during the sampling phase, and then call the corresponding state's Copula parameters to generate samples. This invention adopts the latter to more clearly preserve the differences in dependency structures under different states, i.e., first based on... Extract status tags Then, based on this state Sampling Finally, random deviation samples of each variable are obtained through inverse marginal distribution transformation.

[0137] Therefore, given a state The joint density at time t can be written as:

[0138] ;

[0139] in, For state After considering the state probabilities, the final joint distribution of the Copula density function can be expressed as:

[0140] ;

[0141] This joint model incorporates state information, marginal uncertainty, and intervariate dependencies, thus more realistically reflecting the joint evolution characteristics of future market variables.

[0142] Secondly, the steps for generating an initial scene set through random sampling based on this joint distribution model include:

[0143] Based on the current risk state probability, a state label is randomly selected as the conditional state for this sampling.

[0144] From the Copula joint distribution model corresponding to the extracted state labels, a set of uniformly distributed three-dimensional random variables with the same dimension are generated, corresponding to the homogenized values ​​of electricity price, load and power generation, respectively.

[0145] Substitute each set of homogenized values ​​into the inverse function of the marginal cumulative distribution function of the prediction error for electricity price, load, and power generation, and obtain the corresponding prediction error sample value through inverse transformation;

[0146] The prediction error sample values ​​are superimposed onto the corresponding variable's point prediction baseline value to form complete scenario values ​​for electricity price, load, and power generation;

[0147] Repeat the random sampling and inverse transformation process for all state labels until a preset number of scene samples are generated, forming an initial scene set;

[0148] Specifically, suppose we need to generate N future scenario paths. For any scenario n∈{1,2,…,N}, we first extract state labels according to the state probabilities given by the risk identification model. Then, a set of three-dimensional uniform random variables is generated using the joint distribution of Copula under the corresponding states. And the deviation samples are obtained by inverse transformation of their respective marginal distributions:

[0149] ;

[0150] Finally, it is superimposed on the point prediction results to obtain the first... Future variable values ​​in each scenario:

[0151] ;

[0152] By repeating the above steps, a scene set can be generated:

[0153] ;

[0154] in, Indicates the first The probability weights of each scenario.

[0155] S5. The prediction error scenarios are superimposed onto the price prediction benchmark value. After constraint correction and scenario reduction, the final set of electricity market price prediction error risk scenarios is obtained.

[0156] In step S5, to ensure that the generated scene meets basic physical constraints and market constraints, the present invention further performs feasible domain correction after scene reconstruction. The scene reduction process includes:

[0157] Set a target number of scenes to retain, which is much smaller than the total number of scenes in the initial scene set;

[0158] Calculate the distance between any two scenes in the initial scene set, and cluster and merge the scenes in the initial scene set based on the distance between the scenes to obtain multiple clusters;

[0159] A scene is randomly selected from each cluster as a representative scene, and the probability weights of the merged scenes in this cluster are accumulated and added to the representative scene.

[0160] The representative scenarios within all clusters and their updated probability weights are combined to form a reduced set of electricity market price prediction error risk scenarios.

[0161] In the above, load and power generation should meet non-negativity constraints, power generation should not exceed the upper limit of installed capacity, and the electricity price can be truncated at the boundary in conjunction with market price limit rules, that is:

[0162] ;

[0163] After constraint correction, the scenario set can better reflect the feasible state space in the actual market environment.

[0164] Considering that a large number of initially generated scenes would significantly increase the burden of subsequent optimization, this invention further employs a scene reduction method to compress the original scene set. Let the initial number of scenes be... The target number of retained scenes is ( Then, based on the distance metric between scenes:

[0165] ;

[0166] By clustering similar scenarios and redistributing the probabilities of the merged scenarios to representative scenarios, the computational scale of subsequent market strategy optimization problems can be reduced while preserving the original distribution statistical characteristics and related structures as much as possible.

[0167] Please see Figure 2 A power market price risk scenario generation system based on dual-domain weighted kernel density, using the aforementioned power market price risk scenario generation method based on dual-domain weighted kernel density, includes:

[0168] The initialization module is used to acquire historical and forecast data of the electricity market, calculate price forecast errors based on historical data, and construct a context feature vector that includes market status characteristics, time characteristics, and supply and demand characteristics.

[0169] The error classification module is used to divide the error samples into main domain samples and tail risk domain samples based on the quantile distribution characteristics of the prediction error. The main domain samples correspond to the normal error range, and the tail risk domain samples correspond to the extreme error range.

[0170] The model building module is used to construct the conditional error distribution function of the main domain samples using quantile-weighted kernel density estimation, introduce a tail enhancement weight mechanism for the tail risk domain samples and construct the tail enhancement error distribution function using kernel density estimation, and then fuse the conditional error distribution function of the main domain with the tail enhancement error distribution function to form a conditional margin prediction error distribution model.

[0171] The scene generation module is used to jointly model the marginal distribution of prediction errors of different market variables based on the Copula function, output the joint distribution model, and then perform random sampling based on the joint distribution model to generate an initial scene set;

[0172] The scenario correction module is used to superimpose the prediction error scenarios onto the price prediction benchmark value. After constraint correction and scenario reduction, the final set of electricity market price prediction error risk scenarios is obtained.

[0173] The execution process of the above system corresponds to the flow of the aforementioned method, so it will not be repeated here.

[0174] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0175] The above description is merely a preferred embodiment of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention. Structures, devices, and operating methods not specifically described or explained in this invention are implemented according to conventional methods in the art unless otherwise specified or limited.

Claims

1. A method for generating electricity market price risk scenarios based on dual-domain weighted kernel density, characterized in that: include: Acquire historical and forecast data of the electricity market, calculate price forecast error based on historical data, and construct a context feature vector that includes market status characteristics, time characteristics, and supply and demand characteristics; Based on the quantile distribution characteristics of the prediction error, the error samples are divided into main domain samples and tail risk domain samples. The main domain samples correspond to the normal error range, and the tail risk domain samples correspond to the extreme error range. The conditional error distribution function of the main domain is constructed by using quantile-weighted kernel density estimation for the main domain samples. The tail enhancement weight mechanism is introduced for the tail risk domain samples and the tail enhancement error distribution function is constructed by using kernel density estimation. The conditional error distribution function of the main domain and the tail enhancement error distribution function are then fused to form the conditional margin prediction error distribution model. The prediction error margin distribution of different market variables is jointly modeled based on the Copula function, and the joint distribution model is output. Then, random sampling is performed based on the joint distribution model to generate an initial scenario set. By superimposing the prediction error scenarios onto the price prediction benchmark value, and after constraint correction and scenario reduction, the final set of electricity market price prediction error risk scenarios is obtained.

2. The method for generating electricity market price risk scenarios based on dual-domain weighted kernel density according to claim 1, characterized in that: The prediction error is defined as the random deviation of electricity price, load, and power generation from their respective point prediction results.

3. The method for generating electricity market price risk scenarios based on dual-domain weighted kernel density according to claim 1, characterized in that: The quantile division method determines the boundary between the main domain and the tail risk domain based on the cumulative distribution function of the error samples. The specific process is as follows: Obtain the cumulative distribution function value of historical error samples and record it as the reference sample value; The mean and standard deviation of the reference sample values ​​are statistically calculated, and the mean is used as the adjustment benchmark and the standard deviation is used as the adjustment range to determine the boundary between the main domain and the tail risk domain. If the cumulative distribution function value of the error sample is less than the boundary point, then the corresponding error sample is assigned to the main domain. If the cumulative distribution function value of the error sample is greater than or equal to the boundary point, the corresponding error sample is assigned to the tail risk domain.

4. The method for generating electricity market price risk scenarios based on dual-domain weighted kernel density according to claim 1, characterized in that: The step of constructing the subject domain conditional error distribution function using quantile-weighted kernel density estimation for the subject domain samples includes: All error samples belonging to the main domain are selected from historical samples to form the main domain sample set; Based on the quantile position of each error sample in the main domain among all historical error samples, a corresponding quantile weight is assigned. The quantile weight of a sample located in the high-frequency error region is higher than that of a sample located in the low-frequency error region. By combining the context feature vector at the current moment, the similarity between each subject domain sample and the current context feature is calculated, and the quantile weights are adjusted according to the similarity to obtain the first comprehensive weight of each sample. Substitute the error value of each subject domain sample into the kernel function, and perform a weighted summation using the first comprehensive weight to obtain the density estimate of the subject domain conditional error distribution function.

5. The method for generating electricity market price risk scenarios based on dual-domain weighted kernel density according to claim 1, characterized in that: The steps of introducing a tail-enhancing weight mechanism to the tail-risk domain samples and constructing the tail-enhancing error distribution function using a kernel density estimation method include: All error samples belonging to the tail risk domain are selected from historical samples to form the tail risk domain sample set; The tail enhancement weight is calculated based on the error magnitude of each error sample in the tail risk domain. The sample with the larger error magnitude receives a higher enhancement weight, and the weight increases monotonically with the error magnitude. By combining the context feature vector at the current moment, the similarity between each tail risk domain sample and the current context feature is calculated, and the tail enhancement weight is adjusted according to the similarity to obtain the second comprehensive weight of each error sample. Substitute the error value of each tail risk domain sample into the kernel function, and perform a weighted summation using the second comprehensive weight to obtain the density estimate of the tail enhancement error distribution function.

6. The method for generating electricity market price risk scenarios based on dual-domain weighted kernel density according to claim 1, characterized in that: The step of fusing the main domain conditional error distribution function with the tail enhancement error distribution function includes: Obtain the fusion weight coefficients used to balance the contribution ratios of the main domain distribution function and the tail augmentation distribution function in the final model; The weighted distributions of the main domain conditional error distribution function and the tail enhancement error distribution function are obtained by multiplying them with the corresponding fusion weight coefficients, respectively. The weighted distribution of the main domain part is superimposed with the weighted distribution of the tail enhancement part to obtain the fused conditional edge prediction error distribution model.

7. The method for generating electricity market price risk scenarios based on dual-domain weighted kernel density according to claim 1, characterized in that: The steps of the output joint distribution model include: Calculate and output the marginal cumulative distribution functions of the prediction errors for electricity price, load, and power generation, respectively. By using probability integral transformation, the prediction errors of electricity price, load, and power generation are mapped to uniformly distributed variables under the same dimension, thus obtaining uniformly distributed values. The t-Copula was chosen as the joint distribution function to characterize the general linear correlation between variables; Based on the correlation structure between the uniform distribution values ​​of each variable in the historical sample, estimate the parameters of the selected Copula function, including the degree of freedom parameter and the correlation matrix; By substituting the uniform distribution values ​​of electricity price, load, and power generation into the Copula function of the estimated parameters, a joint distribution model of multivariate prediction error is constructed.

8. The method for generating electricity market price risk scenarios based on dual-domain weighted kernel density according to claim 1, characterized in that: The step of generating an initial scene set by random sampling based on the joint distribution model includes: Based on the current risk state probability, a state label is randomly selected as the conditional state for this sampling. From the Copula joint distribution model corresponding to the extracted state labels, a set of uniformly distributed three-dimensional random variables with the same dimension are generated, corresponding to the homogenized values ​​of electricity price, load and power generation, respectively. Substitute each set of homogenized values ​​into the inverse function of the marginal cumulative distribution function of the prediction error for electricity price, load, and power generation, and obtain the corresponding prediction error sample value through inverse transformation; The prediction error sample values ​​are superimposed onto the corresponding variable's point prediction baseline value to form complete scenario values ​​for electricity price, load, and power generation; Repeat the random sampling and inverse transformation process for all state labels until a preset number of scene samples are generated, forming the initial scene set.

9. The method for generating electricity market price risk scenarios based on dual-domain weighted kernel density according to claim 1, characterized in that: The steps of the scenario reduction process include: Set a target number of scenes to retain, which is much smaller than the total number of scenes in the initial scene set; Calculate the distance between any two scenes in the initial scene set, and cluster and merge the scenes in the initial scene set based on the distance between the scenes to obtain multiple clusters; A scene is randomly selected from each cluster as a representative scene, and the probability weights of the merged scenes in this cluster are accumulated and added to the representative scene. The representative scenarios within all clusters and their updated probability weights are combined to form a reduced set of scenarios for electricity market price prediction error risk.

10. A power market price risk scenario generation system based on dual-domain weighted kernel density, characterized in that: The method for generating electricity market price risk scenarios based on dual-domain weighted kernel density as described in any one of claims 1 to 9 includes: The initialization module is used to acquire historical and forecast data of the electricity market, calculate price forecast errors based on historical data, and construct a context feature vector that includes market status characteristics, time characteristics, and supply and demand characteristics. The error classification module is used to divide the error samples into main domain samples and tail risk domain samples based on the quantile distribution characteristics of the prediction error. The main domain samples correspond to the normal error range, and the tail risk domain samples correspond to the extreme error range. The model building module is used to construct the conditional error distribution function of the main domain samples using quantile-weighted kernel density estimation, introduce a tail enhancement weight mechanism for the tail risk domain samples and construct the tail enhancement error distribution function using kernel density estimation, and then fuse the conditional error distribution function of the main domain with the tail enhancement error distribution function to form a conditional margin prediction error distribution model. The scene generation module is used to jointly model the marginal distribution of prediction errors of different market variables based on the Copula function, output the joint distribution model, and then perform random sampling based on the joint distribution model to generate an initial scene set; The scenario correction module is used to superimpose the prediction error scenarios onto the price prediction benchmark value. After constraint correction and scenario reduction, the final set of electricity market price prediction error risk scenarios is obtained.