nixtla icon indicating copy to clipboard operation
nixtla copied to clipboard

Date format?

Open Mohan16071996 opened this issue 1 year ago • 4 comments

I have data with daily format, not on hourly format.

how to handle this ?

Dataframe example: image

Can you give sample code like this: fcst_df = nixtla_client.forecast(df, h=24, level=[80, 90])

4. Plot your results (optional)

nixtla_client.plot(df, fcst_df, time_col='ds', target_col='y', level=[80, 90])

If it is in daily format, how long can we forecast using this?

Mohan16071996 avatar May 15 '24 13:05 Mohan16071996

Can you please respond as soon as possible?

Mohan16071996 avatar May 15 '24 13:05 Mohan16071996

Hi,

You should specify the frequency parameter:

fcst_df = nixtla_client.forecast(df, h=24, level=[80, 90], freq='D')

See also this tutorial

You might then also want to change the forecast horizon (otherwise it will forecast 24 days ahead....)

Hope this helps.

elephaint avatar May 15 '24 13:05 elephaint

Thanks for your reply. I have used the following configuration now.

3. Forecast the next 248 business days

fcst_df = nixtla_client.forecast(train, h=business_days, freq = 'B' , time_col = 'ds', target_col='Close', add_history=True,level=[80, 90])

What is the maximum horizon that the model can predict accurately. If I try to predict for one year, it gives very bad forecasts. Can you please help with this? I guess, the issue is because, model is written for hourly forecast?

Mohan16071996 avatar May 16 '24 03:05 Mohan16071996

In the documentation, there is a tutorial on long-horizon forecasting. Thus, you can use a different model when making long-horizon forecasts.

That said, it seems like you try to predict stock prices, which is a non-sensical forecasting task for such a long horizon. It's like trying to predict a random walk. It makes no sense. So results will (obviously) be bad.

elephaint avatar May 16 '24 05:05 elephaint

@Mohan16071996 Is your issue resolved?

elephaint avatar May 28 '24 21:05 elephaint

This issue has been automatically closed because it has been awaiting a response for too long. When you have time to to work with the maintainers to resolve this issue, please post a new comment and it will be re-opened. If the issue has been locked for editing by the time you return to it, please open a new issue and reference this one.

github-actions[bot] avatar Jun 28 '24 04:06 github-actions[bot]