Macro Q Paper

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Vicente David Capriles Barraza.

Different ways of Modeling electricity prices, forecasting, and


VAR analysis.

Abstract

This paper addresses how to do different electricity price models to see which one performs
better in forecasting. To do so, first will be estimated as an ARDL and corrected by
Heteroskedasticity of GARCH type; later, it will be compared with TAR or STAR Model.

The forecasting comparation will be measured in the test of Diebold and Mariano, and finally,
add some conclusions with the VAR Model and the impulse response model.

This paper is based on the article “The impact of phase II of the EU ETS on the electricity-
generation sector Ibrahim AHAMADA, Djamel Kirat 2012.07 Maison.”

Introduction

This paper is about the change in the price of electricity and compares models in forecasting. I
took from FRED data of the United States price of electricity, Gas, Coal, and Temperature. The
data start in 1991 February and ends in November 2021.

The idea is to find which methodology adapts better for the data generating process. For that, I
will break the sample into two parts, 250 observations (2/3 of the total) to estimate the
models and 120 observations (1/3 of the total) to do forecasting and write some conclusions
based on the test of Diebold and Mariano, and complete the analysis with the impulse
response model.

Variables:

Melec: Price of 1 Megawatt of electricity

GAS: Price of 1 gallon of gas.

Coal: Price of 1 ton of coal.

Temperature: the average temperature of the cities of the United States.

D: Indicate the First difference of the variable.

Note: To simplify, the analysis of all variables has been seasonally adjusted.

This analysis examines whether the variables are I(0) or I(1). To do that, it is necessary to look
at the graph to have a first impression.
These graphs show how these variables are not I
(0) but are necessary to do a formal Unit root test.

Note: Unit Root test can be with a break or not;


for this analysis, to make it more consistent, I will
limit the number of breaks to the minimum.

The variable of interest in this paper is Melec


(Price of the electricity Megawatt), following the formal methodology to do a regular Unit Root
test.

First, The analysis starts going from general to specific, comparing I (1) vs. I (0); the hypothesis
is H0: Has a Unit Root, H1: False H0.

Test unit root in Melec, Trend, and intercept, intercept


There is not enough evidence to reject the null hypothesis; I am in favor of believing this is an
I(1) process.

None; Not reject Ho, so there is a unit root. There is no I(0). I(1) test

Later, in Testing for I (1) vs. I (2), since the Null Hypothesis is rejected, there is enough
evidence to believe that this variable is an I(1) process.

Note: This process was repeated for the coal and gas variables, with the same result.

Now, all variables are stationary, at least in the mean, so it is possible to start working with
them to see which model performs better.

The first option is to model this in the first difference with the ARDL model and, if applied as
GARCH and compared with TAR STAR models.

ARDL (1,2): Most models follow a linear process


without any complication, but some of them
also have a non-linear part that could be
significant. To check it, there are many tests
available, the Lagrange multiplayer test or the
Wald test, among others; this analysis uses the
Wald test.
The Wald test shows H0: the model is linear, H1: False H0.

The null hypothesis is rejected; there is enough evidence to believe that the model has a non–
linear part.

The ARDL by construction is Serial correlation proof (if there is serial correlation just adding
more lags of the variables, the serial correlation is over). Still, it is necessary to check the
Heteroscedasticity because if it has the arch type, even if it also has white, the correction must
be in the ARCH senses.

Testing for Heteroscedasticity GARCH

H0: No Heteroscedasticity.

H1: Heteroscedasticity

The test shows that 0.0447 < 0.05 then H0. This
is rejected; there is enough evidence to believe
that the model has Heteroscedasticity of the
garch type.
The model has to be modeled in Garch because of the Heteroscedasticity type.

This EGARCH Model has non–linear parts and a GARCH in mean significant at 5%, confirming
that the variance and the mean can be estimated jointly.

This is a valid model if the residuals are white noise and the correlation of the squares are also
white noise, and there is no more Heteroscedasticity of the garch type.

EGARCH Correlogram of the residuals

Both residuals average and the squares are white noise, and the garch Heteroscedasticity is
solved. They prove this model is excellent and functional, ready to be compared with the STAR
Model.
Modeling as TAR or STAR Model

There is the possibility that the Model is an I(0) with breaks. If this is the case is possible to
work in levels, so that is mandatory to run the Unit Root test with breaks.

H0: there is a unit root

H1: There is not a Unit root.


There is not enough evidence to believe that H0
should be rejected, so there is a unit root even with
breaks.

Once again, this model is going to be in first


difference.

The best STAR model was compared with the best TAR model to see which is better and
choose the one that would compete with the EGARCH ARDL model.

STAR MODEL

This model is performing well. The lags are


significant, and the interactive effect is too;
the slope is not significant and the threshold
either.

It is worth looking at the Escribano and Jorda


test to see if the model should be estimated
with a logistical or exponential function.
The Escribano – Jorda test shows that
both are significant, but the logistic one
is more significant; that is the one I am
selecting.

Prices are too volatile, and even more in monthly data; it makes sense to think that the TAR
Model will be a better approximation than the Smooth transition model.

Even though this model will be valid if the residuals are white noise
and there is no heteroscedasticity.

The residuals, the residuals^2 are white noise, there is no autocorrelation and there is no heteroscedasticity, meaning this is a
valid model.
TAR Model

This model has three regimes the first one with 42


observations, the second one with 50 observations,
and the last one with 27 observations.

The multiple breaks are not something desirable in


the analysis, but this is the best model; the R^2 =
0.495, and the adjusted R^2 is 0.3859, which is
higher in comparison with the STAR Model and the
Akaike criteria are lower (-11.29) vs. (-11,12) in the
STAR Model, meaning this model is better.

To understand if the thresholds are significant is worth comparing the values with the Bai –
Peron critical value, 162 > 23.7; 25,77 > 25.75;
153.41 > 26.81, meaning there are three breaks to
consider in this analysis.

These breaks most likely will be correlated with the


California Blackouts during the 90´and early 2000.´

In the 90´the market got deregulated, which caused


an impact on the prices going up and a big crisis for
most electric utility companies facing serious
trouble in their finances at the time.

This is a valid model if the Residuals are white noise and the square residuals and there is no
correlation or heteroscedasticity.
Correlograms of the residuals are white noise. Correlogram of the Residuls^2 are white noise.

There is enough evidence to believe that there is enough evidence to support


there is no heteroscedasticity that there is no Serial correlation in this model.

This final section of the TAR vs. STAR model is to choose a winner to compete against the ARDL
EARCH Model.

The winner model is TAR allowing for multiples breaks for good economic reasons. The
California blackouts allow for those breaks, the R^2 is higher, and the Akaike criteria are lower.
Forecasting

The best model should forecast better; for that, I will compare Root Mean Squared Error to
have an idea and then do the Diebold Mariano test to see if there is any difference in the
forecasting.

TAR

The Tar model has an RMSE of 0.011598

EGARCH ARDL Model

This model has an RMSE of 0.001518.

In the first look, it seems like the EGARH model performs better, but there is not enough
evidence for this claim to prove this is necessary for the Diebold Mariano test.
Diebold and Mariano Test

This test is about creating a model. With the idea of forecasting the data, doing this is possible
to capture the prediction error in the time series. This allows us to do it with two models and
compare this square error. H0: Both models predict the same. H1: False H0.

To complete the test, I created the series TDM (Diebold Mariano test), which is
TDM = (errorGARCH)^2 – (Error Tar)^2.

Now regress this series against a constant to see the mean, and if this is not significant, both
models have the same ability to predict.

P-value > 0.05% both models have the


same ability to predict in mean.

VAR(2) with the Dmelec variable to complete this analysis to see how long the effect is in the
impulse response model.

VAR(2)
This model used stationary series, so shocks can not be I (1) (permanent) by construction.

When Dmelec is shocked by himself, it takes around two periods to adapt.

When Dmelec is shocked by Dgas, it takes around 0.2 periods to adapt.

When Dmelec is shocked by Dcoal, it takes around 3.5 periods to adapt.

When Dgas is shocked by himself, it takes around five periods to adapt.

When Dcoal is shocked by himself, it takes around four periods to adapt.

This shows these variables are relevant and have an impact on each other.

You might also like