• No results found

Estimation of cross-border flow in electricity markets using a Markovian-Tobit approach

N/A
N/A
Protected

Academic year: 2021

Share "Estimation of cross-border flow in electricity markets using a Markovian-Tobit approach"

Copied!
103
0
0

Loading.... (view fulltext now)

Full text

(1)

,

STOCKHOLM SWEDEN 2016

Estimation of cross-border flow in

electricity markets using a

Markovian-Tobit approach

PONTUS WALLIN

(2)

Master Thesis

Estimation of cross-border flow in

electricity markets using a

Markovian-Tobit approach

Author: Pontus Wallin Supervisor: Dr. Carl Johnz´en Examiner:

Dr. Mohammad Reza Hesamzadeh

A thesis submitted in fulfilment of the requirements for the degree of Master of Science

in the

Electricity Market Research Group Department of Electrical Power Systems

(3)

I, Pontus Wallin , declare that this thesis titled, ’Estimation of cross-border flow in electricity markets using a Markovian-Tobit approach’ and the work presented in it are my own. I confirm that:

 This work was done wholly or mainly while in candidature for a research degree at this University.

 Where any part of this thesis has previously been submitted for a degree or any other qualification at this University or any other institution, this has been clearly stated.

 Where I have consulted the published work of others, this is always clearly at-tributed.

 Where I have quoted from the work of others, the source is always given. With the exception of such quotations, this thesis is entirely my own work.

 I have acknowledged all main sources of help.

 Where the thesis is based on work done by myself jointly with others, I have made clear exactly what was done by others and what I have contributed myself.

Signed:

Date:

(4)

Abstract

Faculty Name

Department of Electrical Power Systems

Master of Science

Estimation of cross-border flow in electricity markets using a Markovian-Tobit approach

by Pontus Wallin

(5)

Abstract in Swedish

(6)

First I would like to express my greatest gratitude to my supervisor Carl Johnz´en for beeing a great inspiration and always having time for me. Besides offering challanging tasks and suggesting creative solutions he has become a dear friend.

Second my deepest apprieciations goes to Mohammad Reza Hesamzadeh for being a fantastic supervisor from the academic side in every aspect. His ideas and suggestions have helped me to develop so many new skills and i am so thankfull for his engagement in his students.

A big thanks to J¨org Seidel who had the idea and incentive to the topic of this thesis. I had the luck of having Lukas Poul, Marcel van der Pol, Dave de Bruin and Pawel Misiek around. Their ideas, patience and support contributed enormously to this thesis. I would like to thank Hang Qian at Iowa State University for helping out with the Tobit models. Also i would like to thank Miriam Srokov´a for being around and helping me with so many things and for all good discussions. Finally I am very greatful for the suggestions and knowledge coming from Hans L¨o¨of at KTH, a truely excellent teacher.

(7)

Declaration of Authorship i

Abstract ii

Acknowledgements iv

Contents v

List of Figures viii

List of Tables x

1 Introduction 1

1.1 Litterature review . . . 3

2 Theory 5 2.1 Overview . . . 5

2.2 The markets and interconnections . . . 6

2.2.1 Nordpool . . . 7

2.2.2 European power exchange . . . 7

2.2.3 Power exchange central Europe . . . 7

2.2.4 Cross border electricity flow . . . 7

2.2.5 The net transmission capacity. . . 9

2.3 Generators on the market . . . 9

2.3.1 Renewable production . . . 9

2.3.2 Nuclear power . . . 10

2.3.3 Hydro power . . . 11

2.3.4 Natural gas and oil fueled power production. . . 11

2.3.5 Coal power production. . . 11

2.4 Electricity demand . . . 12

2.5 The electricity price forecast model . . . 12

2.6 Cross validation. . . 12

2.7 Mathematical modeling . . . 13

2.7.1 Ordinary least squares . . . 13

2.7.2 Lasso regression . . . 13

2.7.3 Tobit model for censored data. . . 15

(8)

2.7.4 Markov regime shifting models . . . 16

2.7.5 Markov regime shifting models with time variying transition prob-abilities . . . 19

2.7.6 Error calculations . . . 20

2.7.7 Goodness of fit . . . 21

2.7.8 Non-stationarity in time series . . . 24

2.7.9 Measuring multicolliniarity . . . 25

3 Method 26 3.1 Data collection . . . 26

3.1.1 The EE-FI border data . . . 27

3.1.2 The DE-CZ border data . . . 28

3.1.3 The DE-CH border data . . . 29

3.2 Modeling . . . 30

3.2.1 Estimation step. . . 30

3.2.2 Variable selection. . . 31

3.2.3 Cross validation . . . 31

3.2.4 Error calculations and goodness of fit . . . 32

3.2.5 Handling seasonality and trends . . . 32

3.2.6 Multicollinearity . . . 35

4 Results and discussion 36 4.1 The flexible Tobit model . . . 36

4.2 The EE-FI cross-border flow. . . 38

4.2.1 Results and comparison between the OLS, standard Tobit and flexible Tobit . . . 38

4.2.1.1 OLS . . . 38

4.2.1.2 Standard Tobit. . . 39

4.2.1.3 Flexible Tobit . . . 40

4.2.2 Results and comparison of the Markov models . . . 41

4.2.2.1 Markov regime shifting flexible Tobit . . . 41

4.2.2.2 Markov regime shifting flexible Tobit with time varying transition probabilities . . . 43

4.2.3 Results from the Lasso estimation . . . 45

4.2.4 Variable selection. . . 48

4.2.5 Summary EE-FI cross-border flow estimations . . . 50

4.3 The DE-CZ cross-border flow . . . 51

4.3.1 Results and comparison between the OLS, standard Tobit and flexible Tobit . . . 51

4.3.1.1 OLS . . . 51

4.3.1.2 Standard Tobit. . . 52

4.3.1.3 Flexible Tobit . . . 53

4.3.2 Results and comparison of the Markov models . . . 54

4.3.2.1 Markov regime shifting flexible Tobit . . . 55

4.3.2.2 Markov regime shifting flexible Tobit with time varying transition probabilities . . . 58

4.3.3 Results from the Lasso estimation . . . 60

(9)

4.3.5 Summary DE-CZ cross-border flow estimations . . . 65

4.4 The DE-CH cross-border flow . . . 66

4.4.1 Results and comparison between the OLS, standard Tobit and flexible Tobit . . . 66

4.4.1.1 OLS . . . 66

4.4.1.2 Standard Tobit. . . 67

4.4.1.3 Flexible Tobit . . . 68

4.4.2 Results and comparison of the Markov models . . . 70

4.4.2.1 Markov regime shifting flexible Tobit . . . 70

4.4.2.2 Markov regime shifting flexible Tobit with time varying transition probabilities . . . 73

4.4.3 Results from the Lasso estimation . . . 77

4.4.4 Variable selection. . . 80

4.4.5 Summary DE-CH cross-border flow estimations . . . 80

4.5 Extension and future work . . . 81

4.6 Computational time . . . 81

5 Conclusion 83 5.1 Cross border flow modelling . . . 83

5.2 EE FI . . . 84

5.3 DE CZ . . . 84

(10)

2.1 Intersect demand and merit order . . . 6

2.2 Cross border flow of electricity for Germany (February 1 2016, 2am) as presented by the German transmission system operator. This figure shows how the market with Germany (DE) Austria (AT) and Luxembourg (LU) imports and exports from neighbouring markets [1]. . . 8

2.3 Map of interconnectors for Germany. This is what the interconnectors looks like from the transmission system operators perspective [1]. . . 8

2.4 Lasso regression [2]. The estimation of a model using different shrinkage steps (elipsoids). The center dot represents an OLS estimation and the outermost elipsoide shows where the coefficient β1 has been shrunken to zero. . . 14

2.5 Markov 2-state model with transition probabilities πij . . . 18

2.6 AIC and BIC . . . 22

3.1 Time series suffering from a linear trend and a seasonality component . . 33

3.2 Time series suffering from a seasonality component . . . 34

3.3 Time series where the seasonality component and the linear trend has been removed . . . 34

3.4 Forecasting model . . . 35

4.1 Time Series of cross-border flow with several censoring limits . . . 37

4.2 Forecast using the OLS estimation . . . 39

4.3 Forecast using the standard Tobit estimation . . . 40

4.4 Forecast using the flexible Tobit estimation . . . 41

4.5 Forecast for case 1 of the Markov regime shifting model . . . 42

4.6 Forecast for case 1 of the Markov regime shifting TVTP models . . . 44

4.7 Trace plot showing the shrinkage of independent variables. Coefficients B1 to B16 are listed in decending order in Table 4.12 . . . 46

4.8 Relationship between estimated MAE and shrinkage step. . . 46

4.9 Forecast using the min of MAE for shrinkage parameter λ . . . 47

4.10 Forecast using the OLS estimation . . . 52

4.11 Forecast using the standard Tobit estimation . . . 53

4.12 Forecast using the flexible Tobit estimation . . . 54

4.13 Forecast for case 1 of the Markov regime shifting models . . . 55

4.14 Forecast for case 2 of the Markov regime shifting models . . . 56

4.15 Forecast for case 1 of the Markov regime shifting TVTP models. . . 58

4.16 Forecast for case 2 of the Markov regime shifting TVTP models. . . 59

4.17 Trace plot showing the shrinkage of independent variables. Coefficients B1 to B19 are listed in decending order in Table 4.30 . . . 61

(11)

4.18 Relationship between estimated MAE and shrinkage step . . . 62

4.19 Forecast using the min of MAE for shrinkage parameter λ . . . 62

4.20 Forecast using the OLS estimation . . . 67

4.21 Forecast using the standard Tobit estimation . . . 68

4.22 Forecast using the flexible Tobit estimation . . . 69

4.23 Forecast for case 1 of the Markov regime shifting models . . . 71

4.24 Forecast for case 3 of the Markov regime shifting models . . . 72

4.25 Forecast for case 1 of the Markov regime shifting TVTP models. . . 73

4.26 Forecast for case 3 of the Markov regime shifting TVTP models. . . 75

4.27 Trace plot showing the shrinkage of independent variables. Coefficients B1 to B21 are listed in decending order in Table 4.50 . . . 77

4.28 Relationship between estimated MAE and shrinkage step . . . 78

(12)

4.1 Resulting coefficients from the estimation of the generated data for each model . . . 37

4.2 Goodness of fit and forecast error for the OLS estimation . . . 38

4.3 Estimated coefficients for the OLS estimation . . . 38

4.4 Goodness of fit and forecast error for the standard Tobit estimation . . . 39

4.5 Estimated coefficients for the standard Tobit estimation . . . 39

4.6 Goodness of fit and forecast error for the flexible Tobit estimation . . . . 40

4.7 Estimated coefficients for the flexible Tobit estimation . . . 40

4.8 Goodness of fit and forecast error for case 1 of the Markov regime shifting model . . . 42

4.9 Estimated coefficients for case 1 of the Markov regime shifting model . . . 43

4.10 Goodness of fit and forecast error for case 1 of the Markov regime shifting TVTP models . . . 43

4.11 Estimated coefficients for case 1 of the Markov regime shifting TVTP models . . . 44

4.12 VIF for the independent variables. . . 45

4.13 Estimated coefficients for the Lasso regression with lowest MAE . . . 47

4.14 Goodness of fit and forecast error for the Lasso regression with lowest MAE 48

4.15 Summary of error calculations for all estimated methods in the EE-FI cross-border flow estimations . . . 50

4.16 Goodness of fit and forecast error for the OLS estimation . . . 51

4.17 Estimated coefficients from the OLS estimation . . . 51

4.18 Goodness of fit and forecast error for the standard Tobit estimation . . . 52

4.19 Estimated coefficients from the standard Tobit estimation . . . 52

4.20 Goodness of fit and forecast error for the flexible Tobit estimation . . . . 53

4.21 Estimated coefficients from the flexible Tobit estimation . . . 53

4.22 Estimated coefficients for case 1 from the Markov regime shifting models. 56

4.23 Goodness of fit and forecast error for case 1 of the Markov regime shifting models . . . 56

4.24 Estimated coefficients for case 2 from the Markov regime shifting models. 57

4.25 Goodness of fit and forecast error for case 2 of the Markov regime shifting models . . . 57

4.26 Estimated coefficients for case 1 from the Markov regime shifting TVTP models . . . 59

4.27 Goodness of fit and forecast error for case 1 of the Markov regime shifting TVTP models . . . 59

4.28 Estimated coefficients for case 2 from the Markov regime shifting TVTP models . . . 60

(13)

4.29 Goodness of fit and forecast error for case 2 of the Markov regime shifting TVTP models . . . 60

4.30 VIF for the independent variables. . . 61

4.31 Estimated coefficients for the Lasso regression with lowest MAE . . . 63

4.32 Goodness of fit and forecast error for the Lasso regression with lowest MAE 63

4.33 Summary of all estimated methods for the DE-CZ cross-border flow esti-mations . . . 65

4.34 Goodness of fit and forecast error for the OLS estimation . . . 66

4.35 Estimated coefficients for the OLS estimation . . . 66

4.36 Goodness of fit and forecast error for the standard Tobit estimation . . . 67

4.37 Estimated coefficients from the standard Tobit estimation . . . 67

4.38 Goodness of fit and forecast error for the flexible Tobit estimation . . . . 68

4.39 Estimated coefficients from the flexible Tobit estimation . . . 68

4.40 Correlations between independent variables and the dependent variable for data 2013 to 2015. . . 70

4.41 Estimated coefficients for case 1 from the Markov regime shifting models. 71

4.42 Goodness of fit and forecast error for case 1 of the Markov regime shifting models . . . 71

4.43 Estimated coefficients for case 3 from the Markov regime shifting models. 72

4.44 Goodness of fit and forecast error for case 3 of the Markov regime shifting models . . . 72

4.45 Estimated coefficients for case 1 from the Markov regime shifting TVTP models . . . 74

4.46 Goodness of fit and forecast error for case 1 of the Markov regime shifting TVTP models . . . 74

4.47 Estimated coefficients for case 3 from the Markov regime shifting TVTP models . . . 75

4.48 Goodness of fit and forecast error for case 3 of the Markov regime shifting TVTP models . . . 75

4.49 VIF for the independent variables. . . 77

4.50 Estimated coefficients for the Lasso regression with lowest MAE . . . 79

4.51 Goodness of fit and forecast error for the Lasso regression with lowest MAE 79

(14)

Introduction

Before 1980 the electricity market was a natural monopoly controlled by state owned companies [3], [4]. The fact that storage of electricity is hard and economically expensive, in other words; the supply must meet the demand, every second, every day made the restructuring of the electricity market challenging. Electricity prices were kept on a flat level and production was often carefully controlled by state governed monopolies [5]. The main concern of this time was short term demand forecasts. This was important in order to plan the production to meet the demand in an efficient way.

This was about to change in the first half of the 1980’s when Chile made a successful deregulation and introduced competition on the market. Other countries followed the initiative and in the 1990’s USA and several European countries deregulated their elec-tricity markets as well. Price volatility increased and was much higher than in other commodity markets (as of natural gas and crude oil). This presented a need for accu-rate price forecasts in order to make production and consumption as efficient as possible for the players on the market [4]. A price forecast can be created with fundamental information on the market, such as available supply, cost of production and a forecasted demand. With this information a model can be built that finds the intersect of supply and demand which yields a price.

For an electricity producer a reliable price forecast helps to increase the profit of elec-tricity sold on the market. This helps the player to plan optimal dispatch of generation (if the player is a producer), but also for hedging and trading purposes.

Today the European electricity markets are striving to become more interconnected with mutually increased exchange capacities. This implies new patterns and dynamic behaviors on the markets since they start influencing each other in a larger extent. The influence from other markets needs to be predicted in order to forecast a price. Import

(15)

of electricity to a market could be looked upon as an increased supply in a modeling aspect of the electricity market.

This leads to the topic of this thesis. A player on the electricity market has a need to improve the forecast of the cross-border flow of electricity between different markets in a model that predicts electricity prices. The current problem is due to the limitation in cross-border flow capacity between the markets, which is not accounted for in the cur-rently used cross-border flow model. This capacity is a physical constraint on how much electricity the connectors are able to transfer set by the transmission system operator in order to achieve safe operation of the power system.

The forecast was previously produced by using a multiple linear regression. This is a mathematical model using least square estimation to find the relationship between the cross-border flow of electricity and generation and demand. This existing model forecasts the cross-border flow without taking the constraint of a limited transfer capacity in consideration.

This thesis presents alternative methods to estimate and forecast cross-border flow of electricity where there is a limitation of transfer capacity. The examined model is a development of the so called Tobit model for censored data, which is taking limited variables in consideration. An extension in the form of hidden Markov chains and two different cases of the Tobit model will also be discussed and examined with respect to forecast performance. The main research question is if the new methods could improve the cross-border flow forecast in terms of predictive power compared to the OLS method. The forecasts of the cross-border flow is used in a mid-term time frame in a market model. The mid-term is defined as day ahead to two years in the future. The method used in this paper is a cross validation using training data from 2013 and 2014. A forecast is produced for January 2015 to September 2015. The produced forecast is compared to the known outcome of the cross-border flow during this time. There are three specific borders examined in this paper. These are the borders between Germany to Switzerland, Germany to Czech Republic and Finland to Estonia. The three borders are fundamentally different regarding transfer capacities and available data and this makes a suitable environment to test the performance of the mathematical model under different assumptions.

Finally the cross-border flow forecast is also wanted since it could help to understand relationships, drivers and indicators between the connected markets.

(16)

1.1

Litterature review

Previous work within the area is extensively related to estimating relationships between production and electricity prices rather than cross-border flows, although some articles are touching upon the subject. Market coupling which results in a more interconnected European grid together with increasing share of renewables has resulted in papers that treats the impact of renewables on cross-border flows. In [6] the authors investigate how technical and physical constraints in the German electricity spot market, together with increasing wind power production affects assessment and optimization of the power system. A similar study have been performed in [7] with the purpose of a statistical analysis of the relationship of wind power production and cross-border flow between the German and Danish electricity markets. In the previous mentioned case a Principal Component Analysis was used in order to estimate drivers affecting the cross border flow. Models like the ordered-logit regression and log-linear regression models have been used in [8] to explain wind powers effect on zonal price differences and cross market flows in the state of Texas.

Various ways of explaining the electricity prices with econometric models have been made in the literature. Different multiple linear regression models as well as dynamic regression models have been used previously to estimate prices on the electricity spot market on the day ahead time frame [9].

ARIMA and GARCH models are commonly found methods in the literature. They could be used for estimating electricity demand and prices. One example is [10] where volatility in short term electricity prices have been explained using combinations of GARCH and ARMA models. In [11] the authors compares four different combinations of GARCH/ARMAX models for estimating day ahead prices in electricity markets. The different models are compared with each other regarding forecast performance.

(17)

[16] and [17]. Previous mentioned articles are using information to the artificial neural networks regarding fundamentals to forecast short-term prices on spot markets.

Previous mentioned literature treats short-term forecasts. A mid-term horizon in the electricity market had been treated in [18] where a hybrid model consisting of ARMAX and a least squares support vector machine model was proposed to forecast mid-term electricity market clearing prices on a 6 months horizon.

This thesis contributes with new approaches by using the Tobit model for censored data when estimating cross-border flow between electricity markets and price areas in a mid term perspective. The Tobit model is here combined with Markov regime shifting to capture how changes in different fundamentals impact the cross-border flow.

Author Year Models Information predicted Time frame (prediction) Lilian M. 2014 MGARCH Spot market price

be-havior due to transmis-sion capacity and wind power Short term (day ahead) Chen, D. Bunn, D. 2014 Markov regime shifting and smooth transi-tion regression

Spot market price be-havior due to funda-mentals and lags

Short term (day ahead) Zugno, T. Morales, M. Madsen, J. Pinson, H. Jonsson, P. 2012 Principal Com-ponent Analy-sis

Cross border flow due to wind power production and transfer capacity

Short term (day ahead)

Jammazi, R. 2010 Wavelet analy-sis and Markov shifting

Crude oil impact on spot prices

Short term (day ahead) Cifter, A. 2013 Markov

shift-ing GARCH

Electricity spot prices using lags Short term (day ahead) Yan, X. Chowdhury, N. A. 2013 Least squares support vector machine and ARMA

Electricity spot prices using lags and funda-mentals

(18)

Theory

This chapter introduces the markets and models that are used in this thesis. A funda-mental price forecast model and the mathematical theory used for prediction is described.

2.1

Overview

A harmonization of the European power market is a goal from the European energy commission [3]. “The European target model for electricity integration”, means that the European energy commission strives to integrate the different electricity power markets in Europe in order to create a more efficient and liquid market. Efficient use of cross-border flow capacity and making a closer market coupling is a goal. All this means changes in the cross-border flow and the flow between price areas and markets. New links are constructed in order to increase the capacity between the markets in order to be less restrictive regarding exchange of electricity. Changes also occur in the power production. Increased share of renewable production in the electricity production puts even more dynamics to the European power market prices and this affects the cross-border flow. Increased cross-cross-border flow capacity makes possible better use of the power where it is needed.

The cross-border flow estimation and forecast could be looked upon as another approach of understanding relationships that drives the prices on the integrated European markets [5]. Electricity production costs is naturally related to other commodities such as natural gas and hard coal and thus a relationship is present between the prices of the commodities in the different markets. The prices of commodities related to power generation decides dispatch decisions. Renewables and hydro production is other types of supply that affects prices and also adds volatility to the market. This chapter explains the market structure and the mathematical theory behind the forecast model.

(19)

2.2

The markets and interconnections

By deregulating the market and introducing competition one aims to achieve a more efficient market. The market structure in the treated markets is retail competition [4]. The consumer has an option to choose from a number of retailers who all buy electricity from the wholesale market, where different producers sell their electricity. It is common that the electricity transmission system is a monopoly for practical reasons. The operator of the transmission system is referred to as a Transmission System Operator (TSO) [19].

There are several types of electricity markets available. The type of markets main dealt with in this thesis is typical electricity spot markets. Bids are collected daily and hourly and the offered supply is matched with the bids from the demand side by the market operator. The trade in the spot market is for day ahead and a price is set by solving a linear optimization problem to calculate the social welfare maximum. This is the intersect of the supply and demand curve which is shown in Figure2.1.

The European electricity markets are increasing their interconnectivity as an incentive from the European energy commission in order to make a more liquid market. The reason for this is the objective with a broader variety of generation types and to maximize the social welfare. All below listed markets are also offering intra-day trading and different options for long-term contracts.

Figure 2.1: Intersect demand and merit order

(20)

2.2.1 Nordpool

The biggest market in the EU is Nordpool if looked upon market share and volume traded [3]. Norway deregulated their market in 1992 followed by Sweden in 1996. Together they formed the Nordpool market. Later Finland, Denmark and Estonia joined the Nordpool market. The market is unique due to its large share of hydro power production (Norway has almost 100 % of the production from hydro power), which accounts for 55 % of the total production. This together with increasing wind power production is responsible for a sometimes dynamic and volatile electricity price behavior related to weather and precipitation. The market is owned by the TSOs (Transmission system operators) in Sweden, Finland, Denmark and Norway and the owners of the Baltic transmission system.

2.2.2 European power exchange

The European Power Exchange (EPEX) operates a spot market in the following coun-tries: France, Germany, Luxembourg, Switzerland and Austria [19]. The EPEX spot market is owned by the Amsterdam Power Exchange (APX) which is the energy ex-change operating the spot market in Belgium, Netherlands and in the UK.

2.2.3 Power exchange central Europe

Power Exchange Central Europe (PXE) opened in 2007 and it is the market operator for power trading in Czech Republic, Slovakia, Hungary, Poland and Romania [20].

2.2.4 Cross border electricity flow

(21)

Figure 2.2: Cross border flow of electricity for Germany (February 1 2016, 2am) as presented by the German transmission system operator. This figure shows how the market with Germany (DE) Austria (AT) and Luxembourg (LU) imports and exports

from neighbouring markets [1].

(22)

2.2.5 The net transmission capacity

The net transmission capacity, or NTC, is a representation of the joint transmission capacity between price zones in a market or between connected markets. The capacity is varying over time and is assessed through security analysis based on the system and network conditions for a reference period. The NTC is estimated by the TSO in respec-tively country [1]. A decreased capacity could also be due to maintenance or outages and the scheduled NTC is communicated with the players on the market. The limit of import is not necessary the same as the limit of export.

The information regarding NTC will be used in the new model to better estimate the cross-border flows. The NTC data is in this case provided on an hourly basis as a time series. The data provider is the TSO and they also provide scheduled future values of NTC levels. The most economically efficient case is where the NTC is at its maximum capacity.

2.3

Generators on the market

The electricity generators schedule their generation carefully according to the market. Information regarding related commodity prices (gas, oil, lignite, hard coal etc.) influ-ences the dispatch decisions. In order to optimally dispatch the electricity generation a merit order curve is formed as in Figure 2.1. The merit order starts with the least expensive generation type and continues with more expensive types. The intersect of all producers aggregated merit order curves and the demand curve sets the electricity price. The different generation types and where they fit in the merit order is described below.

2.3.1 Renewable production

(23)

The bids on the market are more dependent on the day ahead forecast of wind power rather than the actual wind power production, since the producers estimate the amount of production from weather forecasts and place their bids accordingly [7]. The renewable production is characterized by intermittency and sudden jumps in the production [21].

The European wind sector is in an expansion phase and in 2020 the renewable energy sources should stand for 20 % of the production in the EU [22]. The expansion is con-trolled by environmental, political and economic incentives. This makes sure that the renewable production will continue to grow. The German EPEX market currently sees around 22 % of its production from renewable generation [23]. By 2030 EPEX expects renewable production at a level of 35 %. Denmark is also a big wind power producer with an objective of producing 50 % of its generation from the renewable production by the year 2025 [7]. A study by [7] has analyzed the relationship between wind power production and cross-border flow between Denmark and Germany and the authors con-clude that “The effect of wind power generation on electricity markets and power flows is recognized but not always understood and quantified.”

2.3.2 Nuclear power

(24)

2.3.3 Hydro power

As mentioned earlier the impact of hydro power generation is big in the Nordic market. Hydro power has a storage capacity in dams and this creates an opportunity cost in the scheduled production [4], [26]. This is the cost today resulting from the benefit of dispatching the generation tomorrow. In order to maximize the profit the producer dispatches hydro power when prices are high. Work has been done in order to optimize short term hydro dispatch considering wind power production [27].

The controllability of hydro production is high until the dams are filled. This occurs after periods of high precipitation or sudden snow melts and result in unplanned dispatch of generation. This could affect the prices and the cross border flow.

2.3.4 Natural gas and oil fueled power production

These are usually baseload plants because of the fast ramping speed. This gives the possibility to start up the production when demand is high and/or other generation types are low in production. The gas and oil plants are in the uppermost part of the merit order due to high marginal costs as can be seen in Figure 2.1.

2.3.5 Coal power production

The coal power production is also considered a part of the baseload production. Coal prices together with emission rights make up the total marginal cost for production. Currently low coal prices together with the need of fast ramping to supply the renew-able production in the system has increased the incitement to dispatch coal powered generation [28].

(25)

2.4

Electricity demand

Demand in the electricity market is a widely discussed topic. An assumption has his-torically been made where the Demand is looked upon as an exogenous variable. The demand is considered inelastic [29], not sensitive to price changes, because electricity is produced as a commodity but consumed as a service. The consumer do not respond in the same way for price changes as in other markets in the short-term. The electricity prices inherit some characteristics from the demand such as a multi level seasonality; daily, weekly, monthly and yearly. Handling this type of data will be further discussed in the method chapter where the goal is to achieve stationarity in the data.

2.5

The electricity price forecast model

The model where the improvement of cross-border flow forecasts can be an advantage is a price forecasting model for the Nordpool and EPEX spot markets in a mid-term time horizon. Mid-term is defined as forecasts for day ahead to 2 years in advance and the end usage areas of the mid-term forecast model is trading, hedging and optimal dispatch. The mid-term forecast model is a fundamental model using data of available supply by production type which forms a merit order. The mid-term forecasting model uses previously mentioned information to solve a linear optimization problem to find the intersect between the supply and an estimated demand curve in order to calculate the day ahead electricity spot price. Two connected markets are, where both markets exists as models, optimized together and in this way the cross-border flow will run in the direction where the price is higher. The cross-border exchange of power that is exogenous to the market models needs to be estimated in order to accurately predict the total supply. This is taken into account before the optimization is carried out. The predicted import or export is considered in the model and shift the supply curve to the right (import) or to the left (export).

2.6

Cross validation

(26)

2.7

Mathematical modeling

In this section all mathematical theory used in this thesis will be explained. This is divided in three different parts. The first part explains the estimation methods of co-efficients in a multiple linear model as in 2.1, treating time series with T time values and m independent variables and an independent and normally distributed error term u ∼ N (0, σ2). The second part handles the error calculations and goodness of fit for the estimation and forecast. The last part is treating the data generating process and how to measure non-stationarity, seasonality, linear trends and multicollinearity.

yt= xtjβj + u t = 1, 2..., T j = 1, 2...m (2.1)

The forecast is calculated for the forecast period in the cross validation as2.2.

ft= t

X

t=1

xtjβj+ u t = 1, 2..., T j = 1, 2...m (2.2)

2.7.1 Ordinary least squares

The ordinary least squares or OLS as seen in equation 2.3 is minimizing the residual squared errors. This model is sensitive to outliers, non-stationarity and trends [31]. Usu-ally variance is large with a small bias in this type of model. The OLS is a basic way to estimate a relationship between an independent variable and a dependent variable. The vector of coefficients βj describes the relation between the independent and dependent

variable.

ˆ

β = arg min

βj

S(βj) (2.3)

With the goal to minimize the sum or errors as in equation2.4

S(βj) = T X t=1 yt− m X j=1 xtjβj 2 (2.4) 2.7.2 Lasso regression

(27)

other. This issue is called multicollinearity [32], and more throughly described later in the theory chapter. The Lasso regression penalizes, or more intuitively shrink, the beta coefficients that could grow proportionally to big due to multicollinearity in the ordinary least square case. This makes the lasso sacrifice some of the bias in order to decrease the big variance explained in the model. The shrinking continues until all variables are set to zero and this makes it a simple yet useful way of performing variable selection to the model. Assume a model where the time series xtj contains m independent variables

for time t = 1, ..., T and ytis the dependent variable. The lasso then calculates equation 2.5 (ˆc, ˆβLassoλ ) = minn T X t=1 (yt− m X j=1 βjxtj)2+ λ m X j=1 |βj|o subject to m X j=1 |βj| < c (2.5)

Where λ is a positive parameter, c is a constant and βj is a vector of size m. When

increasing the parameter λ in equation2.5the number of non-zero coefficients in ˆβLasso λ

decreases. Figure 2.4shows how the different shrinkage steps effects the estimation. In this case only β1 is shrunken to zero. Lasso could be considered as a more democratic

way of variable selection compared to the algorithm of stepwise regression.

Figure 2.4: Lasso regression [2]. The estimation of a model using different shrinkage steps (elipsoids). The center dot represents an OLS estimation and the outermost

(28)

2.7.3 Tobit model for censored data

The Tobit model for censored data was first described by James Tobin in 1958. It is a suitable way of estimating linear model parameters of the form in 2.6 when the dependent variable is limited as in 2.7. The observed dependent variable will in this thesis be referred to as limited or censored interchangeably [33].

yt= xtjβj+ u t = 1, 2..., T (2.6) yt=    yt if 0 < yt 0 if yt< 0 (2.7)

The Tobit model in2.7was later improved in order to handle any lower and upper limit and the ability to account for latent variables.

2.8is commonly known as the Type 1 Tobit and describes a model where the dependent variable is limited by a lower and an upper bound. This two limit Type 1 Tobit model was first proposed by Richard N. Rosett and Forrest D. Nelson in 1975 [34] and will be refereed to as the standard Tobit model in this thesis. Type 2 to Type 4 Tobit models handles different combinations of latent variables and several dependent variables and is not discussed in this thesis.

yt=          yt if lb < yt< ub ub if ub < yt lb if yt< lb (2.8)

The two limit Type 1 Tobit model can be written as equation 2.9 where L is the esti-mation of the maximum likelihood of the unknown parameters β. In2.9there are three different products where S1 is handling observations that are censored at the lower bound, S2 observations censored by the upper bound and S3 the non-limited observa-tions. More precise, S1 and S2 describes the likelihood function of a probit model and S3 is the likelihood function of a truncated regression model. Φ is the standard normal distribution and φ is the cumulative distribution function [35]. As before lb and ub describes the lower and upper level of censoring as described previously in2.8.

(29)

The logarithm of the function 2.9 as in 2.10 is easier to calculate numerically. The log likelihood can be calculated numerically using the expectation maximization algorithm.

log L =X S1 ln  Φ lb − xtjβj σ  +X S2 ln  Φ  −ub − xtjβj σ  + X S3 ln 1 σφ  yt− xtjβj σ  (2.10)

2.10 is in this thesis further generalized not just to take account for a constant upper and lower limit, but to let these vary in time as the described case in2.11. The resulting model have vectors of upper and lower limits corresponding to each value in time t. This could be solved numerically in different ways and a simple approach is to associate unique values from the two vectors of upper and lower limits to groups and estimate each group with a standard Tobit model. Another approach is to numerically use maximum likelihood in order to calculate 2.12.

yt=          yt if lbt< yt< ubt ubt if ubt< yt lbt if yt< lbt (2.11) log L =X S1 ln  Φ lbt− xtjβj σ  +X S2 ln  Φ  −ubt− xtjβj σ  + X S3 ln 1 σφ  yt− xtjβj σ  (2.12)

2.7.4 Markov regime shifting models

A Markov regime shifting model relies on the assumption that a stochastic process yt is depending on the realizations of a hidden discrete stochastic process which is a

irreducible and aperiodic Markov chain with a finite state space st [36], [37]. Below is

an example to explain what was just stated. Assume that a stochastic process yt is

directly observable while another stochastic process, st, is unobservable. What follows

is a simple two-state example with a model containing one independent variable xt, a

coefficient β and a constant term c1 for the time series t = 1, ..., tn. Assume that the

(30)

yt= c1+ xtβ + ut for t = 0, ..., tk−1 (2.13)

However at time tk an event occurs in the time series that makes the model2.14 more

accurate with a constant term of c2 insted of c1. The event is a sudden jump in the

dependent variable ytat time tk.

yt= c2+ xtβ + ut for t = tk, ..., tn (2.14)

Using2.14will improve a forecast compared to 2.13for t = tk, ..., tn, but the event that

shifts from c2 to c1 might not be a deterministic event possible to predict at time tk−1.

This makes a model like 2.15more suitable.

yt= cst+ xtβ + φyt−1+ ut for t = ts, ..., tn (2.15)

2.15is a probabilistic model that uses the autoregressive term φyt−1in order to describe

what accounted for the shift from one state s1 during time t = 0, ..., tk−1, to the next

state s2, at time t = tk, ..., tn. This is refereed to as the regime shift (or switch) and a

specification is that st is the realization of a two-state markov chain as in2.16.

P r(st= j|st−1= i, st−2= k, ..., yt−1, yt−2, ...) = P r(st= j|st−1= i) = πij (2.16)

What 2.16 decribes is that the probability of a change in regime is only dependent on the current regime and the information of the past.

The probabilities that describe the change in states form the transition probability matrix of size i × j. The two-state transition probability matrix is described in 2.17

and in figure2.5.

Π = π1,1 1 − π1,1 1 − π2,2 π2,2

!

(31)

Figure 2.5: Markov 2-state model with transition probabilities πij

The transition probability matrix has the property of2.18.

K−1

X

j=0

πij = 1 (2.18)

Recall that stis not observed directly but infer its operations on the observed dependent

variable yt.

The intercepts c1 and c2, the standard deviation of the error term σ2 and the

autore-gressive coefficient φ could be used in order to describe the probabilities that governs yt.

Now a parameter vector using known information from the model is formed as

θ =(σ, φ, c1, c2, π11, π22). Also let Ωt= {yt, yt−1, · · · , y1, y0} be a set of observed values

of the dependent variable y up to time t.

An inference about stis only possible to make based on future values of yt. 2.19describes

the start of the iterative process of calculating the probabilities using a new variable ξ. In this case the two states are given by j = 1, 2.

ξj,t = P r(st= j|Ωt; θ) (2.19)

2.19is produced iteratively for t = 1, ..., n by using prior information, from time t − 1, as described in2.20for the previous two states i = 1, 2. At t = 0 an initial guess is needed and this could simply be set to 2.21.

ξi,t−1= P r(st−1= i|Ωt−1; θ) (2.20)

ξj0 =

1

(32)

The necessary information needed in order to calculate2.20and get2.19are the densities under each regime which is described in 2.22.

ηjt = f (yt|st= j, Ωt−1; θ) = 1 √ 2πσ2exp  −(yt− cj− φyt−1) 2 2σ2  (2.22)

Assuming an initial guess in 2.21 and the densities under each regime2.22 and 2.20 it is possible to calculate the conditional density of observation t as in 2.23.

f (yt|Ωt−1; θ) = 2 X i=1 2 X j=1 πijξi,t−1ηjt (2.23)

The calculation results in2.24.

ξj,t =

P2

i=1πijξi,t−1ηjt

f (yt|Ωt−1; θ)

(2.24)

By using the iterative procedure described above it is possible to calculate the sample conditional log likelihood of the data sample Ωt using the parameters θ by numerically

maximizing 2.25. The procedure is called Hamilton’s filtering algorithm.

log f (y0, y1, ...yn|yt; θ) = n

X

t=1

log f (yt|Ωt−1; θ) (2.25)

The regime shifting could later be used to form a forecast. By knowing the transition probability matrix one can apply filtering for future values. The shifting can be due to any independent variable by adding the information to θ.

2.7.5 Markov regime shifting models with time variying transition probabilities

Previously the transition probability matrix is constructed to be constant in time. In the following model the transition probability matrix will be dependent on previously values of the observations of yt and thus be able to change over time. This can be seen

(33)

Πt=

π1,1,t 1 − π1,1,t

1 − π2,2,t π2,2,t

!

(2.26)

The difference between the previous case is the extension of a linked function that associate lags of ytto future transition probabilities. The parameter θ is here extended

to contain a static parameter θ∗ and a dynamic parameter ft. The two stage model in 2.26 is used where the transition probabilities is calculated from2.27.

πii,t= δii+ (1 − 2δii)exp(−fii,t)/(1 + exp(−fii,t)) (2.27)

In2.27 two restricted parameters where used as follows: 0 < δii< 0.5 and i = 0, 1.

The time varying parameter ft is updated regarding the score of the predictive density

as in2.28, where A and B are coefficient matrices, w is a vector of constants.

st is using a scaling matrix St in order to calculate the predictive observation density

with respect to ft.

ft+1 = w + Ast+ Bft st= St· 5t 5t=

δ δft

log p(yt|ft; Ωt−1; θ∗) (2.28)

The time varying parameter ftis now able to be estimated from the updating equation

using 5t from 2.28. This yields new expressions for the conditional density previously

shown in2.23. The score vector for the conditional density now looks like2.29and2.30.

Ot= p(yt|st= 0; θ∗) − p(yt|st= 1, θ∗) p(yt|θ∗; Ωt−1) g(ft, θ∗, Ωt−1) (2.29) g(ft, θ∗, Ωt−1) = P [st−1= 0|θ∗, Ωt−1]· (1 − 2δ00)π00,t(1 − π00,t) −P [st−1 = 1|θ∗, Ωt−1]· (1 − 2δ11)π11,t(1 − π11,t) ! (2.30)

For a more in dept study and suggestions on methods to solve this numerically see [37].

2.7.6 Error calculations

(34)

The estimated error etis defined as yt∗− ytwhere yt∗ is the estimated value and ytis the

actual value in the training period.

The forecasted error etis defined as ft− ytwhere ft is the forecasted value and ytis the

actual value in the forecast period.

M SE = 1 T T X t=1 e2t (2.31) RM SE = v u u t 1 T n X t=1 e2t (2.32) M AE = 1 T T X t=1 |et| (2.33) M AP E = 100 T T X t=1 et yt (2.34) 2.7.7 Goodness of fit

The R2 is defined as 2.35 and is a measure of the percentage of variance explained by the model [38]. An improvement of this measurement is the adjusted R2 described in

2.36which takes the sample size in consideration. Usually the adjusted R2

adjustedis lower

than the normal R2, but only marginally if the model is not suffering from biased noise, too many independent variables and a too short time series.

R2 = 1 − P t(yt− ft)2 P t(yt− ¯yt)2, (2.35) Where ¯y is the mean value of the observed data.

R2adjusted= 1 − (1 − R2) n − 1

n − j − 1 (2.36)

In 2.36 n is the total size of the data points(sample size) and j is the number of inde-pendent variables.

(35)

R2p = cov(xjtyt) σxσy

(2.37)

When looking at the training and forecast period in a cross validation one can compare how the correlations are for the different datasets by this measurement.

For the Markov regime shifting models a similar use of goodness of fit is used, the Akaike information criterion (AIC) and the Bayesian Information Criterion (BIC). This is for the same purpose, to select between different variable selections among the models and to be able to choose the most proper variable selection. AIC and BIC describes the relationship between the number of independent variables, the bias and the variance explained by the model as can be seen in figure 2.6. The best model is where the AIC and BIC is chosen as low as possible compared to the other models. The absolute value of the AIC and BIC is not of any intuitive interest since it only tells a relative goodness of fit. AIC and BIC is defined in equation2.38and2.39respectively. The AIC penalizes over fitting in the means of number of regressors.

Figure 2.6: AIC and BIC

AIC = 2j − 2 ln(L) (2.38)

(36)
(37)

2.7.8 Non-stationarity in time series

For the classical inference statistics to be valid there are certain properties that should be present in the data. Statistical properties are supposed to be constant in time to avoid false relationships. This was expressed by Newbold and Granger in their 1974 paper ”Spurious regression in econometrics”. In the paper the authors proved that non-stationarity in time series data is a problem which could make regression models invalid [31].

The three different criteria for stationarity in time series are here defined as 2.40, 2.41

and 2.42. 2.40 describes the statistical property of a constant expected value of yt in

time. The variance should also be constant in time and this is described by 2.41. The covariance between two points in the time series should only be described by the constant h as in2.42 for in time.

E[yt] = µ ∀ t (2.40)

E[(yt− µ)2] = 2σ2 ∀ t (2.41)

cov(yt1, yt2) = cov(yt1+h, yt2+h) ∀ t1, t2, h (2.42)

Two ways of measuring non-stationarity in a time series is by using the augmented Dickie Fuller-test (ADF-test) as in2.43or the Phillips Perron test (PP-test). The PP-test and ADF-test tests the assumption of a unit root (non-stationarity) in the time series, but with slightly different methods [5], [39]. The ADF-test uses a, by the econometrician, selected number of lags and tests for autocorrelation in the sample as well as linear trends and seasonality components. This thesis uses mainly the ADF-test which is described below.

yt= c + δt + φyt−1+ β1∆yt−1+ ... + βp∆yt−p+ u (2.43)

Where ∆ is a differencing operator which describes ∆yt = yt− yt−1, p is a specified

number of lagged terms and u ∼ N (0, σ2) . The ADF-test is testing the null hypothesis of a unit root (non-stationarity) H0 : φ = 1 under the alternative hypothesis of φ < 1.

(38)

is that the PP-test makes a non-parametric correction of the t-test statistic compared to the ADF which uses lags.

Some examples of non-stationary time series are described in the method chapter to-gether with suggestions on how to solve this matter.

2.7.9 Measuring multicolliniarity

Multicollinearity occurs when two or more independent variables are correlated with each other. This is a problem in models and often result in estimated coefficients being larger than what would be realistic [32]. To determine how much multicollinearity the data suffers from one could calculate the variance inflation factor (VIF) described in equation 2.44. In2.44 x¯j is the mean value of the time series xj and R2j is the R2 from

regressing xj on the remaining independent variables. In other words using xj as the

dependent variable in a regression model like2.1. VIF is interpreted as follows: VIF = 1 means no correlation between independent variables. For all VIF > 1 the data suffers from multicollinearity with values above 10 considered heavily influenced.

VIF =  σ2 P(xtj−¯xj)2 × 1 1−R2 j   σ2 P(xtj−¯xj)2  = 1 1 − R2j (2.44)

(39)

Method

This chapter describes methods for estimating the cross-border flow between the fol-lowing countries: Finland (FI) to Estonia(EE), Germany (DE) to Czech Republic (CZ) and Germany to Switzerland (CH). All data used in this thesis was gathered from a Bloomberg terminal available at KTH. Bloomberg is a service for financial data and allowed collection of extensive information otherwise hard to obtain. This type of data and service is commonly used by players on the market in order to make an analysis for dispatch decisions and for trading. The topic of available data is further discussed in the Discussion section.

The method of forecasting the cross-border flow is further described. Each investigated border is presented with the available data that was used in order to explain the cross-border flow.

Matlab was used for calculation and mathematical modeling. STATA was also used in addition to Matlab for summary statistics and basic analysis. All calculation was programmed on a DELL Elitebook8460P, 4GB RAM, Intel Core i5 2520M CPU 2.50GHz

3.1

Data collection

Bloomberg provides data regarding generation by type, national demand, net transmis-sion constraints and cross-border flow for the investigated borders in this thesis. It also provides historical time series regarding actual and forecasted prices which could be used complementary to verify if the price differences drives the border flow.

(40)

3.1.1 The EE-FI border data

Estonia and Finland are both within the Nordpool market as two different price areas. Following data was used for the estimation of cross-border flow between Finland and Estonia:

• Electricity demand in Finland • Nuclear production in Finland • Electricity demand in Estonia • Wind power production in Estonia • NTC in both directions

• Cross border flow of electricity

Above data for the border was available as hourly time series from January 2013 to the start of the collection of data in September 2015. This yields the possibility to use two years as a training period in the cross validation, 2013 and 2014. Forecasts are produced for 2015 and compared to the actual outcome. Wind power production is used as an independent variable since the production type had been shown to influence the cross-border flow between Denmark and Germany. This is also tested as a regime shifter in the Markov models. Nuclear production from Finland is also added as an independent variable since the nation is a big producer of this generation type.

(41)

3.1.2 The DE-CZ border data

This border is a market coupling between the PXE and EPEX markets [19]. Following data was used for the estimation of cross-border flow between Germany and Czech Republic:

• Electricity demand in Germany • Electricity demand in Czech Republic • Hard coal powered production in Germany • Lignite powered production in Germany • Natural gas powered production in Germany • Nuclear production in Germany

• Wind power production in Germany • NTC in both directions

• Cross border flow of electricity

The data for this border was available as hourly time series from October 2013 to the start of the collection of data in September 2015. NTC was available as far back as from this starting date, but all other data was available from the beginning of 2012. The estimations are considered most appropriate to perform on a whole year basis in order to capture the seasonality in the best way. This yields the possibility to use only one year as a training period in the cross validation, 2014. Forecasts are produced for 2015 and compared to the actual outcome. Production data was more generously available for Germany. Coal powered production was used together with Natural gas and Nuclear production in order to describe something similar to a base generation. The variables is tested independently and together with demand as defined in3.1.

T ightnessDE = DemandDE− (N atGasDE

+N uclearDE+ LigniteDE+ HardcoalDE)

(3.1)

Since data for electricity demand exists for each side of the border the difference in demand is tested as an independent variable as in 3.2

(42)

Demand is also tested as accountable for a regime shift in the Markov models with the same motivation as for the Finnish Estonian border above. The NTC and wind power production was also tested in the Markov models as a regime shifter. The use of dummy variables in the Lasso is motivated as for the previous border.

3.1.3 The DE-CH border data

Both nations are different price areas in the EPEX market [19]. Following data was used for the estimation of cross-border flow between Germany and Switzerland:

• Electricity demand in Germany

• Hard coal powered production in Germany • Lignite powered production in Germany • Natural gas powered production in Germany • Nuclear production in Germany

• Wind power production in Germany • Hydro inflow in Switzerland

• NTC in both directions

• Cross border flow of electricity

Production data was in this case similarly available and motivated as for the previously described border. Year 2014 is used as a training period and January to September 2015 is the forecast period. There are two differences worth to mention: first the demand in Switzerland was not available and second the hydro inflow for the alp region in Switzerland was available. The Swiss hydro power production is dependent on the change of inflow and thus considered potentially descriptive for the model. The hydro inflow was tested as a variable to drive the regime shift in the Markov models.

The German demand was tested as accountable for the regime shift in the Markov models with the same motivation as for the Finnish Estonian border data.

(43)

3.2

Modeling

This section describes the approach of using econometric models and cross validation to validate a forecasted cross-border flow between the selected borders.

3.2.1 Estimation step

The linear model described in 2.1 was used where the estimated βj was a result from

4 different modeling approaches: the OLS, the standard Tobit, the flexible Tobit and a Lasso regression.

The OLS is carried out in a straight forward manner in order to produce a forecast which the other models will be benchmarked towards.

The standard Tobit model uses the most frequently occurring NTC levels as bounds for upper and lower limits. Vectors of hourly NTC values are used for the flexible Tobit in order to take account for the changing NTC in time. A standard Tobit model is available as a Matlab package written by Hang Qian from the Iowa state university [40]. The flexible Tobit model was discussed with Hang Qian in order to extend the model to fit the purpose.

The Lasso regression is commonly used together with cross validation in order to see how the shrinking of the β is affecting the estimation and thus also the forecast. In this case an estimation is performed for each shrinking step in the Lasso regression. Second a mean absolute error (MAE) for the estimation is calculated. The number of shrinkage steps is set to 100 and therefore it results in 100 different sets of coefficients. In order to find the shrinkage parameter λ with the best fit and lowest MAE each shrinkage step is plotted in a graph. This makes the optimal solution regarding MAE appear as the minimum of the graph.

(44)

3.2.2 Variable selection

Z-test statistics and p-value from the students t-distribution with a critical value of 5 % was used in the variable selection. The algorithm of stepwise regression has been used in all estimations [32]. It is a useful way to rank independent variables with lacking significance to the model. The stepwise regression can be seen in the algorithm below:

1. All coefficients βj are set to zero.

2. Add the independent variable most correlated with y in the model. 3. Then calculate the residuals: R = yt− ˆyt

4. Add next independent variable that are second most correlated 5. Keep doing this until all independent variables are in the model

In addition to above the sign of the estimated coefficients should be intuitive. An example is that if the demand in Germany rises with one unit, this would imply an increase in import for the explained variable. The opposite yields for production. If Germany for example would increase the production the results would be increasing export. The variables that show counterintuitive sign has been removed and the above procedure of stepwise regression has been carried out again.

3.2.3 Cross validation

The training period of the cross validation is in this case dependent on the available and suitability of the data. In order to test and compare the Flexible Tobit model the NTC data is a necessity. The European transmission and energy system is going through changes and this makes older data not usable in means of estimation.

NTC data is only available for the German borders from October 2013 and forward. For the case of the Finnish - Estonian border the NTC is available from beginning of 2013 and forward. The training period should be selected on a complete year basis since it might be influenced by a yearly seasonality component.

For the two borders to Germany a training period of one year, 2014, is used. The available data for the Finnish Estonian border makes a training period of two years, 2013 and 2014, possible and is used in the cross validation.

(45)

case not be cross validated since it would require a data set from three years back. This would yield the possibility of one year as a training period and two years as a forecast period.

3.2.4 Error calculations and goodness of fit

This thesis uses several ways of measuring the goodness of fit of the model. The R2adjusted together with the lowest mean absolute error is mainly looked upon in the estimation step to evaluate the performance. Since the method is cross validation the forecast is plotted and compared to the actual outcome of the cross-border flow in order to visually see how the model catches different dynamic behaviors.

Another used measurement is the Pearson product-moment correlation coefficient which has been calculated for the training and forecast periods respectively. The Pearson product-moment correlation coefficient gives an indication regarding how the indepen-dent variables are consistently correlated to the depenindepen-dent variable in the training and forecast period. It could also in an ad-hoc manner be used as a tool for variable selection since it shows how the independent variables together explains the dependent variable. The AIC and BIC are used for a similar purpose. They are provided for the Markov models in order to choose between different variable selections among the independent variables. The best selection is where the AIC and BIC is chosen as low as possible compared to the other selection. The absolute value of the AIC and BIC is not of special interest since it only tells a relative goodness of fit.

3.2.5 Handling seasonality and trends

(46)

Figure 3.1: Time series suffering from a linear trend and a seasonality component

The first approach plots the Fourier transform of the data in order to visually see the frequency spectrum of the data. When knowing the sampled frequency (hourly) and size of the time series one can easily remove the yearly seasonality component by a low pass filter. Applying low pass filtering also naturally removes the linear trend since it can be seen as a zero frequency component in the time series. After removing the linear trend and applying filtering the time series passes the ADF-test

The second approach used in order to remove the yearly seasonality and linear trend is by regressing a constant, a sine and a cosine function with yearly period time (in terms of sample size in the data) towards the treated variable. This yields a result of how big influence the seasonal component has in terms of the regressed variables. By subtracting the regressed result regarding linear trend and seasonality the time series passes the ADF and PP-test.

Remark that both approaches only removes the linear trend and yearly seasonality com-ponent. This method was intended to keep the intra-yearly information (higher fre-quency behaviors) intact.

(47)

Figure 3.2: Time series suffering from a seasonality component

Figure 3.3: Time series where the seasonality component and the linear trend has been removed

(48)

the seasonality and trend the estimation step is carried out and later the forecast is produced.

Figure 3.4: Forecasting model

3.2.6 Multicollinearity

(49)

Results and discussion

This chapter starts with a generated data set to test how the models perform under the assumption of several censoring limits for the dependent variable. This is to be able to draw a conclusion regarding the flexible Tobit model under ideal conditions.

Each border is represented with results from the estimation and forecast step. The cross validated forecasts are presented with plots containing the actual outcome and a forecast. The results are discussed and in the end a general discussion regarding additional data and model improvement is provided. Finally a table of summarized statistics is also presented for each border in order to more easily compare the different results with each other.

4.1

The flexible Tobit model

Consider the following example: The data generation process is known and constructed as equation 4.1. In this case xt,1 is a vector of constants equal to 1 and xt,2 to xt,4

are vectors of random walks. Ci is a 1 × 4 vector of values Cj = (1 2 3 4). The

dependent variable ytis a time series variable with known generated censoring limits as

can be seen in figure4.1and u ∼ N (0, σ2). The first part of the time series is uncensored, the second part has a censoring limit of 0 and 4, the third part 1 and 9, the last part -1 and 2. The generated data with known censoring limits could be looked upon as a perfectly restricted cross-border flow with known limits.

yt= xtjCj + u j = 1, 2, 3, 4 (4.1)

(50)

Three multiple linear models as in 4.2are estimated: the OLS, the standard Tobit and the flexible Tobit model.

yt= xtjβj+ u j = 1, 2, 3, 4 (4.2)

Figure 4.1: Time Series of cross-border flow with several censoring limits

The resulting coefficients βj for each model can be seen in Table 4.1

Independent variable Flexible Tobit Standard Tobit OLS

β1 1.0679 1.8122 2.4723

β2 1.9782 0.9455 0.5849

β3 2.9250 1.3152 1.2312

β4 3.9205 2.2402 2.3785

Table 4.1: Resulting coefficients from the estimation of the generated data for each model

(51)

4.2

The EE-FI cross-border flow

Here follows the results from the estimation of the Estonian-Finnish cross-border flow. First the OLS, standard Tobit and flexible Tobit models were estimated and the results are discussed. The best performing of these models were used in the estimation step in the Markov models. In each Markov model different regime shifting variables was tested. For this border demand, wind power production and NTC levels were used in order to explain regime shifting for the dependent variable. The results from the Markov models are discussed. Finally the VIF were calculated and the Lasso regression were estimated in order to evaluate the influence of multicollinearity in the dataset. Results from each estimation method is presented with error calculations for the training and forecast period. The true outcome of the cross-border flow is presented together with a produced forecast for each estimation method.

4.2.1 Results and comparison between the OLS, standard Tobit and flexible Tobit

The results from the OLS, standard Tobit and flexible Tobit is presented together with a discussion.

4.2.1.1 OLS

Following are the results from the OLS estimation and forecast.

Period MAE MSE RMSE MAPE R2adjusted R2p Training 175.8157 50177 224.0030 1.5253 0.1841 0.1891 Forecast 391.5303 20485 452.6069 53.0030 - 0.2580

Table 4.2: Goodness of fit and forecast error for the OLS estimation Independent variable Estimator Standard Error p-value Constant 340.8866 35.8339 0.0001 Cosine 152.7851 6.0615 0.0020 Demand FI -0.0337 0.0047 0.0010 Demand EE 0.2119 0.0282 0 Wind production EE -0.5955 0.0447 0 Nuclear production FI 0.0850 0.0100 0

(52)

Figure 4.2: Forecast using the OLS estimation

4.2.1.2 Standard Tobit

Following are the results from the standard Tobit estimation and forecast. Period MAE MSE RMSE MAPE R2adjusted Rp2 Training 172.5998 48309 219.7927 1.5145 0.2145 0.1891 Forecast 384.7478 201970 449.4102 52.2905 - 0.2580

Table 4.4: Goodness of fit and forecast error for the standard Tobit estimation Independent variable Estimator Standard Error Z-stat

Constant 399.1752 2.4702 161.5949 Cosine 142.2092 3.3752 42.1333 Demand FI -0.1092 0.0051 -21.4020 Demand EE 0.5160 0.0310 16.6584 Wind production EE -0.5816 0.0436 -13.3239 Nuclear production FI 0.0408 0.0095 4.2965

(53)

Figure 4.3: Forecast using the standard Tobit estimation

4.2.1.3 Flexible Tobit

Following are the results from the flexible Tobit estimation and forecast. Period MAE MSE RMSE MAPE R2adjusted Rp2 Training 172.7421 48521 220.2754 1.5640 0.2111 0.1891 Forecast 373.5743 191850 438.0029 51.0089 - 0.2580

Table 4.6: Goodness of fit and forecast error for the flexible Tobit estimation Independent variable Estimator Standard Error Z-stat Constant 412.0874 2.5375 162.4021 Cosine 141.1394 3.5870 39.3478 Demand FI -0.1157 0.0057 -20.2625 Demand EE 0.5528 0.0321 17.2031 Wind production EE -0.6287 0.0477 -13.1750 Nuclear production FI 0.0657 0.0108 6.0824

(54)

Figure 4.4: Forecast using the flexible Tobit estimation

The OLS estimation resulted in a less volatile forecast when comparing Figure4.2to the standard Tobit and flexible tobit in Figure 4.3 and Figure 4.4 respectively. The Table of coefficients shows signifficant results for all independent variables and consistancy regarding the signs of the coefficients in Table 4.2, 4.4 and 4.6. The standard errors decreased when using the Tobit models compared to the OLS. If looked upon lowest MAE the flexible Tobit model had the best fit as can be seen in Table4.15. The R2p was slightly higher in the forecast period than in the training period. This means that the set of independent variables was better correlated with the dependent variable in the forecast period than in the training period.

4.2.2 Results and comparison of the Markov models

The results from the different Markov models are presented together with a discussion.

4.2.2.1 Markov regime shifting flexible Tobit

(55)

estimated coefficients.

Case 1: The Markov regime shifting model using a dummy for maximum and minimum NTC levels as state variables.

Period MAE MSE RMSE MAPE R2adjusted AIC BIC Training 178.17 52131 228.32 34 0.3436 235925 236034 Forecast 215.599 65876 256.66 38 - -

-Table 4.8: Goodness of fit and forecast error for case 1 of the Markov regime shifting model

Figure 4.5: Forecast for case 1 of the Markov regime shifting model Variable Estimator(s) p-value (s)

References

Related documents

Om man anlägger ett gramscianskt perspektiv på de offentligheter som skapas genom och för folkbildning skulle man kunna tänka sig att grupper här kan skapa ett forum för lärande

Properly choosen penalty parameters for a SBP numerical scheme leads to strict stability, meaning that the discrete model dissipates energy slighly faster than the continuous

The SAC held that the principles on cross-border group consolidation stemming from Marks &amp; Spencer could not be extended to cover situations where

The aim of the article is to highlight the importance of adopting a bottom-up cross-border planning perspective that is based on the perceptions of the border region residents

Together with the Council of the European Union (not to be confused with the EC) and the EP, it exercises the legislative function of the EU. The COM is the institution in charge

technological advances; it is likely that these have had an impact on the behavior of banks too. The new bank merging and bank acquisition activities have brought a lot of attention

The reasons behind this result of intraday reductions in price volatility are, according to Mauritzen (2010), due to the supply shift caused by the low marginal cost of

As can be figured out from the histogram the values are not that dispersed. It is only one value a distant and therefore increasing the range figure, this is the