Building an Interpretable Trading Classifier with Python and MQL5
Summary
The article presents a workflow for building a transparent financial machine learning model and connecting it to MetaTrader 5. It contrasts glass-box models with black-box methods, discusses the disagreement that can arise among black-box explanation techniques, and demonstrates feature analysis using an interpretable classifier. The example uses historical daily data, technical features such as ATR and RSI, and a target that indicates whether the next close is higher.
The workflow includes a chronological training and testing split, evaluation of predictions, and exporting the model for use from MQL5 through ONNX. The author emphasizes interpretability as a way to inspect and refine features, while noting that glass-box models can be less flexible and may inherit decision-tree limitations. The article’s example and claims do not establish a profitable strategy; its main contribution is a modeling and deployment process, with predictive performance dependent on the data and validation design.
Key ideas
- Glass-box models expose their decision logic and can make model behavior easier to inspect.
- Different black-box explanation methods may produce conflicting accounts of the same model.
- The example predicts next-day direction using daily market data and technical features.
- Training and testing data should be split chronologically for time series work.
- The article demonstrates exporting an interpretable model for MetaTrader use through ONNX, while noting flexibility limits.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.