*5.3.1. Sensitivity to unit availability*

**Figure 8.** Optimal percentage of energy sold in the future market for the first time period – Validation case

**Figure 7.** Expected benefit and downside risk of the optimal strategy – Validation case.

118 Dynamic Programming and Bayesian Inference, Concepts and Applications

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 operation and 1.5% in standby.

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

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

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.

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

*5.3.2. Sensitivity to transaction costs*

0%

25%

50%

% of maximal energy

75%

100%

**5.3.2. Sensitivity to transaction costs** 

52.57 \$/MWh

48.68 \$/MWh

buying replacement power in the spot market.

52.57 \$/MWh

48.68 \$/MWh

ment power in the spot market.

0%

25%

50%

% of maximal energy

**6. Conclusions**

problem.

75%

100%

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 longlasting 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 buying replace‐

52.00 \$/MWh

48.15 \$/MWh

56.64

51.72 \$/MWh

\$ -133 247 45.63

Risk-Constrained Forward Trading Optimization by Stochastic Approximate Dynamic Programming

Spot

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

Spot

3-months Future Annual Future

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

3-months Future Annual Future

CVaR 1st month:

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

121

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

\$/MWh

42.25 \$/MWh

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

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

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

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

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

\$/MWh

42.25 \$/MWh

26

**5.3.1. Sensitivity to unit availability Figure 9.** Optimal trading strategy for a 5x2MW generation portfolio

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 operation and 1.5% in standby. 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. 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 failures can be covered by the remaining available units.

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

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

26

Spot

3-months Future Annual Future

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

**5.3.2. Sensitivity to transaction costs Figure 10.** Optimal trading strategy for a 5x2MW generation portfolio with reduced availability

buying replacement power in the spot market.

52.57 \$/MWh

48.68 \$/MWh

0%

25%

50%

% of maximal energy

75%

100%

\$ -133 247 45.63

56.64

51.72 \$/MWh Spot

\$/MWh Expected annual profit

3-months Future Annual Future
