> For the complete documentation index, see [llms.txt](https://docs.whaly.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.whaly.io/data-consumption/exploring-data/forecasting.md).

# Forecasting

Forecasting allow you to predict a value in the future based on past data. It uses machine learning techniques to output the probable future.

## How to create a forecast

The forecast capability only works on timeseries chart that don't have a dimension grouping. When the capability is available it is materialized by a Create Forecast button in the chart area as shown below.

![Forecast button](https://34758050-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MC1g4I2_CgXd0qAq1P7%2Fuploads%2FmsxMqU5BGbvazAb0K4he%2Fimage.png?alt=media\&token=0abe6538-a8ee-4e27-af34-0d70e49bade3)

When clicking on the button we will compute the next probable value based on the value that are displayed on the chart, therefore the more value are displayed on your chart the more accurate the forecast will be. We will forecast 10% of the number of steps that are used in your chart or a minimum or 1 value. For instance if your displaying a single value every day for a month we will predict 3 steps forward (30 days \* 10% = 3 days). If you display a week of values we will forecast 1 day (7 days \* 10% = 0.7 days rounded to 1).&#x20;

![Forecasted value](https://34758050-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MC1g4I2_CgXd0qAq1P7%2Fuploads%2F0K6hK1IF6V0ppDjoKzAP%2Fimage.png?alt=media\&token=4ed1cbba-c98f-42d8-8c1f-c103dfd5fa6d)

When you create your forecast you can see the probable value as well as the upper bound and lower bound for the forecasting.

## How does it work

We use under the hood [ARIMA](https://www.machinelearningplus.com/time-series/arima-model-time-series-forecasting-python/) to predict the future values of your time series. This is a state of the art algorithm that is used in production by multiple companies.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.whaly.io/data-consumption/exploring-data/forecasting.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
