A Regime-Switching Model for Electricity Spot Prices. Gero Schindlmayr EnBW Trading GmbH

Size: px
Start display at page:

Download "A Regime-Switching Model for Electricity Spot Prices. Gero Schindlmayr EnBW Trading GmbH g.schindlmayr@enbw.com"

Transcription

1 A Regime-Switching Model for Electricity Spot Prices Gero Schindlmayr EnBW Trading GmbH May 31, 25

2 A Regime-Switching Model for Electricity Spot Prices Abstract Electricity markets exhibit a number of typical features that are not found in most financial markets, such as price spikes and complex seasonality patterns. This paper proposes a stochastic model for electricity spot prices that is based on a regime-switching approach applied to average daily prices. Two different regimes represent a normal and a spike regime, the latter characterized by high volatility and strong mean-reversion. The model is calibrated via a maximum-likelihood optimization in connection with a Hamilton filter for the unobservable regime-switching process. Given the daily prices, the hourly price profiles are modelled using a principal component analysis for the 24-hour price vectors and afterwards setting up a time-series model for the factor loads. Example results are shown for spot price data from the European Energy Exchange EEX. Keywords: electricity prices, regime-switching, PCA, Hamilton filter, seasonality

3 1 Introduction In the course of the liberalization of energy markets it has become very important for utilities and energy trading companies to develop stochastic price models to be used for option pricing and risk management. A particular challenge is modelling electricity prices, since their stochastic behaviour differs substantially from other commodities or financial products. This section lists the most important properties of electricity spot prices and gives an overview of the model proposed. 1.1 Behavior of electricity spot prices Electricity spot markets exhibit a number of typical features that are not found in most financial markets. The most important of those features are Seasonality: Electricity spot prices show a seasonal pattern on different time scales (yearly, weekly, daily) that reflect the typical electricity demand patterns. Spikes: Spot prices may exhibit extreme price spikes at times of high electricity demand (e. g. cold weather) and limited production capacity (e. g. plant outages). No cash-and-carry arbitrage: There is no cash-and-carry arbitrage relation between spot and futures prices, since electricity is not efficiently storable. Thus, the forward curve may have a very complicated seasonal pattern. Figure 1 shows the hourly spot prices of the European Energy Exchange (EEX) from year 21 to May Model overview Most published work on electricity prices avoid the additional complexity of hourly spot prices by dealing with a daily average price process. Regime-switching models for daily electricity prices were studied in [4] for a continuous-time setup and in [3] and [1] for a discrete time setup. In [3] and [1] the processes for the stable regime and the spike regime were considered to be independent, which simplifies the analytical treatment of the model. in [6] a regime switch is triggered by crossing a certain price threshold. Modelling spot prices on an hourly basis, two approaches could be taken 1. Specify a scalar price process on an hourly granularity 2. Specify a 24-dimensional vector process on a daily granularity The first approach is taken in e. g. [2]. To account for the 24h-seasonality, seasonal ARMAprocesses with a 24h time lag were used. If instead of ARMA processes more complicated models such as regime-switching models are to be used, the 24h seasonality can be difficult to take into account. The second approach uses a vector process instead of the 24h seasonality. Following this approach, [7] apply a principal component analysis (PCA) to a load process, that is considered as a fundamental driver for the spot price. Here, the PCA is applied directly to the hourly spot price profiles. This PCA approach serves two purposes: First, we can choose 1

4 1 EEX spot hourly 8 EUR/MWh Date Figure 1: EEX hourly spot price independent stochastic processes on a daily basis for the factor loads without the hourly granularity. Second, taking only the most significant principal components into account, the model can be reduced to less dimensions which speeds up computations and reduces memory usage. Regarding the spot process on a daily basis may also seem more natural with respect to actual trading, where spot prices are usually the result of an auction for the day (or weekend) ahead. The following notation is used throughout the paper: S t : Daily spot price on day t S t = (St 1,...,St 24 ): Vector of hourly spot prices on day t s t = logs t : vector of logarithmic hourly spot prices s t = i=1 s t: mean logarithmic price We model the hourly spot prices on a logarithmic scale and separate the mean level and the hourly profile: s t = s t + h t, 24 i=1 h t = (1) For the scalar process s t and the vector process h t we use the following time series models: 1. The non-seasonal component of s t is a AR(1) model with regime-switching 2

5 2. The stochastic component of h t is decomposed via a principal component analysis (PCA) into factor loads u i t (i = 1,...,24) which are then modelled as independent ARMA processes. Business days and non-business days are modelled as independent processes. This is an approximation done mainly for practical purposes. Non-business days have a completely different behavior regarding volatility and spikes. Thus, fitting a single process to both business and non-business days generally will give not very good results. Obviously, in reality prices on business days and non-business days are not independent but correlated. However, this effect is neglected here and could be incorporated in future. 2 The Daily Price Process This section is devoted to the (logarithmic) daily price process s t. This process has a yearly seasonality and is sensitive to weekday and holiday. To account for price spikes in the daily prices, a regime-switching approach is followed. 2.1 Seasonality As a first step we take out the seasonal component of s t. For this purpose we set up a regression model: s t = N d d=1 1 Jd (t)β A d + 1 J DT d (t)cos(2πt/365)β B d + 1 J DT d (t)sin(2πt/365)βd C + 1 Jd DT (t)tβd D + 1 J DT (t)1 d J V P(t)βd E + y t, (2) where y t is the residual and 1 J (t) the indicator function { 1 t J 1 J (t) = otherwise. The sets Jd DT, d = 1,...,N d define a partition into day types (e. g. Mo, Tu-Th, Fr, Sa, So, Holidays) and J V P defines vacation periods. The regression coefficients βd A,...,β d E have the following meaning coefficient β A d β B d,βc d βd D βd E description mean level Amplitudes for yearly seasonality deterministic drift price effect of vacation period The regression model is solved using a least squares algorithm. An example of the seasonal component is given in figure 2. 3

6 5 log price daily seasonal component 4 3 log price Date Stochastic model Figure 2: Seasonality of the daily logarithmic price from EEX As a next step, a regime-switching ARMA process is calibrated to the y t data. At this stage, the process y t is divided into business days and non-business days: y t = 1 J B(t)y B t + 1 J H(t)y H t, where J B denote the business and J H the non-business days. In the following we describe the time series model and calibration for either of the processes y B t or y H t. To simplify the notation we leave out the superscript and work with a time series y k, k = 1,...,N observed at times t k. To account for price spikes, we choose an AR(1) model with regime switching, where the regime change is modelled via a discrete Markov chain. Thus, the model equation is given by y k µ rk = φ rk ( yk 1 µ rk 1 ) + σrk ε k, (3) where r k {1,2} denotes the current regime at time t k and ε k N(,1). The Markov chain is characterized by the transition probability matrix ( ) p11 p P = 21 p 12 p 22 4

7 with p i j = P(r i = j r k 1 = i). Since the regime state is not observable we use the Hamilton filter described in [5]. Since the Hamilton filter requires the transition probabilities to depend only on the current state, we have to transform the two-state model above into a four-state model (see [5], p. 691) with states r k {1,2,3,4}, such that The transition probability matrix becomes r k = 1 if r k = 1 and r k 1 = 1 r k = 2 if r k = 2 and r k 1 = 1 r k = 3 if r k = 1 and r k 1 = 2 r k = 4 if r k = 2 and r k 1 = 2. P = In this way, the model is of the general form p 11 p 11 p 12 p 12 p 21 p 21 p 22 p 22 y k = µ rk + φ rk y k 1 + σ rk ε k. (4) The Hamilton filter produces estimates ˆξ k k i for the probability P(r k = i y k,y k 1,...) that the observation was generated by regime i based on observations up to time k. As a byproduct of the Hamilton filter, the log maximum likelihood function is calculated as L = N k log k=1 ( 4 i=1 ˆξ i k k ηi k Example calibration results for EEX spot price data from Jan 1 to May 5 are the following: ) (5) µ φ σ regime regime P = ( ) Since we have only estimated probabilities about the regime during the calibration period, we can only calculate estimates about the residuals: ˆε k = E[ε k ] = 4 i=1 ( ) yk µ i φ i y k 1 P( r k = i y k,y k 1,...) σ i A sample autocorrelation function of ˆν k is shown in figure 3. Figure 4 shows a QQ plot for the innovations both for the regime-switching process with two regimes and a non regimeswitching AR(1) process. Using a simple AR(1) process instead of the regime-switching process, the innovations are clearly non-gaussian. The innovations ˆε k of the regime-switching process provide a much better fit to a Gaussian distribution. 5

8 Sample Autocorrelation Function (ACF).8 Sample Autocorrelation Lag Figure 3: Autocorrelation of EEX daily price residuals (Jan 1 Apr 5) 8 6 no regime switching regime switching QQ Plot of Sample Data versus Standard Normal 4 Quantiles of Input Sample Standard Normal Quantiles Figure 4: QQ Plot of innovations for daily price process (EEX Data Jan 1 Apr 5) 3 The Hourly Profile Process From equation 1 the profile process is defined as the logarithmic spot process normalized to mean zero: h t = s t s t The steps for modelling the profile dynamics are the following: 1. de-seasonalize the profile for each hour 2. use PCA to decompose the vector process into factor loads 3. model each factor load as an ARMA process 6

9 3.1 Seasonality and PCA decomposition Daily spot price profiles have a pronounced yearly and weekly seasonality (see figure 5) due to different temperature and light conditions. To de-seasonalize the profiles a similar technique as described in section 2.1 is used for each single hour. In this way the profiles can be written as h t = ĥ t + h t, where ĥ t is the deterministic seasonal component and h t is the stochastic residual from the regression. 2 summer winter 1.5 Value Hour Figure 5: Mean summer and winter hourly profiles The residuals h t form a vector process with a covariance structure reflecting the different volatilities of each single hour and the correlations between the hourly profile values. As before, the process h t is divided into business days and non-business days: h t = 1 J B(t) h B t + 1 J H(t) h H t. The two processes h B t and h H t are treated separately. For notational convenience we regard only one of these processes and denote it by h k, k = 1,...,N. By means of a PCA the vector process h k is now decomposed into independent factor loads. Let p 1,...,p 24 be the principal components of h k (after column-wise normalization to standard deviation 1), i. e. the eigenvectors of the matrix ( h) T h/n, where h is a N 24-matrix. It is assumed that the corresponding eigenvalues are in descending order λ 1 >... > λ 2 4. The matrix (p 1,...,p 24 ) containing the principal components as columns is denoted by P. The N 24- matrix of factor loads is then given by Z = ( h)p. An example of the principal components is shown in figure 6. 7

10 The i-th eigenvalue λ i represent the variance contributed by the i-th principal component. Figure 7 shows the percentage of the total variance that is explained by a given number of principal components. In the case shown there, a large number of principal components is needed explain the variance Value Hour pc 1 pc 2 pc 3 Figure 6: First three principal components (EEX spot data, business days) 1 9 explained variance in % business days non business days number of pc Figure 7: Explained variance with respect to the number of principal components (EEX data) 8

11 3.2 Stochastic model Let z i k = Z k,i, i = i,...,24, k = 1,...,N be the time series of the i-th factor load, which is the i-th column of the matrix Z. The series z i k are modelled as independent ARMA process. From the simulated factorloads Z the process h t can be calculated as h t = ZP T. Figure 8 shows the autocorrelation function of the innovations calculated for the first factor load with a AR(1)-model and an ARMA(1,1)-model respectively. The results are qualitatively similar for the factor loads of the next higher principal components. AR(1): Sample Autocorrelation Function (ACF) ARMA(1,1): Sample Autocorrelation Function (ACF).8.8 Sample Autocorrelation Sample Autocorrelation Lag Lag Figure 8: Autocorrelation plot for ARMA-innovations of first factor load A more careful study of the profile dynamics reveals that on days with an extremely high daily price the profiles behave differently, since those high daily prices often are the cause of spikes at single hours. Thus, to get a more realistic price behavior, on days where the regime is in state 2 (volatile regime) the model randomly draws a historical profile according to the given day type, yearly season and regime state. 4 Simulation Results While each of the previous sections focused on a separate part of the model, this section shows simulation results of the complete model. In figure 9 ten sample simulation paths for one year are shown. This demonstrates that the model indeed produces a spike behavior very similar to the behavior observed in historical EEX spot price data. A more explicit analysis is given in figure 1 where the histograms of the historical and simulated spot prices over the time period Jan. 21 to May 25 are compared for the price range 1 to 25 EUR/MWh. Again, the qualitative behavior is very similar in this range of high spot prices. 9

12 Hourly Price EUR/MWh path 1 path 2 path 3 path 4 path 5 path 6 path 7 path 8 path 9 path Jan 6 Feb 6 Mar 6 Apr 6 May 6 Jun 6 Jul 6 Date Aug 6 Sep 6 Oct 6 Nov 6 Dec 6 Jan 7 Figure 9: Ten sample hourly EEX spot simulation paths for year 26 x historical data simulated data frequency spot price in EUR/MWh Figure 1: Histogram of historical and simulated spot prices in the range 1 25 EUR/MWh 1

13 References [1] M. Bierbrauer, S. Trück, and R. Weron Modelling electricity prices with regime switching models Lecture Notes in Computer Sciences, 7/24 [2] M. Burger, B. Klar, A. Müller, G. Schindlmayr A spot market model for pricing derivatives in electricity markets. Quantitative Finance, Vol. 4, pp , 24 [3] C. De Jong, R. Huisman, Option formulas for mean-reverting power prices with spikes, Working Paper, Erasmus University Rotterdam, 22. [4] S. Deng, Stochastic Models of Energy Commodity Prices and Their Applications: Meanreversion with Jumps and Spikes, Working paper, Georgia Institute of Technology, 2. [5] J. D. Hamilton. Time Series Analysis. Princeton University Press, 1994 [6] A. Roncoroni, H. Geman, A class of marked point processes for modelling electricity prices, Working Paper, ESSEC, 23. [7] P. Skantze, A. Gubina, M. Ilic, Bid-based stochastic model for electricity prices: The impact of fundamental drivers on market dynamics Report, MIT Energy Laboratory (2). 11