Skip to content

Saptarshi-ux/forecasting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Zero-Shot Time Series Forecasting using Chronos-2

Python Pandas Model Status


Overview

This project demonstrates zero-shot forecasting, where a pre-trained time series foundation model (Chronos-2) is used to generate forecasts without any training or parameter tuning on the dataset.

Unlike traditional econometric or ML models, this approach directly leverages learned representations of time series patterns.

code

What is Zero-Shot Forecasting?

Zero-shot forecasting means:

The model does not learn from your dataset explicitly, but instead uses prior knowledge gained during large-scale pretraining.

In this project:

  • Input → historical inflation data
  • Output → future forecast (next 4 months)
  • No model fitting step involved

About Chronos-2

Chronos-2 is a Transformer-based time series foundation model developed by Amazon.

  • ~120M parameters
  • Encoder-only architecture
  • Supports:
    • Univariate forecasting
    • Multivariate forecasting
    • Covariate-aware predictions

The model exposes a Pandas-based API, making it easy to integrate into data workflows.


How Chronos Works Internally

Unlike ARIMA or traditional econometric models, Chronos does not model values directly.

Instead, it:

  1. Normalizes the time series
  2. Discretizes values into tokens
  3. Converts the series into a sequence of tokens
  4. Uses a Transformer to predict future tokens

Essentially, it treats time series like a language modeling problem, similar to how GPT predicts the next word.


Forecast Output

🔹 Historical vs Forecast Plot

image

Installation

pip install chronos-forecasting pandas matplotlib

Usage

from chronos import Chronos2Pipeline

pipeline = Chronos2Pipeline.from_pretrained("amazon/chronos-2")

pred_df = pipeline.predict_df(
    df,
    prediction_length=4
)

Dataset Used

Monthly WPI Inflation Data (attached in repository) (Taken from the database on Indian Economy RBI estimation) Period: March 2025 – February 2026

About

zero shot forecasting using chronos2, No training , No tuning. This an encoder only for time series foundation model

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors