Hi.
I am looking at the correlation between the spot price and price of futures contracts bought 1-, 2- and 3 years in advance, for power.
I have this dataset in a long format, where I use DeliveryYear as the panel variable, and YearsSinceBuy as the time variable, where as you see indicated by the dummy variable, YearsSinceBuy == 0 is Spot price.
The idea is to find out how good a predictor the futures prices are when compared to the achieved spot price for their respective delivery year.
I am not too familiar with panel data or Stata, and I am therefore wondering if anyone could help me with finding simple ways of testing this.
I should mention also, that the spot price for 2022 was abnormally high, is there any way to control for extremes like this or would it be better to omit that year?
What do you think of doing xtreg AvgPrice Spot and using test Spot afterwards?
I am looking at the correlation between the spot price and price of futures contracts bought 1-, 2- and 3 years in advance, for power.
I have this dataset in a long format, where I use DeliveryYear as the panel variable, and YearsSinceBuy as the time variable, where as you see indicated by the dummy variable, YearsSinceBuy == 0 is Spot price.
The idea is to find out how good a predictor the futures prices are when compared to the achieved spot price for their respective delivery year.
I am not too familiar with panel data or Stata, and I am therefore wondering if anyone could help me with finding simple ways of testing this.
I should mention also, that the spot price for 2022 was abnormally high, is there any way to control for extremes like this or would it be better to omit that year?
What do you think of doing xtreg AvgPrice Spot and using test Spot afterwards?
Code:
* Example generated by -dataex-. For more info, type help dataex clear input int DeliveryYear byte YearsSinceBuy double AvgPrice byte Spot 2012 0 31.197706284152982 1 2012 1 46.745378486055806 0 2012 2 42.54924603174602 0 2012 3 40.13875 0 2013 0 38.10402027397258 1 2013 1 38.534016064257024 0 2013 2 46.045296442687736 0 2013 3 43.40555555555555 0 end label values Spot Spot label def Spot 0 "Termin", modify label def Spot 1 "Spot", modify
Comment