Value Series

Value Series
Value Series
How can I use time series data to forecast a future value?

I know how to do it in Excel, but I want to be able to compute on paper. I have 4-15 samples taken at a regular interval. I'd like to be able to forecast when the future sample value will reach a given value (how many more samples until we reach N?), and also forecast the value at a specified date (at T+30 what will the value be?)

Thanks

There r many types of models. AR, MA, ARMA, ARIMA, ARCH, GARCH, and lots of other which names I cannot recall. For the prediction to be of any use, the correct model must be used.

Assume u have decided which model to use, u now need to estimate the parameters. The idea is simply to choose the parameter to produce the smallest possible deviation of the model and the data.

You said u used Excel. so, i guess the method u used is simply trial and error. u try a range of values for the parameters and then pick the best one.

You want to do it by hand. This is extremely tedious. One way to do it is simply to do the thousands of calculations by hand and compare. Another way to do it is by taking derivatives.

The idea is simple. u have a model with certain parameter. Say, X(t+1)=aX(t)+et is your model where e is the random component with E(e)=0. So, your forecast of X(t+1) given information up to time t is X(t+1, forecast)=aX(t). The error of your forecast is know when at time t+1 when X(t+1) happens. So, the forecast error is X(t+1, real)-X(t+1, forecast)=(aX(t)+et) - aX(t) = et

You do this for a few t's and u collect a bunch of et's for these t's. You then square the et's and sum them and call it S.

St=(e1)^2 +(e2)^2 +e3)^2 +....+(et)^2
=(X(1)-aX(0))^2 +(X(2)-aX(1))^2+.....

(squaring them is simply to remove the sign of the et's. There r other ways, for example, |et|). You want to pick an 'a' that minimise S. To get this a, take the first derivative of S wrt a and equate it to 0.

dS/da = 0

Solve the equation to find possible values of a.

Take the second derivative of S,

d(dS/da)/da. Substitute possible values of 'a' into it. Those 'a' that make d(dS/da)/da<0 is the local point of maximum. To get the largest maximum, simply substitute these a into St to to find the one that gives the lowest St. This will be your best estimate of parameter.

However, when u have more than 1 parameter, thing can get complicated. u would have more than 1 equation to solve and sometimes, u need to use numerical methods to solve them.... which will require the use od Excel again!

As for forecasting... it depends on what model u r using. Generally, for those values u have not observe, u simply use the forecast.

Say, you have a model that uses t-1, t-2 and t-3 to forecast t.... the history for past 3 periods. So, at time t, if u want to forecast X(t+1), u simply pluck in the observed X(t), X(t-1) and X(t-2): {Forecast of X(t+1) at time t }=F{X(t), X(t-1), X(t-2)}...where F denotes a function.

Similarly, if u want to forecast X(t+3) at time t, u have {Forecast of X(t+3) at time t} = F{X(t+2,forecast), X(t+1, forecast), X(t)}. Or u want to forecast, say, t+100, {Forecast of X(t+100) at time t} = F{X(t+99,forecast), X(t+98, forecast), X(t+97, forecast)}. Hope u know what I mean.

The difference between a forecast X(t, forecast) and a realisation in the real world X(t) is the random conponent. Without much information, all I can do is to use my best knowledge(the parameter and correct model) to forecast ahead. But as time goes by and i gather more data, I'll reset and improve my prediction everytimes I get more info. So, to predict how long u will need for the process to reach a certain level, u simply use the model(the formula), substitute the X(t) with data u observed(if it's observed already) and forecasted(if has not happened). Let the model evolve until it reach your required level, N. Then look at what the t is.. then this is the best estimate of how long it takes.

If u make assumption about the distribution(s) of et's, the random conponent, u can even predict probabilities of the accuracy of your predictions. And also, the estimated parameters has uncertainty in them too, and taking these into account, u can calculate the probability of your forecast being right, allowing for the random fluctuation et and sampling error of estimating parameters.

btw, time series analysis is about regression. Regression of data at different point in times instead of regression of different sets of data.

eBay Logo  

GeIL Value Series 1GB (2 x 512MB) 240-Pin DDR2 800 (PC2 6400) Desktop Memory Rl3


GeIL Value Series 1GB (2 x 512MB) 240-Pin DDR2 800 (PC2 6400) Desktop Memory Rl3


$3.99


OCZ DDR2 PC2-6400 Value Series 2GB Edition


OCZ DDR2 PC2-6400 Value Series 2GB Edition


$5.99


Rosewill 300 Watt Power Supply Value Series RV300


Rosewill 300 Watt Power Supply Value Series RV300


$24.99


OCZ Value Series 1GB 184-Pin DDR SDRAM DDR 400 PC3200 Desktop (OCZ4001024V3)


OCZ Value Series 1GB 184-Pin DDR SDRAM DDR 400 PC3200 Desktop (OCZ4001024V3)


$12.00


G.SKILL Value Series 8GB (2x4GB) SDRAM DDR3-1333 (PC3-10666) Desktop Memory NEW!


G.SKILL Value Series 8GB (2x4GB) SDRAM DDR3-1333 (PC3-10666) Desktop Memory NEW!


$99.99


OCZ VALUE SERIES PC3200 Memory 1GB


OCZ VALUE SERIES PC3200 Memory 1GB


$18.00


Startech Serial ATA Drive Drawer w/Shock Absorbers - Value Series - Storage Bay


Startech Serial ATA Drive Drawer w/Shock Absorbers - Value Series - Storage Bay


$28.39


OCZ OCZ4002048V3DC-K DDR 400 PC-3200 Value Series 2G (2X1Gb) Dual Channel Kit


OCZ OCZ4002048V3DC-K DDR 400 PC-3200 Value Series 2G (2X1Gb) Dual Channel Kit


$29.99


OCZ Technology DDR3 PC3-8500 Value Series 1 GB SODIMM PC Memory OCZ3M10661G NEW


OCZ Technology DDR3 PC3-8500 Value Series 1 GB SODIMM PC Memory OCZ3M10661G NEW


$9.99


1GB Memory RAM Gateway 500 Series 510S Value / 510S Hom


1GB Memory RAM Gateway 500 Series 510S Value / 510S Hom


$21.90


A.RAM Value Series Dimm 100% Tested 2GB


A.RAM Value Series Dimm 100% Tested 2GB


$48.86




Thanks for visiting!

Mike posted at 2006-5-3 Category: Computer Components