Curve fitting intraday bets on political candidates

32 Views Asked by At

I'm trying to generate a couple of numbers to represent all individual bets on political candidates (this is a lot like intraday stock sales). So there's a ton of individual sales and I want to reduce it all down to a few numbers, where that gives a decent approximation.

Each bet tends to be just a bit higher or lower from the previous bet. Sometimes it's more, but it should, almost all the time, come close to fitting a line. With the X as time over the day and Y the price, is a fourth order polynomial using a least squares fit the best approach for data like this? (And maybe a 5th order?)

The purpose here is to have few enough numbers that I can make use of them. And have it model the activity as a decent rough approximation.

Is there a better curve fitting other than a polynomial? And is there a better way to fit the curve than least squares? For data of this type (tends to revert to the mean second by second).

ps - I learned all this stuff 40 years ago, and haven't used it since. So apologies if this question is off, I'm re-learning as I go.

1

There are 1 best solutions below

1
On

You might look into least squares fitting with B-splines. This keeps things smooth while preserving local trends. Best of luck! https://www.geometrictools.com/Documentation/BSplineCurveLeastSquaresFit.pdf