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
45 documents
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 short article uses the long-run nominal growth of US stocks and bonds as a starting point for discussing risk premia. It reports that stocks rose 48,000 times in value and bonds 300 times from 1900 to the article’s present. Its explanation is that…
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 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…
This review surveys research on selecting and trading equity pairs, comparing distance-based matching, cointegration, correlation, and other selection criteria. A common design forms candidate pairs over one period and trades them during a subsequent,…
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…
The article illustrates how a put option can limit downside on an equity holding and shows how the premium changes the portfolio’s payoff. It first models a position in an index-tracking fund, identifying the price level associated with a chosen loss and…
The article explains how to assess candidate equity pairs and estimate a spread for mean-reversion trading. Using XOM and CVX as an example, it fits an ordinary least squares hedge ratio, forms a residual spread, and applies an Augmented Dickey-Fuller test.…
The document explains how the Graphical Lasso estimates a sparse inverse covariance matrix from stock data. After scaling its off-diagonal entries, the method derives partial correlations, which describe the relationship between two stocks while accounting…
This article presents a practical workflow for exploratory research on SPY using QuantConnect. It examines daily return distributions, compares them with a normal distribution, looks for possible calendar and intraday seasonal patterns, and measures return…
The article examines whether US election dates coincide with unusual S&P 500 returns. It describes aligning historical index returns to the nearest election, grouping observations by days before or after election day, and comparing average returns across the…
This article focuses on selecting stock pairs for statistical arbitrage. It argues that finding pairs whose prices reliably diverge and reconverge matters more than the details of hedge-ratio estimation or other implementation models. Historical correlation…
The article presents pairs trading as taking opposite positions in correlated assets when their relative prices diverge, with the expectation that the relationship will move back toward its mean. It questions the routine use of price regression to estimate a…
The article introduces tidy data principles and shows how to represent financial returns in long and wide formats. In tidy form, each column represents a variable, each row an observation, and each cell one value. Its example uses dates, tickers, and…
The article describes a way to lengthen an ETF’s historical price series when the fund has a short trading record. It maps ETFs to earlier mutual-fund or index return series, calculates cumulative returns, and finds the overlap date when the ETF first has a…
The article uses Excel to investigate whether the cyclically adjusted price-to-earnings ratio (CAPE) predicts subsequent real returns on a broad US equity index. It rebuilds a valuation-versus-forward-return scatterplot from historical data, then questions…
The article demonstrates how to compute the rolling average of pairwise stock correlations across S&P 500 constituents in R, then divide the work into overlapping date chunks. The workflow prepares prices and returns, forms stock pairs, calculates rolling…
This tutorial shows how to estimate rolling correlations for every pair of stocks in a universe, then summarize them as a daily mean. It starts by calculating each stock’s daily close-to-close return, joins the return data to itself by date to form ticker…