1
$\begingroup$

I'm a bit at loss after trying to find papers regarding tail risk for electricity markets. There doesn't appear to be a whole lot of literature (or perhaps I haven't managed to find it) regarding modelling VaR/ES for price processes that can turn negative.

A few I have found mentions that they do ARMA-GARCH models - but how is that possible? Usually you'd want log returns to obtain stationarity but that is an impossibility with the prices turning negative. So do you simply use the simple returns instead and just live with the level-dependent nature of it? Some papers state that they just remove the negative prices, but at least in Europe, as of late, that would be throwing away a ton of data.

So, are there other and better ways to model it?

$\endgroup$
0

1 Answer 1

1
$\begingroup$

Suppose you have a series of historical prices $P_t$, indexed by time, and the current price $P_\mathrm{now}$, and we want to see what the price would become if the price now had changed similarly to how it changed for each observation the past. To get basic historical VaR/ES, you rank the P&L's from all these simulated prices, and read off the VaR or the ES. I'm not sure if more complicated statistics would still work with the hacks below.

But what does "similar" mean? For example, if the price is 10 today, and a few months ago the price changed from 2 to 4, does "similar" mean that the price would increase by 2 or that it would doubled?

To implment the former, we simply define the price difference $D_t=P_t- P_{t-1}$ and we simulate $P_\mathrm{new}=P_\mathrm{now}+D_t$. For example, if the price is 3 now, and if the price fell from 14 to 10 in the past, then the simulated price would be $P_\mathrm{new}=3+10-14=-1$. This methodology surely supports negative and zero prices, but is probably not quite what most people want.

For the other methodology, we assume that prices are non-zero, and define percentage change $R_t=\frac{P_t}{P_{t-1}}-1$, and simulate, $P_\mathrm{new}=P_\mathrm{now}\times(R_t+1)=P_\mathrm{now}+P_\mathrm{now}\times R_t=P_\mathrm{now}\times\frac{P_t}{P_{t-1}}$.

Note that in order not to divide by 0, we need to assume only that price are non-zero, i.e. that you still cannot give or receive the asset for free, but it is not a problem if sometimes, instead of getting paid, you have to pay someone to take the asset off of your hands. If the price flips sign, then the ratio $\frac{P_t}{P_{t-1}}<0$, but it's OK. For example, suppose that the price now is 10, and we're trying to simulate a day when it flipped from 1 to -5. Then $R_t=\frac{-5}{1}-1=-6$, in other words, the price dropped 600%, and we simulate $P_\mathrm{new}=10\times (-6+1) = 10\times -5 = -500$, a "similar" change.

Instead of percentage changes, you can also take logs of the ratios: define $L_t=\log\left(\frac{P_t}{P_{t-1}}\right)$ and simulate $P_\mathrm{new}=P_\mathrm{now}\times \exp(L_t)$. If the ratio $\frac{P_t}{P_{t-1}}<0$, the log of a negative number is a complex number: for $l<0$, $\log(l)=\log(-l)\pm i \pi$. $P_\mathrm{new}$ flips the sign from $P_\mathrm{now}$ whenever $P_t$ flips the sign from $P_{t-1}$. Hopefully your implementations of $\log$ and $\exp$ can take care of this "plumbing" automatically, but otherwise the following pseudocode shows how you can program around $\log$ not accepting negative inputs, for example, by storing a boolean flag indicating that the price sign has flipped in a separate array signFlip.

if ((ratio[t] = price[t] / price[t-1] < 0)
  signFlip[t] = -1
  ratio[t] = -ratio[t] // render the ratio positive
 else
  signFlip[t] = 1
L[t] = log(ratio[t])
...
PriceNew = PriceNow * exp(L[t]) * signFlip[t]

Mathematically, we've used the complex log of the negative ratio, but log/exp don't know this.

Note that you can combine the $R$'s from days $i$ and $j$ as $R_{ij}=(R_i+1)\times(R_j+1)-1$, whereas the logs are additive: $L_{ij}=L_i+L_j$, $\mathrm{signFlip}_{ij}=\mathrm{signFlip}_i \times \mathrm{signFlip}_j$. You can use combinations of 2 or more price moves to make up more historical scenarios.

$\endgroup$
2
  • $\begingroup$ Hi Dimitri and thanks for your response. So to boil it down, you suggest to support complex numbers in the log transformation and fitting GARCH models on that? $\endgroup$
    – Alex
    Oct 10, 2023 at 7:42
  • $\begingroup$ @Alex mathematically, you use a complex log of a negative price ratio. I'll edit my answer to illustrate how you can program around log and exp not supporting negative numbers. I was thinking of basic historical VaR/ES. I'm not sure whether more compicated calculations would still work. $\endgroup$ Oct 10, 2023 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.