View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vezerid vezerid is offline
external usenet poster
 
Posts: 751
Default Forecast and Trends

Hi,

If your data is cyclical then you are probably best of to use a
sinusoidal function. If there is an overall upward trend from period to
period you might want to add a linear function. Thus I would recommend
a function like:

f(t) = at + b + c*sin(dt+e)

Problem is the built-in functions for regression in Excel do not
support such functions so you will need the Solver to perform the least
squares method. For this you would need the column representing time to
have numeric values or else you should provide an auxiliary column with
consecutive numeric values (better off with 0, 1, ...). Say this is in
column A:A starting from A2.

You will need five cells for the five constants a-e. Say these are in
F2:J2.

Next to your dependent variable, say in D2, enter and copy down the
formula:

=$F$2*A2+$G$2+$H$2*SIN($I$2*A2+$J$2)

Next to it, in E2, enter the square difference of the dependent
(assumed in column C:C) from the forecasted:

=(D2-C2)^2

Take the sum of column E:E and ask SOlver to minimize it by changing
F2:J2. As this is a nonlinear problem and the built-in solver is not
very industrial strength, your initial values in F2:J2 will have to be
relatively close to the values you expect.

Write back if you need further assistance.

HTH
Kostis Vezerides