Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocorrelation #182

Closed
laviniarossimori opened this issue Jul 1, 2021 · 8 comments
Closed

Autocorrelation #182

laviniarossimori opened this issue Jul 1, 2021 · 8 comments
Assignees

Comments

@laviniarossimori
Copy link

Hi! I want to predict a government bond with a very high autocorrelation ( ACF close to one until a lag of 50). When I use your model I found a very similar pattern for trues and preds in the test phase but I think I shouldn't find it since it is impossible to predict using only the past value (it should be like a random walk) . It is a problem given by autocorrelation? Do you please have any advice to transform my target or another solution or suggestion? I try to use the difference from one day to another as the target but in this case, there are few high peaks that the model doesn't predict.

Thank you!

@zhouhaoyi
Copy link
Owner

Hi!
Autocorrelation should not be the problem. You can upload a sample of your data and we may check it out.
Moreover, if your task is highly autocorrelation. You should use the traditional decoder rather than the generative decoder. But we found the generative decoder performs quite well in our experiments.

@laviniarossimori
Copy link
Author

Hi! Thank you for your suggestion and your answer!
I can't share the real data but I found similar data even if with a shorter history.
btp.csv

In the plot preds and trues I obtain this kind of plot that I attach and I think an index market couldn't be predicted as well without another features.
Schermata da 2021-07-06 16-11-01

@zhouhaoyi
Copy link
Owner

Thanks for your example. I think this may be caused by the period pattern of the input sequences. I am confused with the term index market, could you please give me more explanation on that?

@zhoushuyi-22
Copy link

@laviniarossimori @zhouhaoyi Hello, can you ask a question. I am also currently working on the problem of univariate time prediction. The text structure of the data is similar to the file (btp.csv) you sent earlier. Which parameters in the code have you modified to enable univariate prediction? I modified args.features=='S', and used "Dataset_Custom", but there are still some problems, mse=nan in my test set. Looking forward to your advice and reply.

@jkarolczak
Copy link

jkarolczak commented Aug 12, 2021

Hi @gouzi1209 I'm not the author but your description suggests, that you have some Nones in your dataset. Check if there is any line with a missing date or value in your file. If so, drop such lines. It should fix your issue.
Parameters like enc_in, dec_in also may differ, as you put a single value, not 7 of them. But this shouldn't cause problems with Nones. The reason with missing values is much more probable.

@jkarolczak
Copy link

@laviniarossimori did you predict on data shown to the model (iow training set)? If so it's highly possible to perfectly fit the data, as it was known and you gave sufficiently much time for training. It's not only the case of this particular model, but a general observation that may be made for many, probably even most, forecasting models.
I hope I'm not wrong, if so, dear all, please, correct me.

@laviniarossimori
Copy link
Author

I am confused with the term index market, could you please give me more explanation on that?

Yes of course. the target is the spread, it is the difference between the italian bond yield (BTP) and the german one(BUND). It is a way to understend how italian economy is going as compered to the german one is always stable. The spread can change at every hour for a lot of different reason, so we could never had a fixed period of time in the timeseries.

@laviniarossimori
Copy link
Author

@laviniarossimori did you predict on data shown to the model (iow training set)? If so it's highly possible to perfectly fit the data, as it was known and you gave sufficiently much time for training. It's not only the case of this particular model, but a general observation that may be made for many, probably even most, forecasting models.
I hope I'm not wrong, if so, dear all, please, correct me.

Hi, thank you for your suggestion. I have almost ten years for the dataset and I use different years for the training set and the test set (like 6 years for the training and 4 for the test)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants