# modelling known regime shifts

I wish to model a price time series with a known regime shift: electricity price before during and after the introduction of a carbon price. The time series looks like this:

you can see the jump in price between 2012 and 2014. This paper states that

"when the sample regimes are known. If the first regime includes the first $$i_0$$ observations of $$P$$ total observations, and the structural change is confined to the first $$k$$ parameters, $$\beta_j$$ , $$j = 1 \dots k$$, of $$K$$ total parameters, we can define a dichotomous variable $$D$$ such that

$$$$\quad D = \begin{cases} 0 \quad \text{ if } \ i = 1, \dots, i_0 \\ 1 \quad \text{ if } \ i = i_0 + 1, \dots, P\end{cases}$$$$

Our model is then

$$$$\quad y_i = \sum_{j=1}^{K} \ x_{ij} \beta_j + \sum_{j=1}^k \ (x_{ij} D_i) \gamma_j + e_i$$$$

where the change in the structural parameter associated with the $$x$$’s in the second regime is represented by the $$\gamma_j.$$"

I have tried to run this model in the following form

$$$$\quad D = \begin{cases} 0 \quad \text{ if } \ i = 1, \dots, i_0, i_1 + 1, \dots, P \\ 1 \quad \text{ if } \ i = i_0 + 1, \dots, i_1\end{cases}$$$$

$$$$\quad y_i = x_i \beta + (x_i D_i) \gamma + e_i$$$$

where the $$y$$'s are electricity price in AUD/MWh, and the $$x$$'s are carbon price in AUD/tonne CO2. This model results in the following residuals

I have also attempted to run a simple model with the dichotomous variable $$D$$

$$$$\quad y_i = D_i \gamma + e_i$$$$

which produces the following residuals

Neither model seems to completely account for the increase in electricity price due to the carbon price regime. I am wondering why this is? Am I using the models correctly?

I am also a bit unclear as to how each model accounts for the regime switch and how they differ. Any insight is appreciated.