The article presents a generic formulation for optimizing trading systems when a platform accepts bounds on input variables but cannot directly enforce other constraints. It combines multiple performance objectives—such as return, Sharpe ratio, recovery…
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,922 documents
The article introduces null and alternative hypotheses, significance levels, and the risks of false rejection or acceptance. It illustrates nonparametric testing with trading examples: a Wilcoxon signed-rank test compares results before and after changing…
This article develops an educational Expert Advisor for trading a synthetic basket of multiple currency pairs. It standardizes synchronized closed-bar prices, applies singular value decomposition to a covariance matrix, and selects the direction associated…
This article describes restructuring a multi-strategy Expert Advisor so strategy instances track virtual positions instead of placing market orders independently. A receiver collects the strategies’ requested volumes by symbol and converts their combined…
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…
This tutorial introduces NumPy arrays and linear algebra operations used in quantitative finance. It explains array dimensions, shapes, indexing, slicing, and element-wise functions, then applies them to simulated asset returns. Randomly generated assets…
This lesson uses a factor model to separate portfolio risk into common factor risk and asset-specific risk. It constructs market, size, and value factor returns, estimates each stock’s exposure through regression, and explains how those exposures and factor…
The lecture introduces principal component analysis as a way to summarize a large matrix with a smaller set of orthogonal components that capture much of its variation. A synthetic image illustrates covariance decomposition, ranking components by eigenvalue,…
This lecture introduces factor models as regressions that explain an asset’s returns using other return series. It estimates an asset’s beta to a benchmark from historical returns, then uses a short benchmark position sized to offset the estimated market…
This lecture explains leverage as borrowing to increase the capital deployed in a trading strategy. It defines the leverage ratio and uses single-period examples to show how borrowed funds can amplify gains while interest reduces the benefit. Borrowing costs…
This lecture explains how the Capital Asset Pricing Model relates expected asset returns to a risk-free rate and exposure to broad market risk. It distinguishes diversifiable, firm-specific risk from systematic risk, and uses regression beta to estimate an…
This lecture introduces portfolio Value at Risk (VaR) as a loss threshold associated with a chosen coverage level, then demonstrates historical VaR by calculating a low percentile of weighted portfolio returns over a lookback window. It contrasts this…
The document explains how covariance describes the way asset returns vary together and how a covariance matrix collects these relationships alongside each asset’s variance. Portfolio construction uses this matrix to estimate combined risk, assess…
The document presents a workflow for reviewing a trading portfolio with performance statistics and diagnostic plots. It describes common measures such as Sharpe ratio, market beta, and maximum drawdown, along with return distributions, cumulative and…
The document explains how market beta and sector exposure can make a portfolio’s individual forecasts move together, reducing the number of independent bets and, in turn, its risk-adjusted potential. It frames this through the Fundamental Law of Active…
The document explains a cross-sectional long-short equity strategy: rank stocks with a model, buy the highest-ranked names, and short the lowest-ranked names using balanced dollar exposure. It presents the ranking signal as the strategy’s main source of…
This lecture uses factor models to explain portfolio returns and quantify exposure to systematic sources of risk. It describes regressing active returns, measured relative to a benchmark, on factor returns, then using estimated sensitivities and factor…
This lecture explains how universe selection defines the securities available to a trading algorithm and can shape both strategy behavior and risk. It presents a daily screen for common stocks ranked by average dollar volume as a basic liquidity filter,…
The document introduces linear factor models that explain an asset’s returns through exposures to fundamental factor return streams. It describes two ways to make company characteristics comparable: construct long-short portfolios by ranking stocks on…
The document explains how spreading exposure across independent or weakly correlated bets can reduce portfolio volatility, while adding highly correlated assets may leave risk largely unchanged. It illustrates the principle first with simulated bets that…
The document defines correlation as covariance scaled by the standard deviations of two series, yielding a measure between -1 and 1 that is easier to compare across data. It explains covariance and correlation matrices, with examples showing positive,…
This document turns cross-sectional ETF predictions into simulated trades. It distinguishes ranking quality, measured by information coefficient, from realized strategy performance: a top-k portfolio depends on the relative score values, rebalance schedule,…
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 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…