The document describes a screening method for finding stocks whose behavior during sharp market declines differs from their average relationship with the broad market. It aligns daily stock and SPY returns, estimates each stock’s market beta over the full…
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
115 documents
The document contrasts two possible trading outcomes for a strategy described as having a known, substantial edge: a favorable run and an unfavorable run. Its central lesson is that realized profit and loss can vary considerably even when the underlying…
This article demonstrates a vector autoregression (VAR) model using daily returns for a basket of U.S. homebuilding stocks. It fits the model on a rolling historical window, forecasts each asset’s next return, and converts the cross-sectional forecasts into…
This article explains how to profile an R workflow that calculates rolling pairwise correlations across S&P 500 constituents. It outlines possible ways to address memory limits, including chunking data, choosing compact data structures, using memory-focused…
This article demonstrates ways to speed up a portfolio backtest implemented in R. It begins with profiling a cash backtest that processes prices and target weights across dates, updates holdings using a no-trade buffer, accounts for commissions, and records…
This course overview presents a systematic trading process built around identifying an economic reason for an edge before optimizing a backtest. It recommends forming a hypothesis first, then examining data and testing the idea, and describes a framework for…
This article explains statistical arbitrage by contrasting it with cross-exchange arbitrage. Pure arbitrage seeks to buy and sell the same asset at different prices, but transfers, costs, and price changes make the apparent opportunity difficult to capture.…
The document describes reconstructing monthly S&P 500 membership history from the current constituent list and a record of index additions and removals. Working backward month by month, the method removes stocks that were added and restores those that were…
The article demonstrates a spreadsheet workflow for exploring a claimed weekday pattern in gold-related prices. Using GLD price history, it derives log returns and calendar fields, groups returns by weekday in a pivot table, and charts the sums. It reports…
The document introduces Shannon entropy as a way to examine how random price movements appear over a chosen lookback period. It describes applying the measure to price data, selecting a period and pattern length, and plotting entropy values for several…
The article introduces a lag-based estimate of the Hurst exponent and applies it to simulated mean-reverting data and adjusted SPY prices. The method compares the variability of price differences across a range of lags, fits a line to the log-scaled…
The article explains how to split SPY’s adjusted daily price data into overnight and intraday returns. It defines the overnight leg as holding from one day’s close to the next open, and the intraday leg as holding from the open to that day’s close. Adjusting…
The article demonstrates a spreadsheet-based permutation test for assessing whether an observed market pattern could arise by chance. Its example examines whether Bitcoin returns are unusually high on Tuesdays: daily returns are randomly shuffled, grouped by…
The article builds intuition for option pricing by comparing expiration payoffs with possible underlying prices. Calls pay the amount by which the underlying finishes above the strike, while puts pay the amount by which it finishes below. Before expiration,…
The article introduces rolling and expanding windows through stock-price examples. A rolling window calculates a statistic, such as a mean, over a fixed number of recent observations. As each new observation arrives, the window advances and older data drops…
This introductory article asks whether deep learning can be useful for market forecasting and outlines the practical work involved. A trading researcher must frame the prediction as a suitable task, scale inputs, choose a network structure, tune model and…
The article explains why covariance estimates matter for portfolio risk: pairwise asset covariances combine with portfolio weights to determine portfolio variance. Using adjusted-price returns for SPY, TLT, and GLD, it first compares rolling-window…
The article explains how an autoregressive model predicts the next exchange-rate value from prior observations, then examines whether those predictions could support AUD/USD trades. It discusses partial autocorrelation across several sampling intervals, fits…
The article describes Apache Beam as a framework for building a systematic trading data pipeline. Its outlined workflow collects data from APIs, stores it, transforms and enriches records, calculates features, loads results into an analytical database, and…
The article demonstrates how to retrieve daily stock prices and company financial data through Finnhub’s API, then organize the responses into data frames. It describes the range of available information, including price history, current and historical…
This article explains how to combine overlapping pair spread signals to infer which individual stocks appear rich or cheap relative to peers. Each spread acts as a relative vote; aggregating votes across a network can help distinguish a likely outlier from a…
This walkthrough tests whether a stock’s unadjusted closing share price predicts its return over the following year. It describes preparing adjusted price data while retaining unadjusted closes, trading-volume information, and index membership, then sorting…
This article uses k-means clustering to group daily GBP/JPY candles according to their high, low, and close relative to the open. It examines whether particular candle clusters tend to follow one another and whether returns after each cluster differ. The…
This tutorial builds an adaptive pairs trading example with gold and gold-mining ETF prices. A Kalman filter estimates a changing hedge ratio and intercept as new observations arrive. The prediction error is compared with its estimated standard deviation to…