# VAR model for price forecasting in multiple time-series context. How to get “real figures” as forecasts?

Sorry for the rather long introduction, but since I was (legitimately) critizised for not explaining my cause and questions enough, I will do so now.

I would like to conduct a (price)-forecast based on a multiple time series VAR-Model (vector autoregressive Model) with multiple endogeneous variables and two exogeneous. Since I am not that skillfull with regards to neither statistics nor R I want to keep is as simple as possible (Trend forecast for 3 months is sufficient).

I am using the "vars" - Package, http://cran.r-project.org/web/packages/vars/vars.pdf and all in all those four functions: decompose(), VARselect(), VAR(), and predict()

I have 1 dependent time series (y, in my model referred to as "RH", or "raRH"), 4-5 endogeneous predictors and 2 exogeneous predictors. All timeseries have a length of 1-91 observations and are monthly data without any gaps.

Data description: My y (dependent var) are sawlog prices, sawlogs are raw material for plenty of follow up products.
My endogeneous (since they all kind of correlate with each other and y) are follow up product-prices or further elaborated sawlogs.
My 2 exogeneous predictors are economic indicators similar to BIP etc.

All the time series are non-stationary, since I have read that you should use stationary data in order to gain a valid VAR-Model, I used the decompose() - function in R to split each variable into trend, season and the randwom walk.

 raKVH<-decompose(KVH)$random raKVH<-na.omit(raKVH) raSNS<-decompose(SNP_S)$random
raSNS<-na.omit(raSNS)


... and so on for every variable.

What I'm interested now in order to do some forecasting are predictions of the randwom walk (right?!). Anyways, I found out that all my data is first-order-integrated, since taking the logarithm makes them all stationary timeseries (ts), tested via Dickey-Fuller-Test.

The picture also provides data example, first picture shows the raw-data,

second picture the random walks gained by decomposing\$random the raw-data.

I used the command VARselect that automatically computes the optimal lag for my model, whereas tsall is my time-series matrix containing all the timeseries mentioned above.

VARselect(tsall)


proceeding now with the estimation of the model VAR(p=number of lags given by VARselect), I encountered the following problem: how should I use the attribute "type" within the VAR-function? What does "trend","none", "const", "both" exactly mean? Since I have stationary data, there won't be any trend right? How can I check if there is a constant? Since the default value is "const", I chose to go with that.

The main question I have is the following:
How do I get "real" forecasts out of the prediction of the randwom walks anyways? If I want to predict the price of yt+3, I need more than the prediction of the random walks here, I need "real figures" like in graphic 1. How can I "add back" trend and season?

Third picture shows the Forecast of the random walk of my "target Variable" Y, but what's the next step here?

Thank you for any help, if my questions/introduction are insufficient, please let me know. I'll try to explain myself better then.