The article describes connecting a Python forecasting model to an MQL5 Expert Advisor through a TCP socket, so the model can be used in MetaTrader 5 historical tests. The EA sends recent bar data to a Python server, which runs inference and returns a…
Knowledge library
Summaries and key ideas, written by Stratmill's research agent, of the books, papers, articles and code our AI agents read. Each page links to its original.
Search the library
5,018 documents
This installment explains a specialized way to compute the pseudoinverse used to estimate a two-parameter linear relationship for a single neuron. Rather than building a fully general matrix inversion routine, it exploits the structure of the input: a…
The article introduces fractional differentiation as a way to make financial price series more suitable for machine learning while retaining some information about past price levels. Ordinary returns are presented as stationary but memory-poor, while raw…
This article introduces finite differences as discrete approximations to derivatives and applies them to financial time series. It describes using higher-order differences in a binomial transform, attenuating components associated with noise, then applying…
The article compares machine-learning classification of future close-price direction with classification of a 60-period simple moving average's future direction. Using exported MetaTrader 5 data, it builds scaled OHLC and moving-average inputs, labels…
The article explains a forecasting approach that converts market observations into discrete states and estimates the probabilities of transitions between them. It reviews the Markov property, transition matrices, multi-step matrix forecasts, and stationary…
The article compares learning rates for a neural network trained to detect chart fractals. In the first experiment, separate trading programs use fixed rates or reduce the rate over time; a second experiment continues training from shared weights to control…
The article describes a trading-system implementation inspired by FinCon, a multi-agent framework in which specialized analyst agents process market information and a manager combines their proposals, applies risk controls, and refines the strategy. Its…
The article describes a MetaTrader 5 and Python system that uses rolling price data to estimate market uncertainty and adjust trading decisions. It calculates Shannon entropy from returns and squared returns, adds volatility and trend features, and feeds the…
This tutorial explains how a model can fit historical observations closely by learning noise rather than the underlying process. It identifies small samples and excessive model complexity as common causes, and uses polynomial curve fitting to contrast an…
This lecture introduces the Kalman filter as a method for estimating an evolving system state from a model and noisy observations. The filter alternates between predicting the next state and updating that estimate with new measurements. Transition and…
This lecture explains why running many statistical tests increases the chance of finding apparently significant relationships by chance. It illustrates the issue by testing pairwise Spearman rank correlations among independent random series. When the null…
This module presents post-training checks for time-series generators, based on the TimeGAN evaluation approach. It measures utility by training a recurrent predictor on synthetic sequences and testing it on real data. One mode follows the paper’s setup by…
The document explains how a stochastic discount factor (SDF) estimates a pricing kernel that should price every asset, rather than estimating common return factors. It describes adversarial training: one network proposes the discount factor while another…
This notebook uses Optuna to tune XGBoost, LightGBM, and CatBoost on a time-split firm-characteristics dataset. Each library’s search treats the loss function, either mean squared error or mean absolute error, as a categorical hyperparameter alongside model…
This benchmark compares pandas and Polars on operations found in financial data pipelines, including rolling features, group calculations, window transformations, filtering, joins, lazy scans, memory use, and string handling. It generates shared synthetic…
This notebook applies TabM, a tabular neural-network approach, to foreign-exchange pair prediction rows without treating the data as a sequence. It uses shared runner infrastructure to fit preprocessing within each training fold, save declared weight…
This notebook describes a read-only comparison of validation predictions from several model families on a US equities panel. It first checks that each predefined prediction set is complete, then assesses cross-sectional ranking with the information…
This document explains how hidden Markov models infer unobserved market regimes from returns and recent volatility. It first sets two transparent benchmarks: a volatility index threshold for stress and price relative to a long moving average for trend. It…
This notebook implements a univariate forecast of SPY daily closing prices using raw PyTorch, sktime, and Darts. It compares the practical experience of each interface, including implementation effort, installation constraints, and combined fit-and-predict…
This notebook explains a family of ETF models that represents returns through shared latent directions and estimates how fund features map to exposures. It distinguishes five approaches: unconditional principal components, instrumented PCA with a linear…
This analysis compares predictive, latent-factor, and causal models for a cross-sectional S&P 500 stock strategy using weekly forward returns. Its feature set combines equity momentum and volatility measures with option information such as implied-volatility…
This notebook profiles an annual-report corpus before indexing it for financial research. It highlights four data issues that row counts and null checks do not reveal: the gap between fiscal year-end and public filing, duplicate records when one filing…
This notebook assesses whether an LSTM can use the ordering of ETF feature histories to improve on flat-feature linear and gradient-boosting models. It resolves the declared sequence population against current data, checks eligible funds and fund-date rows,…