**3.4. Delivery risk in forward contracting**

=+= + - = - + ( )( ) *R R R pP p P P P p p pP T F S FF S S F F F S SS* (48)

= -+ - ( ( ) max ( ) ,0 ) é ù ( ) *B P p p t P p t MC F FF S* ë û *S S* (49)

We can observe the utility of forward contracts by inspecting this equation. If generator delivers in the spot market an amount equal to its contractual obligation, i.e. *PS* =*PF* , the total

At the time of delivery, and assuming the generator is price-taker, the term *PF* (*pF* − *pS* ) is fixed and represents the profit of the forward contract against the spot market. Therefore, the profitmaximizing production policy is the same and given by the spot price, irrespective of the contractual obligations. The profit the generator can make by selling electricity in forward

In Figure 5A, a probability density function of the spot price is depicted. In the following, it is assumed that the forward market price is an unbiased estimator of the spot price at the time of delivery. Therefore, the condition *pF* =E(*pS* ) holds. In the forward contract, the generator makes a profit for unit of capacity *bF* = *pF* −*MC*, assuming *pF* >*MC*. Otherwise, the generator is better by avoiding entering into a forward obligation with negative profit. For realizing this profit, the generator must be able to deliver in the spot market the contracted volume in the exact amount. This profit level is achieved as long as the spot price exceeds the marginal cost,

Graphically, this probability is represented by the dark grey area under the pdf of the spot price (cf. Figure 5A). The generator can make additional profits in the forward contract, *bF* = *pF* − *pS* > *pF* −*MC*, each time the spot price drops below the marginal cost, i.e. *pS* <*MC*. In fact, the generator is better buying replacement power in the spot market than incurring in fuel costs generating with its own facilities. Figure 5B illustrates the pdf of the profit of a forward contract. When compared with the profit distribution in the spot market (cf. Figure 5), it is easily noticeable the drastic reduction of the profit variance under forward contracting. The forward obligation sets a floor for profits, reducing dramatically dispersion of results and thereby the price risk. In exchange, the generator also foregoes the chance of profiting at times of high power prices in the spot market. The expected profit of a forward contract in terms of

( ) ( )

ò ò

*F F SS FS S S*

é ù =- + - = é ù ë û ë û

*b p MC f p dp p p f p dp*

E ( ) ( )

*MC*

= - - é ù

ò ò

¥

*F S S SS S*

*p MC f p dp p f p dp*

0

*MC*

() ()

0

(50)

ë û

It can be mathematically demonstrated that under rational expectations and efficiency of forward markets, i.e. the forward price is an unbiased estimator of the spot price *pF* =E(*pS* ),

*MC*

revenue is set equal to *pF PF* irrespective of the fluctuations of the spot price *pS* .

i.e. the probability of making this profit is Pr(*bF* = *pF* −*MC*) =Pr(*pS* >*MC*).

the pdf of the spot price *f* (*pS* ) can be expressed as:

*MC*

¥

markets is given by the expression:

106 Dynamic Programming and Bayesian Inference, Concepts and Applications

If we consider again unplanned outages of generating units, hedging price risk in the forward markets exposes generating companies to other class of risk, i.e. delivery risk, which also referred as quantity or volume risk. We further examine this important issue. When a generator under a contractual obligation is unable to deliver in the spot market the contracted amount, i.e. *PS* ≠*PF* , the generator is forced to buy replacement power in the spot market at the prevailing price at that time. This may configure a very significant loss if while the generator is down the spot price is considerable higher than its own marginal costs, i.e. *pS* ≫*MC*. Under this situation, the generator may be compelled to buy very expensive replacement power to honor the obligation, incurring in a potentially high financial loss. It is interesting to note that if when the unit is unavailable spot prices are lower or equal than the marginal cost, the generator can even make an extra profit *bF* = *pF* − *pS* > *pF* −*MC*. The probability density function of the forward position under consideration of positive failure probability and the associated delivery risk is illustrated in Figure 5C.

The expected profit can be computed as the expected value of the contract under the hypothesis of fully reliable unit times the probability of being available:

$$\mathbb{E}[b\_F] = q \left[ \left( p\_F - MC \right) \int\_{\mathcal{M}}^{\otimes} f(p\_S) dp\_S + \int\_0^{\mathcal{M}} \left( p\_F - p\_S \right) f(p\_S) dp\_S \right] \tag{51}$$

As for modern units *q* ≅1, the change in the expected profit due to unit unavailability is typically negligible. However, downside risk increases substantially.

Assuming statistical independence between the unit´s failure and the level of spot prices, the probability of incurring in losses is given by:

$$\Pr(b\_F < 0) = p\Pr(p\_S > p\_F) \tag{52}$$

and the conditional expectation on the value of losses can be written as:

$$L = \int\_{p\_\times}^{\infty} (p\_F - p\_S) f\left(p\_S\right) dp\_S \quad | \; b\_F < 0 \tag{53}$$

fully reliable unit times the probability of being available: **Figure 5.** Probability density function of operating profits for a forward contract

negligible. However, downside risk increases substantially.

*F*

*p*

 0 [ ] ( ) ( ) *MC F F SS F S SS b q p MC f p dp p p f p dp* (51) As for modern units *q* 1 , the change in the expected profit due to unit unavailability is typically From the profit pdf of the forward contract *f* (*bF* ), the downside risk metrics, namely the value at risk (VaR) and the conditional value at risk (CVaR) for a *δ* confidence level can respectively be computed as:

0

*F S SS F*

*L p p f p dp b*

The expected profit can be computed as the expected value of the contract under the hypothesis of

*MC*

$$\Pr(b\_F < -\text{VaR}\_{\delta}) = \int\_{-\pi}^{-\text{VaR}} f(b\_F) db\_F = \delta \tag{54}$$

$$\text{CVaR}\_{\delta} = \int\_{-n}^{-\text{VaR}} b\_F f(b\_F) db\_F \tag{55}$$

(53)

Pr( 0) Pr( ) *F SF b pp p* (52)

15

**4. Problem modeling**

**4.1. Problem formulation**

tions, annual forward contracts, etc.

subject to the following constraints:

market. The process is over after a number of periods *n*.

portfolio across all instruments *i* and time intervals *t*:

¹

*i i*

*i spot*

¹

*i spot*

é ù

ë û å å *<sup>w</sup> W it i t i t t max t*

Let consider a small generation portfolio running in an electricity market. The power company owning the generation portfolio wants to determine the best-selling strategy of the energy production, which would maximize the expected profit while financial risk is constrained. Any trading strategy *x* is defined by the amount of energy to be sold in each different available selling instrument *i* in the electricity market, for example, the spot market, day-ahead obliga‐

Risk-Constrained Forward Trading Optimization by Stochastic Approximate Dynamic Programming

http://dx.doi.org/10.5772/57466

109

It is important to notice that the trading strategy sets the amounts of energy committed in every forward instrument, but only estimates the amount of energy to be actually sold in the spot market. Indeed, actual energy production is stochastic and depends on technical availability of generating units and the spread between spot and fuel prices. Suppose that whatever trading strategy is decided now, it could be changed in future decision stages in order to rebalance the portfolio. Composition of the portfolio can be rebalanced only at a cost however, i.e. the transaction costs. The process is then a sequence of balancing decisions determined by the trading strategy, each followed by a stochastic reward according to the position taken in the

The optimization of the trading strategy can mathematically be formulated as a stochastic nonlinear problem involving the maximization of the expected profit accrued by the generation

> () ( ) , , ,1 , é ù é ù é ù ê ú ê ú ê ú - ë û ë û ë û åå å *ww w i t it it t <sup>x</sup> ti i*

> > , , ,

, , ,

() ( ) , , ,1 , , , -

*Risk I x T x x C Risk t* (60)

ê ú - -£ "

å *i t max t* £ "

å + =" *w w i h spot h h*

*max* E *I x T xx C* (56)

*xx E h* (57)

*xE t* (58)

, ³"¹ 0, , *i t x t i spot* (59)
