algorithm - How can I find nearest point in a time series data -


i need calculate nearest datapoint in time series chart specific point in chart

i cannot use d=sqrt(x*x+y*y) x axis in time series, hence wont make sense have equation adding distance , time (x,y need have same units). visually may seem right, still depends upon scale of x axis.

so best logic can use find nearest point?

i can think of using quadratic form of x (i.e. time) final function can ne f(x*x,y), subjective equation.

does have better , more logical approach this. if there intuitive logical approach love it. , if there complicated model still know , explore it.

thanks

edit

to give background: polling people predict stock price in april(they have mention exact date when expect price there) ... how measure performance?

one intuitive way calculating average absolute change per day. i.e. sum of absolute changes every day previous day / total number of days in series.

thereafter can translate each day in terms of prices i.e. average price change per day.

thus if average absolute change per day lets 2, price 10 days away can said 20 price points away.

thereafter can calculate distance based on sqrt(x*x+y*y) formula.

this can fine tuned using bell curve (std dev , mean) rather mean of absolute change per day. make solution more ocmplicated.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -