This article uses a series of trading examples to show how implementation choices can make backtests look stronger or weaker than a live strategy. It highlights omitted transaction costs and slippage, incorrect treatment of reinvestment and whole-unit…
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
The document introduces XGBoost as a gradient boosting method that combines decision trees sequentially, with each new tree aimed at correcting earlier prediction errors. Its objective balances predictive loss against a regularization term that discourages…
The article outlines the mathematical, statistical, and programming foundations associated with quantitative finance, then describes common quant work: trading strategy development, portfolio optimization, risk management, and asset pricing. It recommends…
The document introduces K-nearest neighbors (KNN), a supervised learning method that classifies or estimates a new observation using nearby examples selected by a distance metric. For classification, neighboring labels determine the predicted class by…
Market impact is an implicit trading cost measured by the difference between the pre-trade reference price and the execution price. The document separates temporary impact, which reflects the concession needed to find counterparties, from permanent impact,…
This personal account describes an algorithmic trader’s move from strategies written in Rust without machine learning to Python-based work that combines machine learning with trading-system development. The central lesson is that predictive-model metrics…
The article explains K-means clustering as an unsupervised method for grouping stocks with similar feature values, then applies it to candidate selection for statistical arbitrage. It contrasts clustering with manually choosing pairs by sector or industry,…
This project outlines a market-neutral long-short portfolio framework that selects assets with cross-sectional momentum and compares equal weighting, inverse-volatility weighting, Hierarchical Risk Parity (HRP), and Hierarchical Equal Risk Contribution…
The article describes directional change (DC), a threshold-based way to represent price movement through confirmed turning points rather than fixed-time observations. It defines upward and downward runs, their overshoots, and three derived measures: total…
The article introduces hidden Markov models as a way to infer unobserved states from observed data. It explains the Markov property, transition probabilities, and time-homogeneous chains, then relates hidden-state estimation to the Kalman filter’s prediction…
This article describes market sentiment as the collective outlook of participants and explains how text sentiment analysis attempts to classify opinions as positive, negative, or neutral. It outlines a workflow of collecting news, social media, or financial…
This tutorial uses simulated data generated from a second-order relationship with normally distributed noise to explain model underfitting, overfitting, and the bias–variance tradeoff. It divides the observations into training and test sets, fits polynomial…
Steven Downey describes using quantitative research to test investment beliefs rather than accepting them without evidence. His examples include examining whether gold behaves as an inflation hedge, whether oil and an energy company’s shares are related, and…
The project proposes a daily allocation strategy across stocks in India’s Nifty Bank index. It uses three dynamic linear neural network models: one estimates the probability of a positive next-day return, while two estimate return size conditional on…
The document explains the chain rule for differentiating a function built from nested functions. If one quantity depends on an intermediate quantity, which itself depends on an input, the overall rate of change is found by multiplying the relevant…
Forward propagation carries input data through a neural network to produce an output. At each layer, neurons combine inputs with weights and biases, apply an activation function, and pass the resulting values onward. The article introduces this process using…
This study examines whether LSTM recurrent neural networks can classify the direction of near-term SPY returns from historical daily returns. Its base model uses sequential return inputs, stacked LSTM layers, dropout and batch normalization, and predicts…
The article explains two ways to combine decision trees to address weaknesses such as noise, underfitting, and overfitting. Bagging trains trees independently on bootstrap samples drawn with replacement, then averages regression outputs or uses the majority…
This tutorial explains how to prepare market data for classification and regression decision trees. It uses daily E-mini S&P 500 futures data and constructs predictors from exponential moving averages, average true range, average directional index, relative…
This overview describes the spread of algorithmic trading across firms and markets, emphasizing speed, automation, and reduced reliance on manual decisions. It surveys drivers and enabling technologies, including machine learning, artificial intelligence,…
This article surveys the development of trading from direct barter and currency to intermediaries, exchanges, telephone dealing, electronic order routing, online platforms, and algorithmic systems. It highlights how each stage changed the way participants…
This article describes a directional trading experiment using a decision tree classifier and custom price-derived features rather than standard technical indicators. The features include changes in the close relative to the prior day’s range, a second-order…
The document introduces covered calls as a way to earn option premium while holding shares, explaining that the seller keeps the premium if the stock stays below the strike but may have to sell shares at the strike if the price rises. It then outlines a…
This article lays out a machine learning trading workflow using technical indicators to predict a future five-day close-to-close return. It describes aligning the shifted target with current predictors, then applying walk-forward optimization to assess…