Ivo Nikolov All free resources

free guide1 page · 4 min read

Forecast your next 3 months with TimesFM in Google Colab

3 copy-paste Colab cells, how to read the range, and the license check. You don't write any code and you don't train anything: you paste your monthly numbers, run the cells, and Google's TimesFM 2.5 continues the line.

Hi, it's Ivo.

What you need first

  1. A Google account. Google Colab runs in the browser and Google says it's free of charge to use (with usage limits).
  2. One number you count every month: sales, orders, bookings, visitors. Plain numbers, oldest month first.
  3. At least 12 months of history. 24 is better, because then the model sees each season twice.

The 3 copy-paste Colab cells

Go to colab.research.google.com and click New notebook. Each block below goes into its own cell. Click into a cell, paste, then press the play button (or Shift + Enter). Run them in order.

  1. Cell 1: install TimesFM. It takes a minute or two.

python !pip install -q timesfm

If Colab says Restart session, click it, then go on with cell 2.

  1. Cell 2: your numbers. Replace the sample numbers with yours, oldest month first, separated by commas. No currency signs, no spaces inside a number. months_ahead is how far you want to look.

python sales = [ 8120, 7640, 8705, 9310, 10450, 12980, 14210, 13870, 10920, 9450, 8730, 11890, 8540, 8010, 9120, 9880, 11020, 13650, 15010, 14430, 11380, 9820, 9100, 12470, ] months_ahead = 3

  1. Cell 3: the forecast. The first run downloads the model from Hugging Face (about 900 MB), so give it a few minutes. A yellow warning about HF_TOKEN is normal; you can ignore it.

```python import numpy as np import timesfm import matplotlib.pyplot as plt

model = timesfm.TimesFM_2p5_200M_torch.from_pretrained("google/timesfm-2.5-200m-pytorch") model.compile(timesfm.ForecastConfig( max_context=1024, max_horizon=256, normalize_inputs=True, use_continuous_quantile_head=True, force_flip_invariance=True, infer_is_positive=True, fix_quantile_crossing=True, ))

point, quantiles = model.forecast(horizon=months_ahead, inputs=[np.array(sales, dtype=float)]) best = point[0] low = quantiles[0, :, 1] # 10% line high = quantiles[0, :, 9] # 90% line

for i in range(months_ahead): print(f"Month +{i+1}: about {best[i]:,.0f} (likely between {low[i]:,.0f} and {high[i]:,.0f})")

n = len(sales) plt.figure(figsize=(9, 4)) plt.plot(range(n), sales, label="your history") plt.plot(range(n - 1, n + months_ahead), [sales[-1], *best], "--", label="forecast") plt.fill_between(range(n, n + months_ahead), low, high, alpha=0.3, label="likely range") plt.legend() plt.show() ```

With the sample numbers above, our test run on 24 Oct 2026 printed:

Month +1: about 9,035 (likely between 8,386 and 9,739) Month +2: about 8,643 (likely between 7,908 and 9,405) Month +3: about 9,831 (likely between 9,049 and 10,707)

Your own numbers will give different results.

How to read the range

When not to trust it

  1. Promotions and price changes. It only sees your history. It doesn't know about next month's offer.
  2. New products. No history, no line to continue.
  3. One-off events. A closure, a renovation, a new competitor. The model doesn't know unless your numbers show it.
  4. Very short history. A few months can't show a season.

It's a guide for planning. It is not financial advice, and it doesn't replace your own judgment or your accountant.

The license check

  1. The TimesFM code on GitHub is Apache-2.0, and the README says the open version is not an officially supported Google product.
  2. Version 2.5 (the one in cell 3, google/timesfm-2.5-200m-pytorch): the weights are Apache-2.0, so you can use them for your business.
  3. Version 3.0 (the newest, August 2026): the downloadable weights are under a non-commercial license. It says the results can't be used in commercial decision-making. Planning your stock or your staff with it doesn't fit that.
  4. Business use of 3.0 is allowed through Google Cloud (BigQuery ML, and Connected Sheets on top of it). That's a different, paid path.

As of October 2026. Libraries change, so if a cell breaks, check the TimesFM README.

Sources: github.com/google-research/timesfm (README, license notice) · huggingface.co/google/timesfm-2.5-200m-pytorch (Apache-2.0) · huggingface.co/google/timesfm-3.0-pytorch (TimesFM Non-Commercial License v1.0) · research.google.com/colaboratory/faq.html