1
$\begingroup$

I'm using sparse in a specific (but perhaps incorrect) way. Shown below is a time series of prices

2016-05-18  0.9118613142872591
2016-05-19  0.8921613140413168
2016-05-20  0.8848059412022842
2016-05-26  0.8755275321301189
2016-05-27  0.8805152228524439
2016-06-23  0.9245819516881806
2016-06-24  0.9110491341479788
2016-07-01  0.9347510668648712
2016-07-02  0.9053273268112989
2016-07-21  0.9683684001482084
2016-07-22  0.9633580372935682
2016-08-25  0.960932583607675
2016-08-26  0.944715028971071
2016-09-22  0.9778171436955735
2016-09-23  0.9627294268056957
2016-10-06  0.9594016269961939
2016-10-07  0.9371322186184987
2016-10-08  0.9165331880285734
2016-10-14  0.954074826216688
2016-10-15  0.921738772482935
2016-10-20  0.9297582568533065
2016-10-21  0.9209454873374863

I have some points in time which are quite close, and others which are nearly a month away from one another.

Linear regression was one suggested method. I think this is inappropriate because the nature of the product is highly non-linear, and the nature of the noise is likely not consistent with the assumptions of linear regression.

I've also tried Gaussian Process Regression, but because the data are far apart in the domain, GPR does not perform well.

I've thought about doing ARIMA, but that is usually for forecasting and not interpolation, right?

$\endgroup$
  • 1
    $\begingroup$ ARIMA models are special cases of linear Gaussian state space models. As such, you can certainly perform interpolation of missing values by using the Kalman smoother. Whether ARIMA is an appropriate model for your specific data is a different question (I didn't check). $\endgroup$ – Chris Haug Oct 27 '16 at 16:30
1
$\begingroup$

My go-to here would have been fitting a Gaussian Process to the data. If you are getting poor results with that technique, I'd suggest looking at the covariance kernel you're using. However, this isn't a regression task, so I wonder if you've been using software correctly or not.

As I'm waiting for a giant tar to extract I thought I'd have a go with the data you provided. I did some sloppy mental arithmetic on the gaps between days to get the time data. This is the fit I get using GaussianProcesses.jl which looks pretty reasonable.

GP fit to the data

#assume you have time vector and vals vector
using PyCall
@pyimport pylab
using GaussianProcesses
mZero = MeanZero()
kern = SE(0.0,0.0)
gp = GP(time, vals, mZero, kern, 1e-8)
optimize!(gp)
T = linspace(0,130,100)
y = predict(gp, T)[1]
pylab.scatter(time, vals)
pylab.plot(T, y)
$\endgroup$
  • $\begingroup$ Which isn't a regression task? $\endgroup$ – Demetri Pananos Oct 27 '16 at 14:51
  • $\begingroup$ OK, I take it back, people could legitimately think of it as a regression. I just think of it as fitting a GP to a timeseries because it's so simple. $\endgroup$ – conjectures Oct 27 '16 at 15:54
  • $\begingroup$ I took your advice about Kernels. I obtained a reasonable result by using a combination of two kernels. Thanks. $\endgroup$ – Demetri Pananos Oct 27 '16 at 16:48
  • $\begingroup$ Not only could they think of it as such - it IS regression! Gaussian Process Regression is synonymous with fitting a GP to data. $\endgroup$ – T3am5hark Apr 7 '18 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.