{'fraction_non_alphanumeric': 0.027396331332858643, 'fraction_numerical': 0.006713457430576747, 'mean_word_length': 4.561757495757119, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Trading Data for Wind Power Forecasting: A Regression Market with Lasso Regularization

This paper proposes a regression market for wind agents to monetize data traded among themselves for wind power forecasting. Existing literature on data markets often treats data disclosure as a binary choice or modulates the data quality based on the mismatch between the offer and bid prices. As a result, the market disadvantages either the data sellers due to the overestimation of their willingness to disclose data, or the data buyers due to the lack of useful data being provided. Our proposed regression market determines the data payment based on the least absolute shrinkage and selection operator (lasso), which not only provides the data buyer with a means for selecting useful features, but also enables each data seller to individualize the threshold for data payment. Using both synthetic data and real-world wind data, the case studies demonstrate a reduction in the overall losses for wind agents who buy data, as well as additional financial benefits to those who sell data.


Introduction
As the complexity and uncertainty of modern energy systems grow, the value of data for improving system and market operations has become a focus of academic research in recent years [1]. One important usage of data is to inform the forecast of loads and generation [2]. Focusing on wind power forecasting, this paper investigates how the value of external data can be quantified and monetized.
The added value of data for wind power forecasting has been well examined under the assumption that data from external sources is a free and highly accessible commodity [3][4][5]. However, this assumption becomes unrealistic in applications where data privacy is highly valued [6] or where a conflict of interest exists between the data owners and the data users [7].
To incentivize data exchange, recent literature has been exploring the idea of a data market, in which the data owners (sellers) receive financial compensation from the data users (buyers) for their disclosure of data [8]. In general, these market frameworks can be put into two categories: buyer-centric markets and seller-centric markets. In a buyer-centric market, the data buyer has full control over the data price, while each data seller is either assumed to always accept the offer [9], or given a binary choice on the offer while suffering a privacy loss [10,11]. By contrast, a seller-centric market gives the data sellers the authority to directly add noise to the data [12], or has a third party set the price based on the added value of previously traded data [13]. In the latter, noise is also added to the data if the offering price from the data buyer is lower than the set price. As these market frameworks are often based on game theory, it is often computationally intensive to find the market equilibrium in a noncooperative game setting [10][11][12] or to derive the market payoffs in a cooperative game setting [13].
In the context of wind power forecasting, it has been shown in the literature that data from surrounding sites, such as other wind farms, can help improve forecast accuracy substantially due to the significant spatio-temporal correlations [4,14]. A wind agent's losses from forecast errors are commonly measured by the mean squared error (MSE) of the forecast compared to the target values of power generation [15,16]. Using the reduction of MSE as the measurement for a wind agent's profit as a data buyer, [7] and [9] adopt the ordinary least squares (OLS) regression to estimate the forecasting parameters, and construct data markets to incentivize wind agents as market competitors to trade data among themselves. The framework in [7] adopts the pricing scheme from [13]. where the price of data in each trade is determined by the added value of the sellers' data to the previous buyers. As a result, the market outcomes are dependent on the ordering of the buyers, leading to potential large suboptimality gaps and unfairness. Instead of pricing the data prior to each trade, the framework in [9] quantifies the reduction of the losses for each data buyer and allocates the resulting savings to the sellers based on their contribution to the buyer's task. The caveat of this market is the assumption that the sellers have no revenue requirements, when in reality this might not hold true.
OLS regression is known to be highly sensitive to outliers and prone to overfitting when the supporting features, sets of data that are fitted to the target variable in the regression, are highly correlated [17]. Since wind power data for closely located wind farms are likely highly correlated, feature selection methods such as the least absolute shrinkage and selection operator (lasso) [18] have been widely adopted for parameter estimation in wind power forecasting [16,19,20]. It helps eliminate the impact of less correlated data in the forecasting task through adding to the loss function the product of a positive regularization parameter and the absolute value of the coefficient for each feature, referred to as the lasso term.
We observe that not only is the lasso term effective in preventing overfitting, but it can also provide a tool for thresholding the selection of features through customizing their corresponding regularization parameters: the higher the regularization parameter, the more correlated a feature has to be to the target to be selected. This observation serves as the inspiration for our proposed market framework.
The main contribution of this paper is the design of a lasso regression market for wind power forecasting, in which the lasso term is exploited as a measure for direct payments from data buyers to data sellers. This market framework has three main advantages: 1) compared to the seller-centric model, the lasso provides the buyers with better quality data through selecting from the sellers' data the features that are most likely to improve the forecast without additional noise; 2) compared to the buyer-centric model, sellers are given the authority to threshold their financial reward through individualizing the lasso regularization parameter; and 3) compared to data markets that are set up based on game theory, the computation of the market outcomes is simpler as the lasso term as an output from the regression directly represents the payment.
The paper is structured as follows: Section 2 introduces the market participants. Section 3 describes the OLS regression and the lasso regression for the data buyer's analytics task. Section 4 formulates the lasso regression market for wind agents and proves its financial viability for both data buyers and data sellers. Section 5 uses synthetic data and measured data from Nord Pool 1 to demonstrate the effectiveness of the proposed market. Section 6 concludes the paper with discussions on the key findings and future work.

Market Participants
The use case for the proposed regression market is data trading among wind agents. The data buyer is called a central agent who has an analytics task to estimate parameters for forecasting wind power. The other wind agents are data sellers, referred to as support agents, hold data that could potentially improve the central agent's forecast, and expect to be remunerated for sharing those data. We focus on a single-buyer setup, but it can be easily extended to multiple buyers since the agents' analytics tasks are independent of each other in the sense that the outcome of a central agent's forecasting task does not affect any concurrent task of another agent.

Agents and the Analytics Task
We denote the full set of wind agents by N = {1, 2, . . . , N }, indexed by i, so i ∈ N . The data buyer, or the central agent c ∈ N , has an analytics task to estimate parameters for forecasting wind power as a time series target variable, denoted by vector y c = [y c,1 y c,2 . . . y c,T ] , where T is the total number of time steps of concern. The support agents are gathered in set N −c = N \ {c} = {i ∈ N |i = c}, and the data owned by each agent i are in set where D i→c is the total number of relevant features from agent i for the central agent's analytics task, and vector x d i represents agent i's dth feature (e.g., l-hour-ahead wind power data: . The analytics task with all agents' data is given bŷ where X N = ∪ i∈N X i gathers the relevant input features of the central agent and support agents, andB N is the set of estimated parameter values for the analytics task. If the analytics task follows a linear regression framework,B N = {β d i |i ∈ N , d = 1, . . . , D i→c } ∪ {β 0 N } is the set of linear coefficients, with each element corresponding to a feature of an agent and β 0 N representing the intercept term.
Similarly, if the central agent only relies on their own data for the analytics task, it solveŝ whereB c = {β d c |d = 0, 1, . . . , D c→c } gathers the linear coefficients corresponding to the features owned by the central agent, with β 0 c being the intercept. Using results from (1) and (2), the central agent can forecast the target variable asŷ c X N ,B N andŷ c X c ,B c , respectively. Details on linear regression for the analytics task and forecasting are explained in Section 3.

Support Agents and Reservation to Sell Data
Note that the support agents and the central agent can be competitors in the same energy market, which may discourage the support agents from disclosing their data. We measure this barrier in the form of a payment threshold denoted by representing the payment required by support agent i ∈ N −c for disclosing data associated with their dth feature. It is a function of u d i and β d i , measuring, respectively, the reservation of agent i to sell their dth feature, and how correlated this feature is to the central agent's target variable. Therefore, the higher u d i and β d i are, the higher the payment needs to be for agent i to disclose their dth feature to the central agent. In other words, the payment threshold increases as the support agent becomes less willing to sell their data, and as the correlation between the support agent's data and the central agent's target variable becomes stronger.
Some factors that a support agent may take into account when determining their revenue threshold includes the valuation of their loss of privacy, the valuation of their losses due to an increase in their competitor's profit, the cost of collecting data and offering into the regression market, etc. In our proposed framework, the revenue threshold is non-negative. In practice, however, there could be scenarios where the support agent is able to benefit directly from the improvement of the central agent's analytics task (e.g., an overall improvement of the forecast of renewable generation in the energy market can lead to a decrease in the imbalance price that is eventually passed down to all the renewable agents), and is thus willing to receive a negative payment in the regression market. We choose to leave the latter scenario for future work.

Central Agent and Willingness to Buy Data
We assume that the central agent uses the MSE to measure the average losses from the forecast for each time step: whereŷ c = [ŷ c,1ŷc,2 . . .ŷ c,T ] . In practice, the central agent may assign a scaling factor to the MSE to represent their actual losses in monetary terms, but we assume this scaling factor to be "1" in this paper for simplicity. Therefore, S MSE c can be considered to directly represent the central agent's mean financial losses at each time step.
Given the payment threshold H d i to obtain agent i's dth feature, in order for the central agent to financially benefit from purchasing data in the regression market, it requires

Analytics Task under Linear Regression
Given (5), we anticipate there to be an opportunity for the central agent to purchase data from the support agents while making sure the total payment is lower than the reduced losses for the forecast. In this section, we define the analytics tasks in different forms of linear regression for both the case with only the central agent's own data and the case with additional data from the support agents.

Forecast with Linear Coefficients
In the case where the central agent c only considers their own features, the forecast of their target based on the coefficients from a linear regression can be written aŝ In contrast, if the features of the support agents were also considered, the forecast would becomê where β 0 N = i∈N β i,0 is the sum of the intercept terms of all agents, and thus the overall intercept. In the rest of the paper we assume that the dependencies of the target variable on the features are stationary, and thus the true linear coefficients do not vary with time. For ease of notation, we define vector , ∀i ∈ N as the values of all of agent i's features used for the forecast of the central agent's target variable at time step t.

Baseline Losses using OLS Regression on Own Features
Without a data market, the central agent can only rely on their own data for the analytics task and forecasting. We construct the central agent's own regressor vector c * ] to denote the vector of linear coefficients for the regressors. Using OLS regression, the analytics task in (2) becomes Comparing (8) and (4), since the constant 1 T does not affect the "argmin" function, we can rewrite (8) as Since the MSE measures the central agent's financial losses from the forecast (Section 2.3), we can consider S MSE c (ŷ c (X c , β * c )) the baseline losses of the central agent without access to data from other agents.

Losses using Lasso Regression with Support Features
When data from the support agents are made available to the central agent, there is a potential for the central agent to improve their forecasting accuracy. An OLS regression can again be applied to fit the available features, but a well known drawback of OLS regression is its sensitivity to outliers and highly correlated features, which tends to result in overfitting the data and compromising the forecast accuracy [17]. Additionally, if the data collected from the support agents are of low quality (e.g., containing missing values, voluntarily flawed, etc.), OLS regression is not capable of eliminating these corrupted features. One way to mitigate such risks is to apply cross-validation of the support features, but it can be computationally expensive and complicates the market set up (i.e., how to reward the support agents for the portion of their data that are only used for crossvalidation). Another way is to use feature selection methods, including L p regularization methods that have been proposed to reduce the impact of less correlated features on the forecast performance. Among these, the lasso is a popular regularization method that yields sparse coefficient matrices, which helps prevent overfitting [18]. The lasso term is an L 1 -norm penalty applied to the coefficients of a linear regression problem.
To implement the lasso regression on the features of all agents, we construct the all-agents regressor vector We then denote the vector of the corresponding linear coefficients using lasso regression by Applying the generic lasso estimator, the analytics task in (1) becomes where λ is the lasso regularization parameter. The lasso term λ β 1 shrinks some coefficients and sets some of them to zero. As a result, it reduces or even eliminates the influence of the features that are less likely to contribute to the improvement of the forecast. The greater λ is, the more shrinkage is applied to the regression coefficients.
We apply a constant factor of 2 T within the "argmin" function in (11) and rewrite it based on (7) and (4) as Similarly represents the financial losses of the central agent if the forecast is based on a lasso regression given all support agents' features.

Regression Market with the Lasso
In this section, we introduce the concept of the lag in time series data as a way to define the number of relevant features from recent time steps from each agent. For wind power forecasting, the lag not only captures the temporal correlations of the wind generation at a specific site, it also indirectly captures the spatial correlations between neighboring sites as a result of the natural development of wind [14]. Using the lasso term to define the payment, we then construct a regression market for wind agents, which is proved to meet the payment requirement of support agents while guaranteeing profit for the central agent. We note that only in-sample market outcomes are analyzed in this paper, meaning T can also be interpreted as the total number of time steps for training the model.

Linear Regression on Features with a Fixed Maximum Lag
Recall from Sections 2 and 3 that D i→c represents the number of relevant features from each agent. Here, since we are dealing with time series data, we equate D i→c to agent i's maximum lag, which is the number of recent time steps that are considered relevant for the target variable. This means that each feature from a support agent represents their data of a certain lag to the target variable. Assuming features from all agents are available up to one time step before the target variable y c,t is revealed, and that a fixed maximum lag D applies to all agents, i.e., D i→c = D, ∀i ∈ N , the relevant features for y c,t from any agent i can be gathered in the vector ] . Therefore, (9) and (11) can be rewritten as and For clarity, we expand the following matrix operation in (14) as

Regression Market with the Lasso Term as Payment
Considering all T time steps, we rewrite the average financial losses of the central agent as a function of the regressor matrix X and a given vector of linear coefficients β as where |β| equals the number of features available for the regression including the intercept.
In the generic lasso estimator in (14), a single λ is applied to all the coefficients, whereas in practice we can assign different λ's to different coefficients without compromising the computation efficiency. Therefore we can construct a lasso regularization scalar matrix λ , where we set λ 0 = 0 to ensure no shrinkage is applied to the intercept term. We then define the lasso loss function as So (14) can be modified as Here, we propose to use (17) as the basis for the regression market for wind agents. Relying on their own data, the central agent has the baseline financial losses of S MSE c X {c},T , β * c . When support agent i ∈ N −c offers feature x d i,t into the market, they also have the freedom to set λ d i based on u d i , their reservation to sell (Section 2.2). After the market operator conducts the market using (17)  Proof. In order to avoid shrinkage of the central agent's own features, we construct scalar matrix Let us construct a vector of regression parametersβ ∈ R 1+N D := [β 0β We further set Therefore, the central agent's average financial losses per time step using their own features are given by Applyingβ to the lasso loss function of the central agent using all agents' features, we have where we obtain (30) from (29) by setting λ d i = T 2 u d i . Since (30) is the central agent's sum of financial losses and data payments in the regression market, and (26) is the central agent's financial losses without the regression market, we have thus proved Proposition 1.
Note that with (26) ≥ (30), we also prove that (5) is satisfied, which means the central agent is guaranteed to financially benefit from the regression market.
To further explain this, let us consider a support feature x d i,t for estimating y c,t . In order for the market operator (17) not to set the corresponding coefficient β d i to zero, it has to contribute to a reduction in financial losses that is greater than or equal to the payment it incurs. Using the assumption λ d i = T 2 u d i in Proposition 1, the payment to agent i for feature meeting the payment requirement of each support agent i. In summary, the proposed regression market guarantees financial viability for both the support agents and the central agent.
Observe that a direct relationship is drawn between the linear coefficients of support features and the payment, without the support features being standardized in the lasso regression. This means that a support feature's mean and variance can influence the linear coefficient, thus the payment as well. Therefore, each support agent, given a desirable revenue threshold, needs to set their reservation to sell accordingly to account for the means and variances of their support features. The reservation to sell can be considered an independent choice of each support agent with the aim to achieve a certain revenue threshold rather than a metric to compare laterally support agents' willingness to disclose their data. An alternative way of designing the market is to require each support agent to submit standardized data and the corresponding reservation to sell. We choose the former to provide the possibility for support agents to encrypt both their data and their true reservation to sell before submitting features to the market [21].
The linear relationship between the payment and the absolute value of the coefficient also raises the question of whether other forms of the payment term (e.g., a quadratic term in β) could apply to the regression market. Albeit it not being the focus of the paper, the lasso regularizer can also enable the regression with support agents' data to be conducted in a distributed manner [20], thus providing another level of privacy protection. Therefore, we apply the lasso payment in our proposed framework, with the aim to extend it to distributed learning in the future.

Case Studies
To verify the performance of the proposed regression market, we design two case studies in this section. In the first case study, we construct synthetic datasets for all the agents with fixed linear correlations. This way we have the ground truth of the correlations between the agents' data to verify the model results. In the second case study, we use the hourly wind generation zonal data from Nord Pool to demonstrate the impact of the support agents' reservation to sell on the profit of the market participants.

Regression Market Implemented on Synthetic Data
In this case study, we use an autoregressive process to simulate the data of 4 independent market players (P2-P5) with first order autocorrelations, meaning that their data only have a linear correlation with their own data from the previous time step. Then we use a vector autoregressive process to simulate one market player (P1) that holds data with first order correlations with the other agents. Assuming each time step is one hour, the synthetic data are generated by where z t = [z 1,t z 2,t · · · z 5,t ] denote both the target and feature values of players (P1-P5), and ε t = [ε 1,t ε 2,t · · · ε 5,t ] represent the error terms: ε i,t ∼ N (0, 1). Focusing on P1 and P2 as central agents, we let the market operator conduct their analytics tasks using different regression methods and obtain the estimated coefficients to compare with the known real coefficients. With a fixed maximum lag of 3 hours and a total training time of 10 days,  To see how the results from the the regression change as the training time increases, Fig. 3 and Fig. 4 provide a visual representation of the estimated coefficients. For P1, lasso regression demonstrates a clear advantage over OLS regression for reducing overfitting, and over OLS selfregression for being able to capture correlations with features from support agents. For P2, even though the lasso regression cannot provide much additional benefit to the central agent, it is still effective in identifying the agent's independence and reducing overfitting. Next, we evaluate the impact of the training time on the profits of the agents. Here, we reiterate that the analyses done in this paper are in-sample, meaning the central agent's profit only reflects the forecast improvement during the training period. As Fig. 5 shows, increasing the training time T eventually reduces the support agents' average profit per time step to zero regardless of the correlations between the support agents and the central agent. This is because the payment term u d i β d i L 1 from (31) does not scale with T . In practice, in order to fulfill a certain revenue threshold per time step, the support agents can take T into account when setting their reservation to sell (e.g., setting the u value in proportion to the length of their offered support features). Meanwhile, P1 and P2 as central agents have very different profit trajectories as T increases. For P1, as their data are highly correlated with the support agents, more training time improves the estimates of the coefficients, hence increasing their profit. For P2, as their data are independent of others, the improvement of their analytics task is limited to having the lasso shrink the untrue coefficients of their own data, and as the training time increases, this minor improvement also reduces to zero. Note that in reality, an agent with data that are completely independent from others would not have the motivation to participate in a data market.

Regression Market Implemented on Real Data
To test our proposed regression market on real-world data, we obtain zonal wind power data for Denmark and Sweden from the open source Nord Pool data repository. As an illustrative example, these data are aggregated in six zones 2 (DK1, DK2, SE1, SE2, SE3, and SE4) to represent six players in the regression market. In practice, since the clearing of the regression market is decoupled from the energy market, a central agent with assets in multiple energy market zones can participate in the regression market by adjusting their loss function to truthfully reflect their financial situation in the energy market. The main purpose of this case study is to examine the impact of the support agents' reservation to sell on the final market outcomes. Assigning DK1 as the central agent, and the others as support agents for the regression market, we use 1 hour as the time step, 1 hour ahead as the forecast horizon, 5 hours as the maximum lag, and 10 days (240 hours) as the training time. First, we assume all the support agents' reservation to sell (u d i ) for all the features to be the same value u. Varying its value, we plot the payments for  all the support agents in Fig. 6. In general, every agents' profit first increases with the u value, then peaks, and then reduces to zero. To explain this, we recall the payment term u d i β d i L 1 . When u d i = u = 0, the payment is zero, but β d i is at its peak due to a lack of shrinkage. As u increases, the profit increases, but meanwhile more shrinkage is applied to β d i . A peak appears when the trade-off between the two opposite forces reaches a balance, but afterwards the lasso gradually shrinks β d i to zero, and the profit becomes zero again. The position of the peak may have to do with the correlation and the magnitude of the support agent's data. This is an interesting topic for future work.
Lastly, we select from Fig. 6 the two agents whose profits peak the last to analyze the mutual impact of their reservation to sell on each other's profit. Here, we allow the reservation to sell for SE1 and SE2 to be different while fixing the other agents' u value, and show their resulting profits in Fig. 7. It is observed that within the demonstrated range, SE2 benefits from higher u values, while SE1 achieves the highest profit in the middle range. Meanwhile, each player's profit decreases as the other player's reservation to sell increases. So far, the reservation to sell has been used as a customized parameter by the support agents to ensure a revenue threshold, but the results from Fig.  7 raise the question of whether the support agents could instead strategically set the reservation to sell to maximize their gain in the regression market. Future research can examine the interplay of the reservation to sell of more than two players and the corresponding market equilibrium.

Conclusion
Adopting the lasso regularizer, we construct a regression market for wind agents to trade wind power data to improve forecasting. Each support agent as a data seller has the freedom to determine their reservation to sell each feature they own, which is incorporated in the lasso term of the central agent's analytics task under linear regression. The product of a support agent's reservation to sell a feature and the absolute value of the corresponding estimated coefficient is directly computed as the payment from the central agent for the sold feature. This market framework is proved to meet the support agents' profit requirements while guaranteeing financial benefits for the central agent. Some immediate future work includes the incorporation of out-of-sample analyses, the strategies to set the reservation to sell from the data sellers' perspective for maximizing individual gains, and the extension to an online market. This regression market can be applied to other use cases, where the data sellers have individual revenue requirements on the data sold to the data buyer. It can also be readily extended to a multi-buyer framework since the analytics tasks of multiple agents can be conducted simultaneously and the outcome of each agent's task does not affect the task of another.