[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best fir sine wave



PureBytes Links

Trading Reference Links

>Thanks to everyone who replied. A few suggested smoothing functions but 
>that's not really what I wanted to do. Anyway, I've been given to 
>understand that it can be done although possibly not in TS but alas, no 
>one could tell me how to do it - at least not for free... (:-)

I can give you some advice for free.

You can often make a curve fit into a linear regression.  For example,
if you have exponentially rising data that you suspect is of the form
y=a*exp(mx+b), then you can convert it to a line u=mx+b, where
u=ln(y).  Then you find the fit for slope (m) and intercept (b), and
substitute back.

Similarly, if you suspect your data has the form y = sin(p(x+b)),
you can invert it as u = px+pb where u=arcsin(y), and solve fo the
slope p and intercept pb.

That's my $0.02.

I wouldn't do it for free either, btw.

-Alex