Skip to content

4SIGHTalgo/MQL5-Mutli-Layer-Perception

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Multi-Layer Perceptron Statistical Arbitrage

This repository demonstrates how neural networks can be used inside MetaTrader 5 to enhance a traditional correlation based statistical arbitrage strategy. The project includes two expert advisors:

  • MLP_Stat_Arb.mq5 – a multi‑layer perceptron (MLP) approach that scans every major currency pair combination and scores potential trades.
  • EA_Correlation.mq5 – a simple Pearson/Spearman correlation strategy that operates on a fixed symbol pair.

The MLP EA shows how to embed and parameterise a neural network directly in MQL5. The weights included in experts/MLP_Stat_Arb.mq5 are placeholders only. The performance graphs in images/ were generated using a fully trained network that was forward and genetically optimised to reduce overfitting.

Repository Layout

experts/    MQL5 source files for both strategies
images/     Back‑test results

Back‑test Results

MLP P/E MLP Data Correlation P/E Correlation Data

The MLP approach trades all major currency crosses and therefore captures far more opportunities than the benchmark EA, which only trades a single predefined pair. In historical tests this resulted in larger net profits and more robust behaviour across different market regimes.

Compiling

Open the .mq5 files in MetaEditor and press Compile. The MLP EA requires no additional DLLs – the neural network is implemented entirely in MQL5.

Future Work

Planned features include:

  • fixed exposure and spread leg risk management
  • beta‑neutral portfolio constraints
  • support for additional asset classes

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages