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

Best fir sine wave



PureBytes Links

Trading Reference Links

Hello Ian,

don't be disappointed, but a best fit sine wave is not possible in the
general case. Although it appears so wiggly, if you look at a sine wave more
closely you see it is quite rigidly structured. There are not many
parameters that you can change - only amplitude, frequency and location
(which determines phase, too). Of course, if you make the amplitude big
enough, and the frequency high enough, you might be able to find a sine wave
that "fits" even a large number of points in the sense that those points lie
on or near the curve, just like when you hand a paint brush to a monkey, the
animal's criss-cross brushwork may sooner or later color the whole canvas -
but I doubt that this is what you had in mind.

So *one* sine wave cannot really be used to "best fit" a number of points,
in the general case. But a *combination* of sine waves of different
amplitudes, frequencies, and phases (called a Fourier series) can most
certainly be used to interpolate any number of points. Math packages like
Mathematica make this task quite straightforward nowadays.

Hope this helps a little.

Best regards,

Michael Suesserott



----- Original Message ----- 
From: "Ian Waugh" <ianwaugh@xxxxxxxxx>
To: <omega-list@xxxxxxxxxx>
Cc: <ianwaugh@xxxxxxxxxxxxxxxxxxx>
Sent: Friday, August 29, 2003 23:16
Subject: Re: Best fir sine wave


> 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... (:-)
>
> That's just for the record.
>
> Ah well, onto something else, guys.
>
> Thanks to everyone.
>
> Ian
>
>
> > This is probably a long shot - or a complex one.
> >
> > Working on some cycle stuff and have an indicator that plots a few
> > wiggles on the graph. Is there such a thing as a formula for a best
> > fit sine wave, maybe along the lines of a best fit (linear
> > regression) line? I'd like to apply this to the indicator to 'smooth
> > out' the bumps and adjust the plot so it's more sine-like.
> >
> > Hope that's clear.
> >
> > If no such thing exists, that's fine but I thought I'd ask.
> >
> > Ian
> >
> >
>
>