0

I need to predict the future values based on given set of data. I found in the following link a method of obtaining trend line moving average.

http://www.highcharts.com/plugin-registry/single/16/technical-indicators

jsfiddle is here http://jsfiddle.net/laff/WaEBc/ But my requirement is based on this Moving average to predict the future values.

Searched a lot, but couldn't find. please help.

Thanks!

Madweer
  • 11
  • 1
  • 2

2 Answers2

0

How it should work, if you need to predict, you need to calculate any points to achieve that. Its not build-in.

Sebastian Bochan
  • 37,348
  • 3
  • 49
  • 75
0
  1. To find the equation to produce a trend line, search for Linear Regression.

    You will need to calculate the slope and intercept using the linear regression calculations, and you build your trend line using those two values, combined with an x value for the start and end points that are defined by the min and max x values of the data set.

    (ie your first point is {x: min x value, y: intercept}. your second point is {x: max x value, y: intercept + (slope * max x value)} )

  2. Much more importantly:

    Trend lines do NOT predict future values that fall outside of the existing range of the independent variable in the data.

    Using regression to plot a line in this way will help you build a predictive model of what your dependent variable may be when given a known independent variable.

    It will absolutely not give you a reliable prediction of what will happen to Y as X increases beyond the scope of the known data, especially when X is a time value.

Building an actual predictive model of values over time is much more involved, and there isn't one single way to do it. It depends on what factors affect those values, and what data you have to demonstrate those effects.

some reference:

Ajoy
  • 1,838
  • 3
  • 30
  • 57
jlbriggs
  • 17,612
  • 4
  • 35
  • 56