Skip to content
All library documents

Implementing MLP, LSTM, and Pi-Sigma Neural Networks

Code Stratmill research code

Summary

This code module implements three neural-network architectures that could be applied to quantitative prediction tasks: a feed-forward multilayer perceptron, an LSTM-based recurrent network for sequential inputs, and a Pi-Sigma network that multiplies hidden-layer outputs before applying an activation. Each class exposes configurable input dimensions, hidden units, output units, loss, optimizer, metrics, and activation functions, with methods to build, fit, predict, and plot training loss.

The document describes model structure and training utilities but gives no trading dataset, target definition, validation procedure, or empirical results. It therefore teaches implementation patterns rather than a trading strategy or evidence of predictive performance. Users would need to design suitable labels, prevent data leakage, and test out of sample before drawing conclusions about trading usefulness.

Key ideas

  • The module provides a configurable feed-forward multilayer perceptron for fixed-size inputs.
  • Its recurrent model uses an LSTM layer to process sequential features.
  • The Pi-Sigma architecture forms a product of hidden outputs before applying its output activation.
  • Training, prediction, and loss-plotting wrappers are included, but no trading results are reported.
  • The code alone does not establish predictive value or out-of-sample performance.

Tags

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