0

I am trying to forecast commodity price fluctuations in a small dataset. The data I am using is here .

  • Does my data have seasonality and Trend? Can someone explain me how to decide that?
  • If my data does not have any proper trend or seasonality, I think the best way is to use Cointegration method to predict fluctuations together(A drunk and her dog)
  • Is there any other way I can make reasonable forecast or is this data forecastable?

The price drop in 2008 is due to the Global Energy Crisis (Wikipedia)

Also please refer to my old question .Thanks to all the people who explained me in detail!

enter image description here enter image description here

To predict Cointegration using ADF, I put together the below R function

    cointegration<-function(x,y)        
{       
    m<-lm(x~y+0,data=gl.full)   
    beta <- coef(m)[1]  
    sprd <- x - beta*y  
    ht<-adf.test(sprd,alternative="stationary",k=0) 
    if (ht$p.value < 0.05)  
  {
    cat(paste("P Value:", ht$p.value,"The spread is likely mean-reverting(Co-integrated).\n"))  
  } else 
  {
  cat(paste("P Value:", ht$p.value,"The spread is not mean-reverting(Not Co-integrated).\n"))  
        }

}       

And I call it like this cointegration(gl.full$base.oil,gl.full$hr.coil)

Please let me know if I am in the right track.

  • 1
    It is unlikely that commodity prices have trends except for perhaps inflation effects. Commodity prices measured in dollars may vary due to relative strength of dollar (think especially about oil). I do not think commodity prices are forecastable; all the simple patterns must have already been exploited by thousands of traders (otherwise there would be free lunch, which is very unlikely). Consult theory for whether there could be seasonality in particular commodity prices. For curiosity, try `stl` function for obtaining a seasonal component but be careful not to overinterpret the findings. – Richard Hardy Mar 06 '15 at 21:00
  • 1
    Cointegration may make sense for certain groups of commodities that are complements, substitutes or by-products to each other; consult economic theory. Cointegration can be modelled using Johansen procedure or Engle-Granger two-step procedure (the latter only for pairs of time series). See `vars` package and vignette in `R` for the former. See `egcm` package for the latter. – Richard Hardy Mar 06 '15 at 21:04

0 Answers0