Static Hedging of Weather and Price Risks in Electricity Markets

We present the closed-form solution to the problem of hedging price and quantity risks for energy retailers (ER), using financial instruments based on electricity price and weather indexes. Our model considers an ER who is intermediary in a regulated electricity market. ERs buy a fixed quantity of electricity at a variable cost and must serve a variable demand at a fixed cost. Thus ERs are subject to both price and quantity risks. To hedge such risks, an ER could construct a portfolio of financial instruments based on price and weather indexes. We construct the closed form solution for the optimal portfolio for the mean-Var model in the discrete setting. Our model does not make any distributional assumption.


Introduction
The electric power sector includes the generation, transmission, distribution and commercialization of electric power. Regulation in the Whole Sale Power Market (WPM) also created the figure of Load Serving Entities (LSE) , which are intermediary agents whose purpose is to make competition dynamic and to provide the final customers with different ways to access competitive prices in the electric market of whole sellers. Regulation in the market allows these agents to sell electric power to their customers through contracts which are endorsed by the electric generators to guarantee supply to the users. LSEs can take endless risks and, in the case of bankruptcy, they have no assets to lose. Electric power generators have warned of the risk that the existence of agents, who had agreed on long-term contracts without a real electric endorsement and used the electric financial market as an instrument to comply with their contractual obligations, could have on the future feasibility of the electric wholesale market. In times of low prices, the LSEs have probably not had any difficulty to comply with their obligations with the electric financial market and signed contracts. On the contrary, in times of high prices, LSEs would be surely facing financial difficulties due to their losses and would opt out of businesses in detriment of the wholesale market and their customers.
In this paper we consider regulated LSEs which are denominated Energy retailers (ER). An energy retailer (ER) procures power from the wholesale market at the spot price and resells it to consumers exhibiting variable demand. ERs have to buy electricity at a variable price set by the supply and demand equilibrium and serve a volatile demand at predetermined fixed prices. Typical ERs meet their obligations through combinations of long-term contracts, wholesale purchases and self-generation. The regulated demand is inelastic, and each ER has the obligation to deliver electricity on demand at the fixed price without failure, independent of costs.
Due to electric power features ERs' profit is exposed to price and volumetric risks. The ER could hedge price risks by using financial instruments based on electricity price which are available in the financial markets. To hedge volumetric risks storage of electric power is currently not an option, and electricity volume-based financial instruments do no exists. As price and quantity in the electricity markets are correlated with weather, financial instruments based on weather could be used to hedge price and volumetric risks.
In this paper optimal hedging strategies to price and weather risks factors are proposed. The strategy consist of mitigating ER risk by constructing a contingency claim based on price and weather derivatives. The use of weather derivatives offers the chance to hedge against weather related risks in electric power markets. Companies hedge their portfolios against unexpected weather variations using contracts that are not correlated with classical financial assets, but are based on weather-linked indexes instead. This contracts allow the agents to transfer their risks exposures to financial markets, using financial instruments to hedge price and quantity fluctuations via climatic fluctuations.
We consider the hedging of price and weather risks in a discrete setting where price, quantity and weather index take values on a discrete set. We construct a contingency claim based on price and weather-linked derivatives, without any assumption on the underlying distributions. We construct such claim, optimizing the Mean-variance utility function for the ER. Mean-variance Markowitz (1952)) is the basis of the modern portfolio allocation strategies, leading the field of Decision Making in Financial Economics. Due to its simplicity mean-variance is widely used as an approximation to more general expected utility functions (see, Morone (2008))). This paper exploits the convexity of the Mean-Variance utility function, which makes possible to find a global optimum to the posed optimization model (Boyd and Vandenberghe (2004))).

Contribution
We construct a closed-form solution in discrete setting for the static hedging strategy for ERs whose net profits are exposed to price and quantity risks associated with weather fluctuations.
In Theorem 1 we provide an analytical closed form solution in terms of the input data, which is the probability of observing a given price-quantity-weather index combination and the ERs risk aversion coefficient. We also analyze this optimal solution. In Corollary 1 we show a 'two fund theorem' result; namely, for any risk averse ER the optimal contingent claims can be written as a combination of two 'basic' contingent claims. In Section 2.2 we show that when the risk free measure and the real world measure coincide, the optimal solution is unique, independent of the ER's level of risk aversion; in this case, there exist contingent claims which maximize the expected profit and minimize the risk at the same time. In Section 2.3 we show that when weather and price are independent the price contingent claim and the weather contingent claim could be constructed by separately finding the optimal price contingent claim and the optimal weather contingent claim. Finally in Section 2.4 we characterize the efficient frontier of the model.
In practical terms, the discrete setting is more appropriate than the continuous one. First, the discrete setting allows a non-parametric approach, where any general discrete distribution could be used, including the case when dependence between price and weather occurs. Notice that this in contrast to the continuous setting, where the existing results depend on the type of distribution underlying the variables of interest (e.g. Id Brik and Roncoroni (2015)), Lee and Oren (2009))) which requires a (semi-) parametric approach.
Second, the set of assets traded in the market is a discrete set, and thus is more natural to assume that the available data is discrete in nature. Third, it is easier to interpret the outputs of the discrete model. In particular, is much simpler to replicate an optimal contingent claim in the discrete setting (see: Su, (2008))).
Our methodology allows the use Quadratic Optimization (QO), which is an optimization model that is efficiently solvable. Notice that even though we obtain a closed form solution, the existing efficient solvers for QO offer the possibility for extensions to our model which could include more constrains.
The rest of the paper is organized as follows. In the rest of this Section the preliminaries are presented. In Section 2 our solution to the hedging portfolio problem is presented. In Section 3 numerical experiments are performed to illustrate our results, and Section 4 concludes.

Weather Risk and Weather Derivatives
Earnings obtained by weather-sensitive industries are affected by weather anomalies which is the case of energy industries (Dutton (2002))). Weather risk in electric power markets is significant; unexpected changes in weather or hydrology could affect quantity and price fluctuations. In countries with seasons, random movements in temperature affect electric power demand. Huisman et al (2007)) shows that the difference between actual and expected temperature significantly influences the probability on a spike in day-ahead prices in power markets. Some tropical countries are also affected by hydrological conditions, demand is correlated with weather fluctuations and the electricity production might be based on hydro-generation.
Evidence from the Colombian and the US markets shows that climate variation affects spot price and quantity behavior. The wholesale spot price in Colombia exhibits volatile behaviour, for instance in November 2010 average daily price per KWh was 14.1% less than in November 2009 due to La Niña phenomenon (138 COPs per KWh in November 2010, and 160.7 COPs per KWh in November 2009). In the generation side, there was 19.8% more capacity in 2010 after the effects of 2009 El Niño had diminished (75.2% in 2010 and 55.4% in 2009). Similarly, in the US, the spot price in PJM Market reached $141 per MWh in the summer of 2010, while the previous summer the price range was $31 -$80. In the summer of 2010 load in the PJM system was 135 GW, while for the previous summer was around 186 GW. For more detail see Pantoja. (2011)).
Weather derivatives could be used to hedge unexpected changes in weather. These kind of derivatives were first launched in 1996 in the Chicago Mercantile Exchange (CME), in the United States, as a mechanism of protection against weather anomalies; since then, they are used by companies to transfer climaterelated risk to capital markets. The underlying of weather derivatives are the weather fluctuations, and thus weather derivatives are use to smooth out weather related revenue fluctuations for companies, transforming non-tradable risk into tradable financial securities, which brings financial and commercial benefits (Jewson (2004))). Weather derivatives are based on indexes of temperature, such as the Cooling-Degree-Days (CDD) and the Heating-degree-Days (HDD) at the CME.
The weather derivatives market does not have yet an effective pricing model. Constructing such model is difficult, due to the incompleteness of the market and the fact that weather derivatives are basically a speculative security as weather indexes are not a tradable commodity or a delivery asset. Richards et al (2004)) presented a pricing model based on a temperature process constructed from a mean-reverting Brownian motion. Chaumont et al (2005)) considered a model where under an equilibrium condition, the market price of risk is uniquely determined by a backward stochastic differential equation; this stochastic equation is translated into a semi-linear partial differential equation which is solved using two simple models for sea surface temperature.

Risk hedging in the Electricity market
The hedging of price, quantity and weather risks in the Electricity market have been considered in recent literature. Several authors follow Markowitz's mean-var methodology Markowitz (1952)) to construct hedging strategies. Woo et al (2004)), studied the interaction between stochastic consumption volumes and electricity prices, and proposed a mean-var model to determine optimal hedging strategies. Näsäkkälä and Keppo (2005)) develop a hedging strategy for risk mitigation using forward contracts based on price, their formulation is an extension of the formulation given on McKinnon (1967)) to obtain the optimal hedge ratio considering price and quantity risks. Oum and Oren (2008)) extend the model of Näsäkkälä and Keppo (2005)) to include price derivatives in the hedging strategy. Lee and Oren (2009)) extend Oum and Oren (2008)) model, via the inclusion of forwards based on weather-linked indexes. Pantoja. (2011)) and Id Brik and Roncoroni (2015)) consider the case of risk hedging assuming independence between price and weather index.
Other Risk measures have also been considered. For instance, Vehvilainen and Keppo (2006)) suggests using value at risk as risk measure, when managing risk in the electricity market. Hedging of ER's risk under value at risk using price derivatives has been considered by Oum and Oren (2008)), Kleindorfer and Li (2005)), Woo et al (2004)), and Wagner et al (2003)).

The Hedging model
We study a one stage model for the hedging problem for one ER. The ER buys electricity at the spot price p and sells it at fixed retail price r at a fixed time T . Therefore the ER's profit, at time T , from serving the customers' demand q is y(p, q) = (r − p)q. The retail price r is fixed and known, while the demand q and the spot price p are random.
To hedge risks due to price and quantity fluctuations, the ER constructs contingent claims x p (p) and x w (w), which represent the payoffs of financial portfolios based on electricity price and weather-index instruments respectively. These contingent claims are functions of the electric spot price and the weather index respectively. Notice that we work directly with contingent claims, and disregard the details on how to construct replicating portfolios composed by vanilla and derivatives. For such details, in discrete setting, see Leung and Loring (2016)).
To find the optimal contingent claims we use the following optimization model proposed by Pantoja. (2011)) (see also, Id Brik and Roncoroni (2015))). (1) In model (1) the probability measure ψ supported on {(p, q) : p ≥ 0, q ≥ 0} represents (the ER beliefs on) the real distribution of the realization of p and q at time T , and φ is a risk neutral probability measure. Notice that we do not assume φ to be unique, since the electric power market is incomplete. The expectations E ψ [.] and E φ [.] denote expectations under the probability measure ψ and φ, respectively. The objective of (1) is to maximize the Mean-Variance utility function ) 2 of the ER's hedged profit at time T . Model (1) seeks to maximize the ER's expected utility, under the constrain that the cost of constructing the financial portfolios with contingent claims x p (p) and x w (w) is zero, that is those portfolios are zero-cost.
Notice that in this context having two separate zero-cost portfolios with contingent claims x p (p) and x w (w) is equivalent to having one zero-cost portfolio with contingent claim x p (p) + x w (w). We prefer to keep them separated in the constrains of model (1), as this simplifies our exposition.
Oum and Oren (2008)), develop a static hedging estrategy based on composition of portfolio price-based financial energy instruments, where only a contingent claim x p (p) is considered. Lee and Oren (2009)) extend Oum and Oren (2008)) model to one that includes forwards on weather index, which is equivalent to model (1) restricting the weather contingent claim to be of the form x w (w) = αw, where α is an optimization variable. Considering a contingent claim x w (w) of general form offers the possibility of a better hedge, as shown in our numerical examples (Section 3). Also the consideration of general contingent claim makes the optimization problem more complex. Pantoja. (2011)) and Id Brik and Roncoroni (2015)) derive first order conditions for model (1) and use them to find a closed form solution in the case when the price is not correlated to the weather index.
All the previous works assume the distributions ψ and φ are continuous and known. In contrast, we work on a discrete setting. That is we assume the distributions ψ and φ to be discrete and known. We present a closed form solution, derived using QO. The existence of efficient solvers for QO opens the possibility to modelling extensions. For instance, transaction costs and/or robustness could be added as linear or second order constraints, which produce models that are still efficiently solvable. Moreover, the combination of the discrete setting and the QO-based methodology, allows to consider any general discrete distribution, including the case when price and weather are not independent. Notice that working with continuous distribution requires working on a semi-parametric setting (see e.g. Id Brik and Roncoroni (2015))) while discrete distributions allow to use a non-parametric data-based setting (see Section 3).

Optimal Hedging via Quadratic Optimization
In this section we present a Quadratic Optimization based approach to solve model (1). We assume a discrete setting with n possible prices, m possible values for the weather index, and possible values for quantity. That is, we are given a set P = {p i : i = 1, . . . , n} a set W = {w j : j = 1, . . . , m} and a set Q = {q 1 , . . . , q } of possible prices, weather index values and quantities respectively. In this setting, the ER-beliefs distribution ψ is a probability measure supported on P × Q × W and the risk-free distribution φ is a probability distribution supported on P × W .
Let µ y = E ψ [y(p, q)] be the expected value of y(p, q) under ψ, and σ 2 y = Var ψ [y(p, q)] be its variance. Let ψ p be the marginal of ψ on P , that is ψ p (p) = q,w ψ(p, q, w). We will abuse the notation and also use ψ p ∈ R n to denote the corresponding vector of marginal probabilities. Similarly define ψ w . Also, let ψ pw (p, w) = q ψ(p, q, w) be the 2-marginal on P × W of ψ. Again, we will abuse the notation and use ψ pw to denote the corresponding matrix of marginal probabilities. Also, for any p, define µ p y (p) = E ψ [y(p, q)|p], and use µ p y to denote the corresponding vector in R n . Similarly define µ w y .
Notice that our decision variables are vectors x P and x W indexed by P and W respectively. This vectors represent the contingent claim function value at each p ∈ P (resp. w ∈ W ). More exactly, the price-contingent claim function is x p = x T P δ P , where δ P is a random vector drawn from {u ∈ {0, 1} P : Σ p u p = 1} according to ψ p . I.e. δ P is the random 0-1 vector with exactly one 1 in the realized p. Analogously δ W is defined to obtain x w = x T W δ W . We obtain then the following straightforward proposition. Proposition 1. Let δ P and δ W be defined as above. We have then, And, letting e P (respectively e W ) denote the all-ones vector indexed by P (resp. W ), We obtain then, Similarly, are the marginals of φ.
Model (1) is then equivalent to µ y − aσ 2 y + max To simplify the notation, define M = The matrix M is positive semidefinite. Thus, for a>0 model (4) is a (convex) QO Problem. For QO the first order conditions (FOCs) imply optimality Keller (1973)). In Section 2.1. next, an optimal solution is obtained from the FOCs.

Closed form solution in the discrete setting
In Theorem 1 we give a closed-form solution to model (4). Obtaining a closed form solution is possible as model (4) only has equality constrains. Adding restrictions on the contingent claims might be desirable in practical situations. For example one might want to constrain the corresponding portfolio to closely follow a given benchmark (see Cornuéjols, Peña and Tütüncü (2018)) and references therein). Many constraints used in practice can be expressed as linear constraints on the contingent claims and thus when added to model (4) the model will be still a QO problem which could be solved efficiently. Commercial packages such as Cplex (CPLEX. (2017))) and Gurobi (Gurobi (2017))) could solve QO Problems very efficiently.
1. The pair (x P , x W ) is an optimal solution to model (4) if and only if there exist λ p , λ w ∈ R such that 2aM x 2. LetM (resp.b,ĉ andd) be the matrix obtained from dropping from M the last of the p-rows (resp. p-entries) and the last of the w-rows (resp. w-entries). The unique solution to model (4) is Proof. To prove the first part, notice that because the feasible set of model (4) is a polyhedron, the first order conditions (5) are necessary conditions for the optimal solutions (see, e.g. Eustaquio et al (2008))). Also, as M is positive semi-definite, model (4) is convex. Also (x p , x w ) = (0, 0) is a Slater point, and thus (5) is sufficient for optimality (see, e.g. Boyd and Vandenberghe (2004))).
To prove the second part, Let e p ∈ R n and e w ∈ R m be the all ones vectors. Multiplying (5) to the left by e T p 0 we obtain 2ae T p M pp x p + λ p e T p φ p = e T p ψ p + 2ae T p c p . But, e T p M pp = 0, e T p φ p = 1, e T p ψ p = 1 and e T p c p = 0. Thus λ p = 1. Similarly λ w = 1. Thus (5) is equivalent to Let u 1 = ep 0 and u 2 = 0 ew . Then M u i = 0, cu i = 0 and (d − b)u i = 0 for i = 1, 2. Thus, dropping the last of the p-rows and the last of the w rows we obtain that (7) is equivalent to from where (6) follows.
Remark 1. Part 2 of Theorem 1 implicitly assumes that M B T is invertible. Generically, this is true, asM is full row rank (see Lemma 1 below), and the rows of B T are generically linearly independent from the rows of M , given the nature of the distributions φ and ψ.

Computing
0 which can be solved using O((n + m) 3 ) operations. In general this systems are solved using Gaussian elimination or QR decomposition. In the case of ill-posed systems robust versions of this methods can be used, which generate good approximate solutions. For more information see, e.g., Meyer (2001)) For any a let x a = x a P x a W where x a P , x a W are the optimal solutions to model (4). Let In Corollary 1 we show that for any a > 0 the optimal contingent claim x a is a linear combination of x o and x ∞ . Corollary 1 is a sort of Two Fund Theorem (see Cornuéjols, Peña and Tütüncü (2018))). In particular this implies that the optimal hedging portfolio is a combination of the hedging portfolios corresponding to x o and x ∞ . Notice that x ∞ is the contingent claim minimizing the total profit risk, while x o is in correspondence to the contingent claim maximizing the expected value of the hedged profit. That is any optimal portfolio can be obtained by combining a risk-efficient portfolio with a profit maximizing portfolio. Theorems of this type are important as they allow to compute optimal portfolios even when the risk aversion parameter a is not exactly known.
Corollary 1. For any a > 0 Proof. Follows from the definition of x o and x ∞ and (6).
To finish we present a technical result (Lemma 1) which guarantees the existence of the closed form solution (see Remark 1, and the subsequent paragraph).
Lemma 1. The matrix M is psd, with row rank n + m − 2. In particular,M the matrix obtained dropping from M the last of the p-rows and the last of the w-rows is full row-rank.
Proof. M is the Variance-Covariance matrix of the vector δ p δ w , thus it is psd. We claim now that all eigenvalues of M are positive except for the smallest two, corresponding to the eigenvectors e p 0 and e w 0 , where e p ∈ R n and e w ∈ R m are the respective all ones vectors. To prove this let u v be an eigenvector with 0 as corresponding eigenvalue. We have then which implies, u = αe p and v = βe w , where α and β are scalars. As M is a psd matrix with exactly two zero eigenvalues, M has row-rank m + n − 2. Also, from symmetry of M , e T p 0 is a left eigenvector of M with eigenvalue 0, that is e T p 0 M = 0. This means that the last of the p-rows of M is a linear combination of the other p-rows. Similarly the last w-row is a linear combination of the other w-rows. Thus dropping this two rows we obtain a matrix of the same row-rank as M , that is n + m − 2 that has exactly n + m − 2 rows. I.e. it is full row rank.

Analyzing the solution when φ = ψ
Next, we analyze the rather unrealistic case when φ = ψ. Special attention has been paid to this case in Oum and Oren (2008)), Pantoja. (2011)) and Id Brik and Roncoroni (2015)). Oum and Oren (2008)) noted that assuming φ = ψ, when constructing the price only hedging in the continuous setting, the optimal contingent claim is x p = µ y − µ p y independent of the value of a. Our next result is that, under the assumption φ = ψ the optimal contingent claims in the general case are also independent of a.
Corollary 2. Assume φ = ψ. For any a > 0 the optimal solution to (4) is independent of a.
Proof. If φ = ψ, we have that b = d and thus x o = 0. Thus, from Corollary 1 we have x a = x ∞ .
As can be seen from the proof of Corollary 2, when φ = ψ the optimal solution to model (4) is the contingent claim that minimizes the total risk, for any a > 0. A limiting argument shows that this solution is optimal also when a = 0, that is, this contingent claim also maximizes the expected total profit.

Solution to the independent case
If the price and the weather index are independent, solution (6) simplifies further as shown in Corollary 3.
Corollary 3. Assume the price and the weather index are independent according to ψ. Then the solution to model (4) is given by Proof. If p and w are ψ-independent we have M pw = 0, and thus using part 2 of Theorem 1 the statement follows.
Remark 2. Notice that in the case of φ-independence between p and w we have µ p . In the case of ψ-independence between p and w, the optimal solution corresponds to solving independently the hedging problem for p and w. One can check that in this case, the optimal contingent claim pair (x p , x w ) given by Corollary 3 solves the problems of constructing the best contingent claim using information on price only, and information on weather only, separately. This can also be shown by analyzing the optimization model (4), if M P W = 0 the model separates, that is model (4) is equivalent to Corollary 4 describes the optimal contingent claims for the independent case when φ = ψ is assumed.
Corollary 4. Assume φ = ψ and w independent of p. Then the optimal contingent claims are x p = µ y − µ p y and x w = µ y − µ w y . Proof. This is easily checked directly by plugin in the given x p , x w and λ p = λ w = 1 in part 1 of Theorem 1.

Efficient Frontier
We apply now Markowitz (1952)) concept of efficient frontier to our model for hedging the electric power market. In Section 3, we use the results of this section to compare different solutions to model (4). There, we compare the efficient frontier of the solution obtained by wrongly assuming independence between price and weather with the solution obtained by assuming the right level of correlation. By comparing the efficient frontier of this two solutions, we observe that the solution to the general case dominates, in the Pareto sense, the independence-based one.
Proposition 2. For any a > 0, let x a p and x a w be the optimal solution for model (1). Then Also, using (7),

Numerical Results
In this section we evaluate our proposed solution. We use data similar to the one used in Lee and Oren (2009)). Namely, we construct hedging strategies for an ER that charges a flat retail rate of $120 per MWh. We assume lognormal distributions of price and quantity. Under ψ the three variables, price, weather index and quantity are distributed according to a multivariate normal distribution in log price, log quantity, and the weather-index. Under φ price and weather index are distributed according to a bivariate normal distribution in log price and weather-index. In all cases, except when looking at the efficient frontier, the risk aversion parameter is fixed to a = 1.0. Our method is set in a discrete frame. So to apply the method, we should have as input discrete distributions. To do this, the given continuous distributions are discretized using a grid with n = 100 points equally spaced from µ − 3σ to µ + 3σ in each of the coordinate axis (log price, log quantity and weather-index), where µ and σ are respectively the mean and the standard deviation of the projection of the corresponding multivariate normal distribution in the given axis. So in total n 3 triples (price, quantity, weather-index), each one with a probability value assigned are obtained as input. We calculate joint distributions of p, q and w according with the marginals Ψ p and Ψ w .
To produce the output in each case, first contingent claims x * p and x * w are obtained by solving the corresponding case (using Theorem 1 or one of its corollaries). The distribution of the hedge profit is then plotted computing the hedged profit for each of the N = n 3 = 1000 data points in the input and using the matlab function ksdensity which allow us to produce profit distributions plots for each strategy.

Independence case
In the independence case, it is possible to use the analytical solution for the continuous case obtained by Pantoja. (2011)) and Id Brik and Roncoroni (2015)). We compute this continuous solution, using as input the distributions' parameters given for the independence case. Then we compare the analytic continuous solution against our discrete independence solution. This solution is obtained using Corollary 3. Following Lee and Oren (2009)) we use the parameters given in Table 1 for the input distributions Under ψ : log p ∼ N (4.15, 0.65 2 ) log q ∼ N (7.99, .20 2 ) w ∼ N (50.5, 43.50 2 ) Cor(log p, log q) = 0.40 Cor(w, log q) = 0.65 Cor(w, log p) = 0.
Notice that the discrete independence solution can be interpreted as an approximation to the continuous solution.
To check the quality of the approximation we vary the number of data points. Besides from N = 1000 we take N = 512, 2016 and 5400. As could be observed in Figure 1 the solutions obtained using both methods do not differ much from each other. Figure 1(a), shows the comparison between continuous and discrete setting using profit distributions with the different number of data-points. Figure 1(b) illustrates that difference. We can see that as the number of data-points increases the results converge to the continuous solution. Also for N = 1000 we already obtain a good approximation, as the discrete and the continuous solutions are very close. Next we compare three different strategies for the independence case solution in discrete setting: "Nohedge", "Price Only" and " Price and Weather", we can see the gain when the weather claim is included into the hedging strategy. Figure 2 shows the profit distributions in the independence case for the three strategies. We can observe that both hedges reduce the variance of profit relative to the No-hedge strategy.   Table 2 shows the numerical value of the Quantiles plotted in figure 2 (b). By looking at the table values as well a the figures it can be seen that price plus weather hedge cuts off the left tail of profit distribution compared to the price only hedging. That is the Discrete independence solution allows the ER to protect itself against rare but detrimental events by hedging weather risk.

General case
In this section we evaluate the proposed methodology in the general case. Without the independence assumption, there is no solution for the continuous case, and thus we only consider the discrete frame. We use the same data parameters as in the previous section (independence case) except for a positive correlation between w and p (See Table 3). Under ψ : log p ∼ N (4.15, 0.65 2 ) log q ∼ N (7.99, .20 2 ) w ∼ N (50.5, 43.50 2 ) Cor(log p, log q) = 0.40 Cor(w, log q) = 0.65 Cor(w, log p) = 0.33.
Under φ : log p ∼ N (4.40, 0.65 2 ) w ∼ N (54.6, 43.50 2 ) Cor(w, log p) = 0.33. Figure 3 illustrates the comparison of four possible strategies "No-hedge", "Price Only", "Weather Only" and " Price and Weather". The weather only strategy seems to dominate in distribution the no-hedge strategy. While the price only has smaller risk, but also has smaller expected profit. As expected, the effect of hedging reduces the variance. When price and weather instruments are use together risks is reduced more than when only price or weather instruments are used. Electricity markets face a higher level of loss risk which conduces to profits that are distributed with heavy tails (see, Andriosopoulos, K. and Nomikos, N. (2015)). The lognormal distributions exhibits fat-tails. In order to analyze how these fat tails affect our models we run a numerical experiment in which we analyze how the tail of both payoffs, price and weather, change due to changes on volatility (sigma = 0.1, 0.25, 0.5 and 0.72) for each price and weather separately, while keeping a fixed correlation value (rho = 0,75). In figure 4 we can observe that the claims (namely the price hedging and weather hedging) show high volatilities levels and if volatility changes that event may produce a heavy tail or extreme value. Still, our model will generate a gain over the other models used as a reference. Figures 4(a) and (b) show the payoff's fat tails when changing the volatility σ, for price and weather payoffs respectively.

Independence case as proxy to general case
Id Brik and Roncoroni (2015)) suggest using the Independence case solution as a proxy to solve the general case. They argue that if the correlation between p and w is small, the solution obtained under the independence assumption is almost optimal for the general case. Next, we analyze the difference between the independence case solution (see Corollary 3) and the general case solution (see Theorem 1) when the correlation ρ between p and log w varies from 0% to 75%.
First, we analyze how the weather and the price claim change as the correlation between price and weather  index vary. As can be seen, while changes in the correlation only produce small changes in the price contingent claim, the weather contingent claim is affected by the level of correlation between p and w. In the weather contingent claim the effect is rather strong with the weather payoff offering a better hedge as correlation increases. Thus when using the independence solution, the price claim will be almost optimal for all values of correlation ρ, while the weather claim will lose quality as ρ increases.
We can see that the general solution completely dominates the one constructed under the independence assumption. This fact is illustrated, in Figure 6, where the efficient frontier for the optimal solution of the general case (see Corollary 2) and for the independence case solution are presented. To see the effects on the hedge, Figure 7 shows the gain of the General case over the Independence one in terms of profit distribution and Quantiles.
In Figure 8 hedge profit distributions under different levels of correlation ρ = 0.13 and ρ = 0.75 are compared. The figure illustrate that similarly to what is observed in the comparison between the general and independence case, the hedge improves as the level of correlation between price and weather increases.

Conclusions
This paper develops numerical methods to determine the optimal derivative contingent claim written on both electricity price and a weather; aiming to improve the performance of the hedging claim due to the link between price, demanded quantity and weather-linked index. We introduce a discrete framework which allows to construct optimal contingent claims as functions of price and weather, without any assumption on the underlying distributions. Our solution method is based on Quadratic Optimization; we give a closed form solution for the basic model consider here, where only zero cost constraints on the contingent claims are considered. But, the Quadratic Optimization model could be applied under more general linear and second order constraints, in which case numerical solutions could be obtained.
Our method improves upon the existing literature, which has only considered the case when weather linked index and price are independent (Id Brik and Roncoroni (2015)) and Pantoja. (2011))). Our numerical  Figure 4: Price X p (p) and X w (w) Tails for different sigma results illustrate the gain due to the inclusion of the weather variable, improving on existing hedging positions. Our results confirm that the weather contingent claim allows adjustment of hedge strategy with the price contingent claim in order to hedge the double exposure of the agents. Our numerical results support the gain of the proposed strategy over the best performing claim derived for strategies using price instruments only and over strategies using price and weather instrument assuming independence of price and weather.
We derive several results characterizing the optimal contingent claims. In particular we show the existing of a 'two fund' theorem in this case. Also, we show that when the market measure and the real world measures coincide the optimal solution to the given model, for any a ≥ 0 is the contingent claim that minimizes the total profit risk and maximizes the expected total profit.