Generation method, system and equipment of day-ahead declaration strategy
By generating a recently declared strategy, using training data to divide the total width and generate target data, the problem of low manual declaration efficiency in the power spot market is solved, and automated multi-stage volume quotation is realized, which improves transaction efficiency and new energy consumption.
Patent Information
- Application Number
- CN202510231653.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-27
AI Technical Summary
In the prior art, the recent filing of the power spot market requires manual subjective summary of experience, resulting in low transaction efficiency and large workload.
By obtaining training data, including the recent price, recent new energy forecast data and recent real-time price difference, the target bin is divided equally, and the target bin is determined, and the target price difference, target price, volume coefficient and declaration price are generated based on the data of the target bin, and the declaration strategy is finally generated.
It has realized automated multi-stage quotation, improved trading efficiency, reduced workload, promoted the absorption of new energy, and maintained the stable operation of the spot power market.
Smart Images

Figure CN120218968A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of day-ahead declaration in the electricity spot market, and in particular to a method, a system and a device for generating a day-ahead declaration strategy. Background Art
[0002] As the electricity spot market becomes increasingly mature, as one of the market participants, an electricity selling company needs to declare the time-of-use quantity-price curve for the next day every day. In provinces with a large installed capacity of new energy, due to the unstable output of new energy, the day-ahead price and the real-time price fluctuate greatly. The related technologies mainly conduct trading declarations by subjectively summarizing experience manually. However, the efficiency of manual quantity and price quoting is low and the workload is large. Summary of the Invention
[0003] The present application provides a method, a system and a device for generating a day-ahead declaration strategy, which solve the technical problem of time-consuming and laborious manual trading in the related technologies, and achieve the technical effect of automatically realizing multi-segment quantity and price quoting and improving work efficiency.
[0004] To achieve the above object, the main technical solutions adopted by the present application include:
[0005] In a first aspect, an embodiment of the present application provides a method for generating a day-ahead declaration strategy, the method including: obtaining training data, where the training data includes a day-ahead price, a day-ahead new energy prediction data, and a day-ahead real-time price difference; performing equal-width partitioning on the day-ahead new energy prediction data in the training data, and dividing the training data into a plurality of bins according to the result of the equal-width partitioning; determining a target bin where the day-ahead new energy prediction data of the target day is located, and generating a target price difference and a target price of the target day according to the day-ahead real-time price difference and the day-ahead price of the target bin; generating a quantity reporting coefficient according to the target price difference; generating a declared price according to the target price, the target price difference, and the predicted price of the target day; and generating a declaration strategy based on the quantity reporting coefficient, the declared price, and the predicted electricity consumption of the target day.
[0006] An embodiment of the present application provides a method for generating a day-ahead declaration strategy. The method includes: obtaining training data, where the training data includes day-ahead prices, day-ahead new energy prediction data, and day-ahead real-time price differences; performing equal-width partitioning on the day-ahead new energy prediction data in the training data, and based on the result of the equal-width partitioning, dividing the training data into several bins; determining the target bin where the day-ahead new energy prediction data of the target day is located, and generating the target price difference and target price of the target day according to the day-ahead real-time price difference and day-ahead price in the target bin; generating a volume reporting coefficient according to the target price difference; generating a declaration price according to the target price, the target price difference, and the predicted price of the target day; generating a declaration strategy based on the volume reporting coefficient, the declaration price, and the predicted electricity consumption of the target day, solving the technical problem of time-consuming and laborious manual trading in the related art, and achieving the technical effect of automatically realizing multi-segment volume reporting and quotation and improving work efficiency.
[0007] Optionally, generating the target price difference and target price of the target day according to the day-ahead real-time price difference and day-ahead price in the target bin includes: taking the average of the day-ahead real-time price differences in the target bin to obtain the target price difference of the target day; taking the average of the day-ahead prices in the target bin to obtain the target price of the target day.
[0008] Optionally, generating a volume reporting coefficient according to the target price difference includes: if the target price difference is a positive price difference, generating a volume reporting coefficient of [0, c, 1, 1.2, 1.2, 1.2]; if the target price difference is a negative price difference, generating a volume reporting coefficient of [0, 1, c, c, c, c]; where c is a target coefficient, and the relationship with the target price difference d is: c = 1 - 0.004d.
[0009] Optionally, generating a declaration price according to the target price, the target price difference, and the predicted price of the target day includes: if the target price difference is a positive price difference, generating a first declaration price, where the first declaration price is less than the smaller value of the target price and the predicted price of the target day; if the target price difference is a negative price difference, generating a second declaration price, where the second declaration price is greater than or equal to the larger value of the target price and the predicted price of the target day.
[0010] Optionally, the method for generating the day-ahead declaration strategy further includes: performing time-sharing processing on the 96-point data of each day in the historical power data to obtain the training data of 24 points per day; performing time-sharing processing on the 96-point data of the target day to obtain the day-ahead new energy prediction data, predicted price, and predicted electricity consumption of 24 points; generating a declaration strategy for 24 points of the target day based on the time-sharing processed training data, day-ahead new energy prediction data, predicted price, and predicted electricity consumption.
[0011] Optionally, the method for generating the day-ahead bidding strategy further includes: dividing historical power data into multiple training data subsets based on different time lengths; performing equal-width division on each of the training data subsets based on different bin widths; generating multiple alternative bidding strategies by combining different time lengths and bin widths; determining a target bidding strategy with the minimum per-kWh drawdown ratio based on the multiple alternative bidding strategies; extracting the target time length and target bin width in the target bidding strategy; and generating an optimal bidding strategy for the target day based on the extracted target time length and target bin width.
[0012] Optionally, the calculation steps for the per-kWh drawdown ratio of an alternative bidding strategy are as follows: backtesting the alternative bidding strategy to generate the daily bid volume and daily bid price during the backtesting period; in the case where the daily bid price is greater than the day-ahead price, taking the daily bid volume as the day-ahead winning bid volume; generating the daily per-kWh profit and loss during the backtesting period based on the day-ahead winning bid volume; generating the maximum per-kWh drawdown ratio during the backtesting period based on the daily per-kWh profit and loss; and taking the maximum per-kWh drawdown ratio during the backtesting period as the per-kWh drawdown ratio of the alternative bidding strategy.
[0013] Optionally, the calculation formula for the daily per-kWh profit and loss is:
[0014]
[0015] where the calculation formula for the daily time-of-use profit and loss profit is:
[0016] profit = -(P 日前 - P 实时 ) * (Q 日前 - Q 实际 )
[0017] In the above formula, p_kwh is the daily per-kWh profit and loss, P 日前 is the day-ahead price, P 实时 is the real-time price, Q 日前 is the day-ahead winning bid volume, and Q 实际 is the actual power consumption.
[0018] Second aspect, an embodiment of the present application provides a system for generating a day-ahead declaration strategy, which can implement the above-mentioned method for generating a day-ahead declaration strategy. The system includes: an acquisition module, configured to acquire training data, where the training data includes day-ahead prices, day-ahead new energy prediction data, and day-ahead real-time price differences; a binning module, configured to perform equal-width partitioning on the day-ahead new energy prediction data in the training data, and divide the training data into several bins according to the results of the equal-width partitioning; a generation module, configured to determine the target bin where the day-ahead new energy prediction data of the target day is located, and generate a target price difference and a target price for the target day according to the day-ahead real-time price difference and the day-ahead price in the target bin; a declaration module, configured to generate a reporting volume coefficient according to the target price difference; configured to generate a declaration price according to the target price, the target price difference, and the predicted price of the target day; and configured to generate a declaration strategy based on the reporting volume coefficient, the declaration price, and the predicted electricity consumption of the target day.
[0019] Third aspect, an embodiment of the present application provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the above-mentioned method for generating a day-ahead declaration strategy by executing the computer instructions.
[0020] Fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to cause a computer to execute the above-mentioned method for generating a day-ahead declaration strategy.
[0021] Fifth aspect, an embodiment of the present application provides a computer program product, including computer instructions, and the computer instructions are used to cause a computer to execute the above-mentioned method for generating a day-ahead declaration strategy. Description of the Drawings
[0022] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings required to be used in the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to these drawings.
[0023] Figure 1 It is a flowchart of the method for generating a day-ahead declaration strategy provided by the embodiment of the present application;
[0024] Figure 2 It is a schematic diagram of a system for generating a day-ahead declaration strategy provided by the embodiment of the present application;
[0025] Figure 3Schematic diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some, but not all, of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present application.
[0027] As the electricity spot market becomes increasingly mature, as one of the market participants, electricity retailers need to declare the time-of-use quantity-price curves for the next day every day. In provinces with a large installed capacity of new energy, due to the unstable output of new energy, the day-ahead price and real-time price fluctuate greatly. The related technologies mainly rely on manual subjective experience summary for trading declarations. However, the manual quantity and price quotation are inefficient and labor-intensive. The embodiments of the present application provide a method for generating a day-ahead declaration strategy, which is used to generate the declaration strategy for the target day. By not relying on manual subjective trading and realizing multi-segment quantity and price quotation through programs, it helps to improve the declaration efficiency, reduce the workload, promote the consumption of new energy, maintain the stable operation of the electricity spot market, and contribute to carbon emissions.
[0028] The present application provides an embodiment of a method for generating a day-ahead declaration strategy. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0029] Please refer to Figure 1 , Figure 1 which is the flowchart of the method for generating a day-ahead declaration strategy provided by the embodiment of the present application. As Figure 1 shown, the process includes the following steps:
[0030] Step S1, obtain training data, where the training data includes the day-ahead price, the day-ahead new energy prediction data, and the day-ahead real-time price difference.
[0031] Specifically, obtain the electricity data for a historical period as the training data. Among them, the training data includes the day-ahead price, the day-ahead new energy prediction data, and the day-ahead real-time price difference for each day within a historical period. For the training data of each day, it can be set to collect data every 15 minutes, and 96-point data for each day is obtained. Each piece of collected data includes the day-ahead price, the day-ahead new energy prediction data, and the day-ahead real-time price difference at the current moment.
[0032] Step S3: Perform equal-width partitioning on the day-ahead new energy prediction data in the training data, and divide the training data into several bins according to the results of the equal-width partitioning.
[0033] Among them, the bin width of each bin is equal. For example, the range of historical day-ahead new energy prediction data is 0 - 2000, and the bin width of the equal-width partitioning is set to 500, which can be divided into four bins. For example, the range of the day-ahead new energy prediction data of the training data in the first bin is 0 - 500. Among them, in the first bin, there is not only the day-ahead new energy prediction data, but also the day-ahead price and the day-ahead real-time price difference at the same collection moment.
[0034] Step S5: Determine the target bin where the day-ahead new energy prediction data of the target day is located, and generate the target price difference and target price of the target day according to the day-ahead real-time price difference and day-ahead price of the target bin.
[0035] Among them, the new energy prediction data, predicted price, and predicted electricity consumption of the target day are known, while the day-ahead price and day-ahead real-time price difference of the target day are unknown. Identify which bin among the above-mentioned multiple bins the day-ahead new energy prediction data of the target day belongs to. For example, if the day-ahead new energy prediction data of the target day is 400, then it belongs to the range of 0 - 500 and belongs to the first bin. Then, take the first bin as the target bin. Calculate the average value of the day-ahead real-time price difference in the historical data of the target bin, and calculate the average value of the day-ahead price, and use them as the target price difference and target price of the target day respectively.
[0036] Step S7: Generate a reporting volume coefficient according to the target price difference.
[0037] In the electricity spot market, the declared electricity volume is subject to certain constraints. The reporting volume coefficient refers to the parameter used to adjust or limit the declared electricity volume. For example, the range of the reporting volume coefficient can be set to 0 - 1.2. For example, the reporting volume coefficient corresponding to the historical electricity consumption is 1, the minimum value of the declared electricity volume is 0, and the maximum value is 1.2 times the historical electricity consumption.
[0038] Step S9: Generate a declared price according to the target price, the target price difference, and the predicted price of the target day.
[0039] In the electricity spot market, the declared price is also subject to certain constraints. For example, the range of the declared price can be 40 - 650.
[0040] Step S11: Generate a declaration strategy based on the reporting volume coefficient, the declared price, and the predicted electricity consumption of the target day.
[0041] Among them, the declaration strategy includes the declared electricity volume and the corresponding declared price. The declared electricity volume is obtained according to the reporting volume coefficient and the predicted electricity consumption of the target day.
[0042] A method for generating a day-ahead bidding strategy proposed in an embodiment of the present application, the method includes: obtaining training data, the training data including day-ahead price, day-ahead new energy prediction data, and day-ahead real-time price difference; performing equal-width partitioning on the day-ahead new energy prediction data in the training data, and dividing the training data into several bins according to the results of the equal-width partitioning; determining the target bin where the day-ahead new energy prediction data of the target day is located, and generating the target price difference and target price of the target day according to the day-ahead real-time price difference and day-ahead price of the target bin; generating a volume coefficient according to the target price difference; generating a bidding price according to the target price, the target price difference, and the predicted price of the target day; generating a bidding strategy based on the volume coefficient, the bidding price, and the predicted electricity consumption of the target day, which solves the technical problem of time-consuming and laborious manual trading in the related art, does not rely on manual subjective trading, is not affected by the high and low fluctuations of recent day-ahead prices and real-time prices, and is more refined than the day-ahead strategy formulated based on manual experience, achieving the technical effect of automatically realizing multi-segment volume bidding and improving work efficiency. The bidding strategy is evaluated by the per-degree drawdown ratio, making the strategy more robust and the strategy performance more stable.
[0043] In some embodiments, generating the target price difference and target price of the target day according to the day-ahead real-time price difference and day-ahead price of the target bin includes: taking the average of the day-ahead real-time price differences in the target bin to obtain the target price difference of the target day; taking the average of the day-ahead prices in the target bin to obtain the target price of the target day.
[0044] In some embodiments, generating a volume coefficient according to the target price difference includes: if the target price difference is a positive price difference, generating a volume coefficient of [0, c, 1, 1.2, 1.2, 1.2]; if the target price difference is a negative price difference, generating a volume coefficient of [0, 1, c, c, c, c]; where c is a target coefficient, and the relationship with the target price difference d is: c = 1 - 0.004d.
[0045] Among them, if d > 50, then assign d as 50. If d < -50, then assign d as -50. Assume that the bidding segment includes 5 segments, and the ending coefficient of each bidding segment is the starting coefficient of the next bidding segment. If the target price difference is greater than or equal to 0, it is a positive price difference, and a volume coefficient of [0, c, 1, 1.2, 1.2, 1.2] is generated. Among them, the starting coefficient of the first bidding segment is 0, and the ending coefficient is c; the starting coefficient of the second bidding segment is c, and the ending coefficient is 1; the starting coefficient of the third bidding segment is 1, and the ending coefficient is 1.2, and so on.
[0046] If the target price difference is less than 0, it is a negative price difference, and the quoting volume coefficient is generated as [0, 1, c, c, c, c]. Among them, the starting coefficient of the first quoting segment is 0, and the ending coefficient is 1; the starting coefficient of the second quoting segment is 1, and the ending coefficient is c; the starting coefficient of the third quoting segment is c, and the ending coefficient is c, and so on.
[0047] In some embodiments, generating a declaration price according to the target price, the target price difference, and the predicted price of the target date includes: if the target price difference is a positive price difference, generating a first declaration price, where the first declaration price is less than the smaller value of the target price and the predicted price of the target date; if the target price difference is a negative price difference, generating a second declaration price, where the second declaration price is greater than or equal to the larger value of the target price and the predicted price of the target date.
[0048] Among them, if the target price difference is a positive price difference, it means that the predicted day-ahead price may be greater than the real-time price, and there is a risk of loss in the predicted transaction. Therefore, the corresponding declaration price will choose a lower price to reduce potential losses. On the contrary, if the target price difference is a negative price difference, it means that the predicted day-ahead price may be less than the real-time price, and there is a profit opportunity in the predicted transaction. Therefore, the corresponding declaration price will choose a higher price to ensure winning the bid.
[0049] In some embodiments, the method for generating the day-ahead declaration strategy provided in the embodiments of the present application further includes: performing time-sharing processing on the 96-point data of each day in the historical power data to obtain the 24-point training data of each day; performing time-sharing processing on the 96-point data of the target date to obtain the 24-point day-ahead new energy prediction data, predicted price, and predicted power consumption; generating a declaration strategy for 24 points of the target date based on the time-sharing processed training data, day-ahead new energy prediction data, predicted price, and predicted power consumption.
[0050] Among them, the historical power data is the 96-point data of each day collected every 15 minutes. According to the time sequence, averaging every 4-point data can obtain the time-sharing data, that is, 24-point data. For example, averaging the data from 0 to 1 moment, that is, averaging the four day-ahead prices collected from 0 to 1 hour, averaging the four day-ahead new energy prediction data collected from 0 to 1 hour, and averaging the four day-ahead real-time price differences collected from 0 to 1 hour, to obtain three data at 1 moment, and then averaging the data from 1 to 2 moments, averaging the data from 2 to 3 moments, and so on, to obtain 24-point data for each day.
[0051] In some embodiments, the method for generating the daily declaration strategy provided by the embodiments of the present application further includes: dividing the historical power data into multiple training data subsets based on different time lengths; performing equal-width division on each of the training data subsets based on different bin widths; generating multiple alternative declaration strategies by combining different ones of the time lengths and the bin widths; determining a target declaration strategy with the smallest degree-of-electricity drawdown ratio based on the multiple alternative declaration strategies; extracting a target time length and a target bin width from the target declaration strategy; and generating an optimal declaration strategy for the target day based on the extracted target time length and the target bin width.
[0052] Among them, by selecting different time lengths, the historical power data can be divided into different training data subsets. Each training data subset corresponds to a different time length. Performing equal-width division on each training data subset, the interval length of the equal-width division is the bin width. By setting different bin widths, different binning results can be obtained, and different target price spreads and target prices can be obtained. By selecting combinations of different time lengths and different bin widths, for each combination parameter, a corresponding alternative declaration strategy can be obtained. By comparing the magnitudes of the degree-of-electricity drawdown ratios of multiple alternative declaration strategies, a target declaration strategy with the optimal combination parameters can be selected. The smaller the degree-of-electricity drawdown ratio of the strategy, the better the stability of the strategy and the stronger the risk control ability. Based on the target declaration strategy, the optimal combination parameters are obtained, including the target time length and the target bin width. Based on the optimal combination parameters, combined with the day-ahead new energy prediction data, predicted price, and predicted electricity consumption of the target day, an optimal declaration strategy for the target day can be generated.
[0053] In some embodiments, based on the optimal combination parameters, different declaration strategies for the target day can be realized by predicting the electricity consumption curves of different electricity selling companies.
[0054] In some embodiments, the calculation steps of the degree-of-electricity drawdown ratio of the alternative declaration strategy are as follows: performing backtesting on the alternative declaration strategy to generate the daily reported volume and daily reported price during the backtesting period; in the case where the daily reported price is greater than the day-ahead price, taking the daily reported volume as the day-ahead winning bid electricity volume; generating the daily degree-of-electricity profit and loss during the backtesting period based on the day-ahead winning bid electricity volume; generating the maximum degree-of-electricity drawdown ratio during the backtesting period based on the daily degree-of-electricity profit and loss; and taking the maximum degree-of-electricity drawdown ratio during the backtesting period as the degree-of-electricity drawdown ratio of the alternative declaration strategy.
[0055] In some embodiments, the calculation formula for the daily degree-of-electricity profit and loss is:
[0056]
[0057] Among them, the calculation formula for the daily time-of-use profit and loss profit is:
[0058] profit = -(P日前 -P 实时 )*(Q 日前 -Q 实际 )
[0059] In the above formula, p_kwh is the daily profit and loss per kWh, P 日前 is the day-ahead price, P 实时 is the real-time price, Q 日前 is the day-ahead winning bid electricity quantity, Q 实际 is the actual electricity consumption.
[0060] In some embodiments, the method for generating the day-ahead bidding strategy includes the following steps:
[0061] Step S100, obtain the historical power data of 96 points per day, and record the number of days corresponding to the specified time period as n_days.
[0062] Among them, n_days can be 20, 30, 40, 50 or 60. Based on the selected specified time period, the historical power data is divided into training data. The 96-point data per day includes data such as the day-ahead price, the day-ahead new energy prediction data, and the day-ahead real-time price difference.
[0063] Convert the 96-point data into 24-point data. Align the day-ahead new energy prediction data, the day-ahead price, and the day-ahead real-time price difference in time series among the 96 data per day, and calculate the average of every 4 data to obtain 24-point data. Process one data every fifteen minutes into one data every hour.
[0064] Step S300, perform equal-width partitioning on the day-ahead new energy prediction data in the training data, and divide the training data into several bins according to the results of the equal-width partitioning.
[0065] Among them, the bin width is denoted as level_split. Each bin includes the day-ahead new energy prediction data, as well as the corresponding day-ahead price and day-ahead real-time price difference at the same moment. The bin width can be 500, 1000, 1500 or 2000. For example, the range of the day-ahead new energy prediction data is [0, 2000], the bin width is set to 500, and according to the results of the equal-width partitioning of the new energy prediction data, the training data is divided into several bins. The new energy prediction data is equally divided into four bins: [0, 500], [500, 1000], [1000, 1500], and [1500, 2000]. For each division interval of the new energy prediction data, the corresponding day-ahead price and day-ahead real-time price difference are classified together to form a bin.
[0066] Step S500: Process the 96 - point data of the target date into 24 - point time - sharing data in the above - mentioned manner. Determine the target bin where the new - energy prediction data of the target date is located. In the target bin, calculate the average of the real - time price differences before the day to obtain the target price difference of the target date; calculate the average of the prices before the day to obtain the target price of the target date. Among them, the target price is denoted as his_price, and the predicted price of the target date is denoted as pred_price.
[0067] Step S700: Generate the bidding strategy for the target date. According to the target price difference, target price, and predicted price of each period, conduct bidding for each period.
[0068] Among them, the bidding periods include 24 periods. If the new - energy prediction data before the day of the target date is not within the historical statistical range, for example, exceeding [0, 2000], then set the target price difference d to 0 and the target price his_price to 600.
[0069] Since the actual electricity consumption cannot be obtained during bidding, the predicted electricity consumption is multiplied by the bidding coefficient for bidding. Specifically, for a certain bidding segment in a certain bidding period, the bidding volume is obtained by subtracting the starting coefficient from the ending coefficient in the bidding coefficient and then multiplying by the predicted electricity consumption. The bidding price is determined according to the following rules: If the target price difference d is greater than or equal to 0, it is a positive price difference, and the bidding price is the smaller value of the predicted price and the target price. If the target price difference d is less than 0, it is a negative price difference, and the bidding price is the larger value of the predicted price and the target price.
[0070] The specific declaration strategy is shown in Table 1 below. In the 1st period, the target price difference d is less than 0, and the predicted price difference is negative. Therefore, it is hoped to win more electricity before the bid date. The declaration coefficient is set as follows: the coefficient of the first segment is set to [0, 1], its starting coefficient is 0, and the ending coefficient is set to 1. The corresponding declared price can be set to be close to the market upper limit price of 650, and according to the empirical value, it can be set to 630; the coefficient of the second segment is set to [1, c], where 1 is the ending coefficient of the first segment and also the starting coefficient of the second segment. The ending coefficient c of the second segment is calculated from the target price difference d. The corresponding declared price is the larger value of the predicted price pred_price and the target price his_price on the target date, denoted as max(his_price, pred_price); the coefficient of the third segment is set to [c, c], and the corresponding declared price is the larger value of the predicted price pred_price and the target price his_price on the target date, denoted as max(his_price, pred_price). In the 2nd period, the target price difference d ≥ 0, and the predicted price difference is positive. Then the declaration coefficient for this declaration period is [0, c, 1, 1.2, 1.2, 1.2]. Among them, the coefficient of the first segment is set to [0, c], and the ending coefficient of the first segment is calculated from c. The corresponding declared price is the minimum value of the predicted price and the target price on the target date, denoted as min(his_price, pred_price); the coefficient of the second segment is set to [c, 1], and the corresponding declared price is the smaller value of the predicted price and the target price on the target date minus 100. Since the day-ahead price is within the range of [min(his_price, pred_price) - 100, pred_price], it is considered that the probability of a positive price difference becomes smaller, and it is necessary to ensure winning the bid, so the ending coefficient is set to 1; the coefficient of the third segment is set to [1, 1.2], and the corresponding declared price is the market lower limit price of 40. And so on, the declaration strategy for 24 periods is generated. In the electricity market trading rules, it is stipulated that the minimum declared electricity quantity of users for day-ahead is 0 and the maximum declared electricity quantity is 1.2 times the installed capacity. Among them, the starting coefficient and the ending coefficient are the unit declared quantity coefficients without considering the user's electricity quantity.
[0071] Table 1
[0072]
[0073] In some embodiments, the calculation steps of the per-kWh drawdown ratio of the backup declaration strategy are as follows:
[0074] Step 1: Backtest the backup declaration strategy to generate the daily declared quantity and daily declared price during the backtest period.
[0075] Among them, backtesting is to verify the feasibility of the strategy through simulated trading using historical electricity data for a period of time.
[0076] Step 2: When the daily offer price is greater than the day-ahead price, take the daily offered quantity as the day-ahead winning bid quantity.
[0077] In the electricity market, only when the strategic offer price is higher than the day-ahead price will the winning bid quantity be settled, and finally the time-of-use day-ahead winning bid quantity will be obtained.
[0078] Step 3: Generate the daily profit and loss per kWh during the backtest period based on the day-ahead winning bid quantity;
[0079] Among them, the calculation formula for the daily profit and loss per kWh \(p_{kwh}\) is:
[0080]
[0081] The calculation formula for the daily time-of-use profit and loss is:
[0082] profit = -(P 日前 - P 实时 ) * (Q 日前 - Q 实际 )
[0083] In the above formula, P 日前 is the day-ahead price, P 实时 is the real-time price, Q 日前 is the day-ahead winning bid quantity, Q 实际 is the actual electricity consumption. When profit is negative, it represents a loss, and when profit is positive, it represents a profit, and the daily time-of-use profit and loss profit is obtained.
[0084] Among them, the sequence of daily profit and loss per kWh \(p_{day}\) during the backtest period can be expressed as:
[0085] p_{day} = [p_{kwh1}, p_{kwh2},... p_{kwh k
[0086] Step 4: Generate the maximum drawdown ratio per kWh during the backtest period based on the daily profit and loss per kWh, including the following steps:
[0087] S41. First, initialize and calculate the cumulative profit and loss per kWh sequence \(p_{sum}\) as follows:
[0088] p_{sum} = [p_{kwh1}, (p_{kwh1} + p_{kwh2}),... (p_{kwh1} + p_{kwh2} +... + p_{kwh k )]
[0089] For example, if the profit and loss per kWh on the first day is 0.1, the profit and loss per kWh on the second day is 0.2, and the profit and loss per kWh on the third day is -0.1, then the cumulative profit and loss per kWh sequence is [0.1, 0.3, 0.2].
[0090] Set the overall maximum drawdown D max :
[0091] D max = 0
[0092] S43. For each point i in the cumulative profit and loss sequence per kWh p_sum, initialize the maximum drawdown D for this round i :
[0093] D i = 0
[0094] S45. For each point i, calculate the drawdown value D from point i to point j ij , where j > i,
[0095] D ij = |p_sum i - p_sum j |
[0096] If the drawdown value D ij is greater than the maximum drawdown for this round, update the maximum drawdown for this round to the current drawdown value, i and
[0097] D i = max(D ij , D i )
[0098] After the above steps, obtain the maximum drawdown D for this round i .
[0099] S47. Compare the maximum drawdown D for this round i with the overall maximum drawdown D max . If the maximum drawdown for this round is greater than the overall maximum drawdown, update the overall maximum drawdown to the maximum drawdown for this round,
[0100] D max = max(D max , D i )
[0101] Repeat steps S43 - S47 until all points i have been used as the starting point to calculate the drawdown, and obtain the overall maximum drawdown D max .
[0102] Step S49. Based on the overall maximum drawdown, calculate the maximum drawdown ratio per kWh R during the backtest period
[0103]
[0104] where profit_kwh is the overall profit and loss per kWh during the backtest period, and its calculation formula is as follows:
[0105]
[0106] Step 5: Use the maximum drawdown ratio per kilowatt-hour of the backtesting period as the drawdown ratio per kilowatt-hour of the alternative declaration strategy.
[0107] In some embodiments, different alternative declaration strategies can be generated by selecting different time lengths and bin widths. Compare the drawdown ratios per kilowatt-hour of different alternative declaration strategies, screen out the target declaration strategy with the smallest drawdown ratio per kilowatt-hour, and save the corresponding time length and bin width in the target declaration strategy as the optimal parameter combination. Based on the optimal parameter combination, by inputting the day-ahead new energy prediction data, predicted price, and predicted electricity consumption of the target day, a declaration strategy for multi-segment volume and price reporting can be obtained.
[0108] The drawdown ratio per kilowatt-hour of the declaration strategy proposed in the embodiments of the present application is approximately 22.7% lower than that of the trend strategy, more stable and with lower risk than other strategies, as shown in Table 2 below.
[0109] Table 2
[0110]
[0111] Correspondingly, please refer to Figure 2 , Figure 2 is a schematic diagram of a system for generating a day-ahead declaration strategy provided by an embodiment of the present application. An embodiment of the present application provides a system for generating a day-ahead declaration strategy, which can implement the above-mentioned method for generating a day-ahead declaration strategy. The day-ahead declaration system includes: an acquisition module for acquiring training data, where the training data includes day-ahead price, day-ahead new energy prediction data, and day-ahead real-time price difference; a binning module for equally dividing the day-ahead new energy prediction data in the training data, and dividing the training data into several bins according to the results of the equal-width division; a generation module for determining the target bin where the day-ahead new energy prediction data of the target day is located, and generating the target price difference and target price of the target day according to the day-ahead real-time price difference and day-ahead price of the target bin; a declaration module for generating a volume coefficient according to the target price difference; for generating a declaration price according to the target price, the target price difference, and the predicted price of the target day; for generating a declaration strategy based on the volume coefficient, the declaration price, and the predicted electricity consumption of the target day.
[0112] The further functional descriptions of the above-mentioned various modules and units are the same as those in the corresponding embodiments above, and will not be repeated here.
[0113] The system for generating the day-ahead declaration strategy in this embodiment is presented in the form of functional units. Here, the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0114] Please refer to Figure 3 , Figure 3 which is a schematic structural diagram of a computer device provided by an embodiment of the present application. As Figure 3 shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a set of blade servers, or a multi-processor system). Figure 3 In
[0115] which, one processor 10 is taken as an example.
[0116] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0117] The memory 20 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 may optionally include a memory remotely provided with respect to the processor 10, and these remote memories may be connected to the computer device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0118] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive; the memory 20 may further include a combination of the above types of memories.
[0119] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0120] The embodiments of the present application further provide a computer-readable storage medium. The methods according to the embodiments of the present application may be implemented in hardware, firmware, or may be implemented as computer code that can be recorded on a storage medium, or may be implemented as computer code originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and to be stored in a local storage medium, so that the methods described herein can be processed by such software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium may further include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the methods shown in the above embodiments are implemented.
[0121] The embodiments of the present application provide a computer program product. The computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods of any embodiment of the present application.
[0122] Although the embodiments of the present application are described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations fall within the scope defined by the appended claims.
[0123] The systems, modules or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0124] For the convenience of description, the above devices are described by dividing them into various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0125] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0126] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0127] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one or more flows and / or blocks Figure 1The functions specified in one or more boxes.
[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing the steps of the functions specified in one Figure 1 One process or more processes and / or boxes Figure 1 The steps of the functions specified in one or more boxes.
[0129] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the presence of additional identical elements in the process, method, commodity or device comprising the said element.
[0130] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
[0131] The above are only the embodiments of the present application and are not used to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
[0132] Although the embodiments of the present application are described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations fall within the scope defined by the appended claims.
Claims
1. A method for generating a day-ahead declaration strategy, characterized in that: The method comprises: Acquire training data, wherein the training data includes day-ahead price, day-ahead new energy forecast data, and day-ahead real-time price difference; Performing equal-width division on the day-ahead new energy forecast data in the training data, and dividing the training data into a plurality of bins according to the result of the equal-width division; Determine the target bin where the day-ahead new energy forecast data of the target day is located, and generate the target price difference and target price of the target day based on the day-ahead real-time price difference and day-ahead price of the target bin; Generate a quotation volume coefficient based on the target price difference; Generate a declared price according to the target price, the target price difference and the predicted price on the target day; A declaration strategy is generated based on the declaration quantity coefficient, the declaration price and the predicted electricity consumption on the target day.
2. The method according to claim 1, characterized in that: According to the day-ahead real-time price difference and day-ahead price of the target bin, the target price difference and target price of the target day are generated, including: Calculate the average of the day-ahead real-time price differences in the target bins to obtain the target price difference for the target day; The day-ahead prices in the target bins are averaged to obtain the target price for the target day.
3. The method according to claim 1, characterized in that According to the target price difference, a volume coefficient is generated, including: If the target spread is a positive spread, the generated volume coefficient is [0, c, 1, 1.2, 1.2, 1.2]; If the target price difference is a negative price difference, the generated quotation coefficient is [0, 1, c, c, c, c]; Wherein, c is the target coefficient, and the relationship between it and the target price difference d is: c = 1-0.004d.
4. The method according to claim 1, characterized in that: Generate a declared price according to the target price, the target price difference and the predicted price on the target date, including: If the target price difference is a positive price difference, a first declared price is generated, and the first declared price is less than the smaller value between the target price and the predicted price of the underlying day; If the target price difference is a negative price difference, a second declared price is generated, and the second declared price is greater than or equal to the larger value of the target price and the predicted price of the target day.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Perform time-sharing processing on the 96-point data of daily historical power data to obtain the training data of 24 points daily; The 96-point data of the target day are processed in time-sharing mode to obtain the 24-point day-ahead new energy forecast data, forecast price and forecast electricity consumption; Based on the training data processed in time-sharing, the new energy forecast data of the day before, the forecast price and the forecast electricity consumption, a declaration strategy for 24 o'clock on the target day is generated.
6. The method according to claim 1, characterized in that The method further comprises: Based on different time lengths, the historical power data is divided into multiple training data subsets; Based on different box widths, each of the training data subsets is divided into equal widths; Generate multiple alternative declaration strategies by combining different time lengths and box widths; Based on the multiple backup declaration strategies, determine a target declaration strategy with the smallest kilowatt-hour withdrawal ratio; Extracting the target time length and target box width in the target declaration strategy; Based on the extracted target time length and target box width, the optimal declaration strategy for the target day is generated.
7. The method according to claim 6, characterized in that The calculation steps of the kilowatt-hour drawdown ratio of the backup declaration strategy are as follows: Backtest the backup declaration strategy to generate daily volume and daily quotes for the backtest period; When the daily bid is greater than the day-ahead price, the daily bid volume will be used as the day-ahead winning bid volume; Based on the previous day's winning bid volume, generate the daily kilowatt-hour profit and loss during the backtest period; Based on the daily kilowatt-hour profit and loss, generate the maximum kilowatt-hour drawdown ratio during the backtest period; The maximum kilowatt-hour drawdown ratio during the backtest period is used as the kilowatt-hour drawdown ratio of the backup declaration strategy.
8. The method according to claim 7, characterized in that The calculation formula for the daily electricity profit and loss is: Among them, the calculation formula for daily time-sharing profit is: profit=-(P 日前 -P 实时 )*(Q 日前 -Q 实际 ) In the above formula, p_kwh is the daily electricity loss and profit, P 日前 is the day-ahead price, P 实时 is the real-time price, Q 日前 is the current winning bid quantity, Q 实际 The actual power consumption.
9. A system for generating a day-ahead declaration strategy, characterized in that: A method for generating a day-ahead declaration strategy according to any one of claims 1 to 8 can be implemented, the system comprising: An acquisition module, used to acquire training data, wherein the training data includes day-ahead price, day-ahead new energy forecast data and day-ahead real-time price difference; A binning module, used for performing equal-width division on the day-ahead new energy forecast data in the training data, and dividing the training data into a plurality of bins according to the result of the equal-width division; A generation module is used to determine the target bin where the new energy forecast data of the target day is located, and generate the target price difference and target price of the target day according to the real-time price difference and the price of the target bin; A declaration module is used to generate a declaration volume coefficient according to the target price difference; to generate a declaration price according to the target price, the target price difference and the predicted price of the target day; and to generate a declaration strategy based on the declaration volume coefficient, the declaration price and the predicted electricity consumption of the target day.
10. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are connected to communicate with each other, the memory stores computer instructions, and the processor executes the method for generating a day-ahead declaration strategy according to any one of claims 1 to 7 by executing the computer instructions.