                                 In-Context Fine-Tuning for Time-Series Foundation Models

   • Number of Examples: We use a maximum of n = 50 in-context examples for each context during training.

   • Padding: In short datasets like M4 yearly and quarterly, each time-series might have number of time-points much less
     than T = 640. Sometimes the number of time-points are even less than our input patch length p = 32. For such cases,
     a whole time-series can fit into one of the n examples and they are preprocessed in the following manner:
       – If the length of the time-series l is less than p, we left pad with k padding time-points such that p < k + l < 2p.
         This is because we want the decoder only model to predict something meaningful for the second patch after seeing
         the first patch and if not, is penalized by the loss on the second patch. If the l > p, we do not need to perform this
         left padding.
       – Lastly, we right pad such that the length of the total padded example is T = 640.
       – Note that the last patch in such examples would be padded from the right, i.e., they will have real time-series
         values for the first few points and padding for the rest. We make sure that such incomplete from the right patches
         are not attended by subsequent tokens belonging to examples coming after.

The continued pretraining datasets are detailed in Table 3.

A.6. OOD Benchmark Detailed Results
We give a detailed breakdown of the zero-shot evaluations on the datasets from Table 4 (displayed in Figure 5) in Table 6
with additional baselines as mentioned in Appendix A.2. We report the mean absolute scaled error (MASE) (Hyndman
& Koehler, 2006), which, for a given time-series y1:L+H = (y1 , . . . , yL , . . . , yL+H ) with context L and horizon H and
seasonality parameter S, together with a predicted time-series y   bL+1:L+H = (ŷL+1 , . . . , ŷL+H ), is defined as the mean
absolute error for the forecast normalized by the seasonal naı̈ve forecast error on the context:
                                                                       PL+H
                                                                   L−S   t=L+1 |ŷt − yt |
                                     yL+1:L+H , y1:L+H ) =
                                MASE(b                                 PL−S                .
                                                                    H   t=1 |yt − yt+S |

Each evaluation of TimesFM-ICF is averaged over 10 random seeds, where the randomness corresponds to the random
selection of in-context examples used to make predictions. The reported MASE numbers are averaged over the five
evaluations of the dataset. The confidence intervals in Table 6 correspond to one standard deviation of the 5 evaluations,
averaged over the dataset.
Since TimesFM (base) supports probabilistic forecasting, in Table 7, we additionally report the weighted quantile loss
(WQL), which averages the quantile loss QLα of (Koenker & Hallock, 2001) over quantiles α ∈ {0.1, 0.2, . . . , 0.9}. The
                                                                                                  (α)          (α)
quantile loss is defined as follows: given quantile α ∈ (0, 1) and predicted quantiles q(α) = (qL+1 , . . . , qL+H ) for a
time-series y with context L and horizon H, the quantile loss at level α of an observation yt is:
                                                    (
                                                              (α)                    (α)
                                          α          α(yt − qt )            if yt > qt
                                   QLα (qt , yt ) =            (α)
                                                     (1 − α)(qt − yt ) otherwise

                                                                                               (α)
The weighted quantile loss over a dataset D, where each yi ∈ D has a predicted quantile qi , is given by:
                                                                         α
                                                   P
                                                 2 i∈|D| PL+H QLα (qi,t      , yi,t )
                                                             t=L+1
                                       WQLα =         P        PL+H
                                                         i∈|D|   t=L+1 |yi,t |


Then, the weighted quantile loss is the average of WQLα over α ∈ {0.1, 0.2, . . . , 0.9}.
Note that, in addition to the detailed results in Tables 6 and 7, we additionally report the geometric mean of the MASE on
each dataset, normalized by the MASE of the seasonal naı̈ve baseline. This geometric mean is then averaged over the 5
evaluation runs. We report both the geometric mean of the 23 datasets from the Chronos zero-shot benchmark for which we
are zero-shot (see Table 4), i.e., that were not used during training of TimesFM-ICF or the base model TimesFM (base), as
“Geometric Mean (ZS)”. We also report the the geometric mean over all 27 datasets from the Chronos zero-shot benchmark
as “Geometric Mean (All)”.

                                                              14
