**6. Conclusions**

25

26

market is expressed in terms of a fraction of the maximal energy output the generation portfolio would generate without failures in the period, i.e. 10MWh per hour of operation. The prices for the traded futures are also presented in Figure 9 except for the 2nd quarter future which is 45.63\$/MWh and it is not shown as the optimal trade does not include this contract, presumably because the price is too low and it is better to wait for a better price in the spot market and sell in subsequent decisions. Likewise, the expected spot prices for each quarter are displayed, except for the last quarter which is 52.45\$/MWh. Finally, the expected annual profits without considering fixed costs and the risk estimated by the RLS for the first rebalancing period are shown. Note that the expected profit is calculated considering that the following trading decisions are made taking into account the particular sample price realization, capturing the adaptation to the market developments. Thus, the rebalancing

Spot

\$ 20000

Spot

\$/MWh Expected annual profit (without fix costs): 2.80 M\$ CVaR 1st

Spot

\$ -8 366

3-months Future Annual Future

Expected annual profit (without fix costs): \$ 2.67 M\$ CVaR 1st

month:

3-months Future Annual Future

month:

3-months Future Annual Future Expected annual profit (without fix costs): 2.92 M\$ CVaR 1st

month:

Figure 9. Optimal trading strategy for a 5x2MW generation portfolio

52.00 \$/MWh

48.15 \$/MWh

> 56.64 \$/MWh

1st Quarter 2nd Quarter 3rd Quarter 4th Quarter

**51.72 \$/MWh**

In order to investigate the sensitivity of the optimal trading strategy to the unit availability, a second case was considered. Under these conditions, all the parameters are identical to the described base case, except for the failure and repair rates. Operation failure rate was set to 1/850h-1, a reserve failure rate to 1/9850 h-1 and repair rate of 1/150h-1. With these rates, the failure probability is 15% in

In Figure 10, the optimal trading strategy delivered by the ADP algorithm for the case of decreased unit availability is depicted. The differences on the sell strategy are evident for the annual future and the total amount of energy left to be sold in the spot market. Because of units have more frequent and longer random failures, a long-term commitment is avoided. How‐ ever, the high prices for the fourth quarter push the sell in future markets up to 100%. In comparison to the base case results, the expected annual profit is slightly lower. The risk for the first month is irrelevant, because the forward commitment is around 50% and the proba‐ bility of having more than two units (> 40%) unavailable is very low, leading to almost all unit

In Figure 10, the optimal trading strategy delivered by the ADP algorithm for the case of decreased unit availability is depicted. The differences on the sell strategy are evident for the annual future and the total amount of energy left to be sold in the spot market. Because of units have more frequent and longer random failures, a long-term commitment is avoided. However, the high prices for the fourth quarter push the sell in future markets up to 100%. In comparison to the base case results, the expected annual profit is slightly lower. The risk for the first month is irrelevant, because the forward commitment is around 50% and the probability of having more than two units (> 40%) unavailable is very low, leading to almost all unit failures can be covered by the remaining available units.

Figure 10. Optimal trading strategy for a 5x2MW generation portfolio with reduced availability

52.00 \$/MWh

48.15 \$/MWh

56.64

51.72 \$/MWh

\$ -133 247 45.63

1st Quarter 2nd Quarter 3rd Quarter 4th Quarter

**Figure 10.** Optimal trading strategy for a 5x2MW generation portfolio with reduced availability

\$/MWh

42.25 \$/MWh

The third case of study is identical to the base case but considering a transaction cost of 7% of the sold amount instead of 3%. The optimal trading policy for the case of increased transaction costs are shown in Figure 11. In this case, the generator sells only 1.32% of its capacity in an annual future contract due to the irreversibility introduced by the higher transactions costs and the larger contracting volume. Under these circumstances, the risk premium offered in the annual future price render insufficient for attracting the generator to enter in such a long-lasting commitment. On the other hand, the sell volume in quarterly futures is higher than in the base case, staying between 62% and 76% in a rather static trading policy. Under higher transaction fees, it is desirable to be able to rebalance the portfolio in future stages with smaller changes and hence smaller transaction costs. Expectedly, the expected profit is lower due to higher costs. The delivery risk for the first month is negligible, due to the fact that the most likely failures can still be covered by the remaining operative units without

Figure 11. Optimal trading strategy for a 5x2MW generation portfolio with higher transaction costs

52.00

48.15

\$/MWh 45.63

\$/MWh 56.64

\$/MWh 52.45

51.72 \$/MWh

\$/MWh

1st Quarter 2nd Quarter 3rd Quarter 4th Quarter

\$/MWh

42.25 \$/MWh

decisions for the second up to the last period are not unique.

120 Dynamic Programming and Bayesian Inference, Concepts and Applications

42.25 \$/MWh

**5.3.1. Sensitivity to unit availability** 

**Figure 9.** Optimal trading strategy for a 5x2MW generation portfolio

failures can be covered by the remaining available units.

**5.3.2. Sensitivity to transaction costs** 

52.57 \$/MWh

48.68 \$/MWh

0%

0%

25%

50%

% of maximal energy

75%

100%

25%

50%

% of maximal energy

75%

100%

buying replacement power in the spot market.

52.57 \$/MWh

48.68 \$/MWh

52.57 \$/MWh

48.68 \$/MWh

operation and 1.5% in standby.

0%

25%

50%

% of maximal energy

75%

100%

Optimal decision-making under uncertainty is a field of active research and uppermost relevance in science, engineering and computational finance. Conventional optimization approaches have difficulties and serious limitations for tackling high-dimensional problems often encountered in real world settings. Recent advances in operation research and compu‐ tation technology opened new possibilities for approaching optimization problems that were considered intractable until recent times. This chapter presents an efficient Approximate Dynamic Programming algorithm for solving complex stochastic optimization problems and amenable for running in a distributed computing environment. The implemented ADP algorithm has been validated against conventional Dynamic Programming for a simple problem.

26

The proposed algorithm uses Monte Carlo simulation techniques combined with linear regression for successively approximating and refining the continuation and risk functions. A novel and efficient procedure for updating these functions, combining calculations of inde‐ pendent computing threads and without storing the entire datasets, is proposed. This feature enables exploiting the currently widespread multicore processor architectures and deploying the algorithm in large computation clusters.

**Author details**

**References**

per C5.02.

ity. Wiley-Blackwell; 2007.

IEEE Press/Wiley; 2002.

LBNL-41098, 1998.

nance 1999; 9(3) 203-228.

Miguel Gil-Pugliese1\* and Fernando Olsina2

\*Address all correspondence to: miguel.gil.pugliese@gmail.com

Computation Series, 3). Athena Scientific; 1996.

spot prices in the US. The Energy Journal 2004; 25(4) 23-40.

market. IEEE Transactions on Power Systems 1999; 14(4) 1285-1291.

tion. IEEE Transactions on Power Systems 2009; 24(4) 1710-1719.

1 Institute of Power Systems and Power Economics (IAEW), RWTH Aachen, Germany

Risk-Constrained Forward Trading Optimization by Stochastic Approximate Dynamic Programming

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

123

[1] Olsina F, Larisson C, Garcés F. Hedging and volumen risk in forward contracting [*in Spanish*]. Proceedings of XII ERIAC de CIGRE, Foz do Iguazu, Brazil, May 2007. pa‐

[2] Powell WB. Approximate Dynamic Programming: Solving the curses of dimensional‐

[3] Bertsekas DP,Tsitsiklis JN. Neuro-Dynamic Programming (Optimization and Neural

[4] Bellman RE. Dynamic Programming. Princeton University Press, Princeton, NJ; 1957

[5] Stoft S. Power System Economics: Designing Markets for Electricity, New York, USA;

[6] Hadsell L, Maralhe A, Shawky, HA. Estimating the volatility of wholesale electricity

[7] Bjorgan R, Liu C, Lawarrée J. Financial risk management in a competitive electricity

[8] Stoft S, Belden T, Goldman C, Pickle S. Primer on Electricity Futures and Other De‐ rivatives. Lawrence Berkeley National Laboratory, University of California,

[9] Artzner P, Delbaen F, Eber JM, Heath D. Coherent measures of risk. Mathematical Fi‐

[10] Olsina F, Weber C. Stochastic simulation of spot power prices by spectral representa‐

[11] Billinton R, Ge J. A comparison of four-state generating unit reliability models for

peaking units. IEEE Transactions on Power Systems 2004; 19(2) 763–768.

2 Institute of Electrical Energy (IEE), National University of San Juan, Argentina

In order to demonstrate the practicability of the envisioned approach, the proposed algorithm has been applied to find the optimal trading strategy of a power generation portfolio in forward and spot electricity markets. Power trading and risk management is currently a central activity of power companies running in liberalized electricity markets. The probability density functions of the profits a generator would make by participating in either the spot or the forward markets are extremely different. The forms and boundaries of these probability functions have drastic implications for risk when generators get involved in the spot or the forward markets. Generators can hedge price risk of spot markets by contracting forward, but by exposing themselves to delivery risk. Hence, the optimization problem is formulated as the maximization of the expected profit of the trading policy while the downside risk is constrain‐ ed. For doing so, the generator selects and combines a portfolio of annual and quarterly forward contracts as well as involvement in the spot market. A frictional market with nonnegligible transaction costs is considered.

A detailed chronological 4-state reliability model of generating units has been adopted for replicating stochastic behavior of random outages. Large stochastic ensembles of spot prices and forward prices time series have been synthetized for this application. In order to retain subadditivity, downside risk is measured by CVaR. The approximation of CVaR by a momentbased risk metric drastically improves computational efficiency while providing accurate and consistent risk estimations.

Applying ADP-based optimization techniques to electricity markets is a novel undertaking and opens a prospectively fertile avenue for research. In future works, further algorithmic enhancement are foreseen. Application of these methods for designing trading strategies that considers a larger set of available financial contracts as well as generation portfolios comprising renewable resources would provide results and findings of high practical significance.
