The document examines whether cross-validation prevents backtest overfitting. It contrasts a common concern about repeatedly applying holdout tests with the claim that results should instead report the average out-of-sample performance across all trials. The…
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
16,761 documents
The document considers a one-sided strategy that repeatedly places buy and sell orders at price levels determined by step counts in a geometric random walk. The question asks how to choose those levels to maximize expected profit over a fixed horizon, but…
The document asks how to assess the accuracy of SABR implied volatility surfaces for a chosen equity index and historical period. Its proposed approach is to calibrate SABR, obtain the model’s implied volatilities, and compare them with historical volatility…
The post describes an attempted infinite-horizon Avellaneda–Stoikov market-making implementation. It gives a nonlinear equation for an inventory value function, with an inventory penalty, bid and ask arrival rates, fill-decay parameters, and maker rebates or…
The document raises a question about the Kupiec unconditional coverage test for value at risk (VaR). It describes counting exceptions over a backtest of a given number of days and comparing the observed count with a binomial distribution parameterized by the…
The document explains how to revalue an existing SOFR overnight index swap using a curve built from market quotes on a later valuation date. Rebuilding a curve and pricing engine alone does not update the index and cash flows already embedded in the swap. A…
The document considers VaR forecasts made monthly for losses through a fixed calendar year-end. Because each forecast covers a different, overlapping interval, a single late-year market decline can breach several forecasts, making the breach indicators…
The document explains how to express a joint hypothesis about selected regression coefficients as a linear restriction. For a regression coefficient vector, a general F-test restriction takes the form of a matrix multiplying that vector and equaling a target…
The document compares the analytical mean of the Vasicek short-rate model with a Monte Carlo estimate built by stepping rates forward over a time grid. Its initial update formula includes the mean-reversion drift and a Gaussian shock scaled by volatility and…
The discussion asks whether a historical VaR can legitimately be positive when a bond portfolio’s total return index rises throughout the observed sample. One response says the main weakness is likely the calibration window: a short history may contain no…
The document discusses using language models to assist with data cleaning and backtesting, focusing on the difficulty of verifying research logic. Its example is a rolling signal intended to use observations through the prior period; generated code…
The document considers whether bootstrap resampling can create useful alternate histories for tuning trading-system parameters such as moving-average windows and entry or exit thresholds. Its answer emphasizes controlling overfitting through structured…
The document raises a methodological question about directly optimizing a trading rule or neural network with negative Sharpe ratio as its loss. The author sees a clear use in portfolio optimization but questions its behavior for a single asset with bounded…
The discussion considers how to judge algorithm performance when strategies have different returns and Sharpe ratios across instruments. It argues that Sharpe alone is incomplete: it relates excess return to total return variability, but a high value can be…
The document asks whether the strength of a technical indicator, such as RSI, can be converted into a probability that an asset will move in a given direction. The answer cautions that indicator readings alone do not supply a calibrated likelihood. A model…
The document considers how to build continuous futures price histories for a multi-market backtest. The questioner describes using backward Panama adjustment, rolling when open interest switches, and selecting the first listed contract across a diverse set…
The document investigates why simulated GARCH(1,1) returns can have sample kurtosis well below a theoretical population value. The explanation centers on highly persistent squared returns and the possibility of rare, very large volatility shocks. When the…
The document addresses how to generate correlated Wiener processes for geometric Brownian motion simulations from a specified correlation matrix. The reported problem is that one simulated process has unexpectedly low volatility despite a high target…
This discussion outlines possible reasons a value-at-risk estimate may be too high or too low when evaluated against later portfolio outcomes. It emphasizes that VaR depends on the assumed distribution and method, and that in-sample market behavior may…
The document asks where to obtain a downloadable record of S&P 500 membership over past years for backtesting. It highlights the need to know which tickers belonged to the index at a specified historical point, rather than relying only on its current…
A margin of conservatism is an additional buffer in a model estimate intended to address uncertainty, deficiencies, or risks. The document notes that there is no single rigorous mathematical definition: the meaning and required size depend on the model, the…
The document answers which market capitalization to use when calculating a value-weighted portfolio return for a period. When securities are selected or the portfolio is formed at the start of the month, the starting market capitalizations provide the…
The document asks how to calculate a daily percentage return for a position that is long one stock and short a scaled amount of another. It presents two candidate expressions: one subtracts the scaled log return of the short asset from the long asset’s log…
The document asks how to test whether a pairs trading strategy has predictive power, and whether detrending methods used for other trading systems apply when the traded signal is already a linear combination of two price series. The answers outline two…