Skip to content
All library documents

Using MLP Functors to Forecast S&P 500 Trends from Economic Data

Article MQL5 articles

Summary

This article adapts category theory functors to generate short-term S&P 500 trading signals from linked economic calendar data. It models data points such as retail sales, 10-year auction yields, PMI, and CPI as a graph, then uses neural networks to map relationships between categories. The implementation uses two three-layer perceptrons: one maps objects and the other maps morphisms. Four economic inputs feed the network, which produces a forecast change in the index. Historical calendar data is exported to CSV for use in MetaTrader’s strategy tester, where an MQL5 signal component trains the network with the Levenberg–Marquardt algorithm.

The article reports that its morphism-to-morphism mapping performed better on drawdown and profit factor than the object mapping. It does not provide the underlying figures in the supplied text, so the comparison cannot be independently assessed here. The author treats the economic relationships as hypotheses and emphasizes that alternative data, dependency structures, and training schedules require further testing. The approach is presented as an experimental framework, not a ready-made profitable strategy.

Key ideas

  • The article represents linked economic calendar observations as a graph whose vertices and arrows form a category.
  • Two perceptrons map objects and morphisms between categories to produce an S&P 500 forecast.
  • The network uses four economic data inputs and one forecast output, with a configurable hidden layer.
  • Historical calendar data must be exported to CSV for strategy testing and training.
  • The reported morphism mapping performed better on drawdown and profit factor, but further testing is needed.

Tags

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