# predict future price

Show 40 post(s) from this thread on one page
Page 1 of 2 12 Last
• Jul 28th 2009, 02:53 AM
isaacm1
predict future price
Hello,
I need to get a prediction for 4 days ahead for an item price, I have only the last 10 days prices history of that item.

what would be the equation to solve this ?

Thanks
• Jul 28th 2009, 03:52 AM
pickslides
There are many different ways to predict the next 4 values. It can be dependant on many things, what were the previous 10 values you have?
• Jul 28th 2009, 05:03 AM
isaacm1
11.4124 , 11.4196 , 11.4289 , 11.4127, 11.4076 , 11.3988 , 11.3821 ,11.3798 , 11.3926 ,11.4025

of course most accurate method will be better but please post two if possible

Thanks
• Jul 28th 2009, 01:16 PM
isaacm1
• Jul 28th 2009, 02:12 PM
pickslides
Be patient my friend, they are many posters from all different corners of the world on this forum so everyone is on a different time zone, since my last post I have enjoyed some very deep sleep, 8 of the best you could say.

Looking at your data and considering it is daily I would suggest the next 4 values could be decreasing. There seems to be a peak at the 3rd value and then after the 8th value it increases again. 10 values is a very small set to make a prediction on. There seem to be 2 weekly increases after values 1,2,8 & 9. These could very well be weekends.

• Jul 28th 2009, 03:09 PM
isaacm1
sorry, the numbers are prices, it is a challenge question from someone nothing more

any reasonable prediction will do

Thanks
• Jul 28th 2009, 03:19 PM
pickslides
Quote:

Originally Posted by isaacm1
any reasonable prediction will do

11.4124
11.4196
11.4289
11.4127
11.4076
11.3988
11.3821
11.3798
11.3926
11.4025
11.38289
11.37689
11.37237
11.37138
• Jul 28th 2009, 04:17 PM
isaacm1
thanks but I need equation , he also mention to use the average of all 10 days , does that help ?
• Jul 28th 2009, 05:54 PM
pickslides

11.4124
11.4196
11.4289
11.4127
11.4076
11.3988
11.3821
11.3798
11.3926
11.4025

you could use a linear least squares regression, there are many options. This would give the equation $y = -0.0038x+11.425$
• Jul 29th 2009, 12:29 AM
isaacm1
Thanks, where x is the number of future days ?
• Jul 29th 2009, 01:51 PM
pickslides
yep, x=11,12,13,14 for the next 4 values. This result is linear and will tend to zero as $x \rightarrow \infty$
• Jul 29th 2009, 02:06 PM
isaacm1
Many Thanks,

one question please how you get the -0.0038 value ?
• Jul 29th 2009, 02:25 PM
pickslides
It is the gradient for y=bx+a from the least squares regression. It is a long a boring explantion but if you really want to know check out

Least-Squares Line
• Jul 29th 2009, 02:50 PM
isaacm1
if my numbers changed I need to know how to get the "b" value (-0.0038)
• Jul 29th 2009, 02:58 PM
pickslides
Quote:

Originally Posted by pickslides

How to find 'b' is in this link my firend. (Rofl)
Show 40 post(s) from this thread on one page
Page 1 of 2 12 Last