Message Boards Message Boards

Estimate the best fit function for a time series?

GROUPS:

Hi! I'm working on some financial data, and got stuck once computing the sample autocorrelation function for a time series. First I import the data, then turn it into a Time Series using TimeSeries[data,Automatic]. Then I run CorrelationFunction and it returns a proper autocorrelation function. But if I then try to fit a function to this sample autocorrelation, the FindFit says something like FindFit::fitd: First argument in FindFit is not a list or a rectangular array.

Any ideas. My objective is to estimate a nonlinear function out of the sample autocorrelation function

thanks, Jussi

POSTED BY: jussi lindgren
Answer
3 months ago

Jussi,

It’s best to post a simple example so the community can be more helpful, however, in the abstract, you should extract the path from your timeseries for the findFit function. If ts is your timeseries, do

ts[“Path”]

This will give you the time, value pairs in the proper format for FindFit.

Regards,

Neil

POSTED BY: Neil Singer
Answer
3 months ago

Group Abstract Group Abstract