Skip to content
All library documents

Fine-Tuning TimesFM for Probabilistic Financial Forecasts in MetaTrader 5

Article MQL5 articles

Summary

The article describes an end-to-end workflow that adapts Google’s pretrained TimesFM 2.5 model for financial time series and displays forecasts in MetaTrader 5. It combines OHLCV exports across forex, index, and commodity instruments with time, session, economic-calendar, lunar, and technical covariates. The model uses LoRA adapters to fine-tune a small subset of its parameters, then produces 10th, 50th, and 90th percentile forecasts for chart visualization.

The explanation covers TimesFM’s patch-based, decoder-only design, the rationale for transfer learning with limited and non-stationary market data, and the pipeline from data preparation through forecast export. The article presents an implementation workflow, not empirical trading validation: it gives no forecast accuracy results, benchmark comparison, or evidence that the extra covariates improve returns. Its claims about reducing overfitting and producing actionable forecasts should therefore be treated as motivations rather than demonstrated outcomes; the forecasts require independent evaluation before use in trading.

Key ideas

  • TimesFM uses contiguous time-series patches to generate forecasts in larger output steps.
  • LoRA fine-tuning adapts a small part of a pretrained model to financial instruments.
  • The workflow combines price data with cyclical time, session, calendar, lunar, and technical features.
  • Quantile forecasts provide a median prediction and lower and upper uncertainty estimates for chart display.
  • The article describes a practical pipeline but does not report predictive performance or trading results.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.