This note explains how to read a historical Value at Risk estimate from a sorted sample of profit and loss outcomes. For a stated confidence level, the relevant tail observation is selected from the loss end of the distribution; gains do not become VaR…
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 discusses how to compare Vasicek and Cox–Ingersoll–Ross (CIR) models for fitting zero-rate curves. Rather than judging the models from a single observed curve, it recommends calibrating each across many curves with varied shapes, including flat,…
The document explains why historical share prices in a data series may appear inconsistent with prices remembered from the time. Data vendors may adjust prices and possibly volumes for corporate actions such as stock splits. A split changes the number of…
The discussion questions whether reinforcement learning is useful when a portfolio model is trained on fixed historical prices. In that setup, market states advance independently of the chosen action, and next-period rewards can be deterministic given the…
The document asks how to price a bond with an embedded option in a Black–Derman–Toy short-rate tree when the exercise date does not coincide with a time step. In the aligned case, the tree is built with a fixed step and bond values are rolled backward; at…
The discussion explains how to include cash dividends when calculating an asset’s year-to-date return for performance analysis or backtesting. If dividends are not reinvested, the suggested calculation adds dividends received during the period to the ending…
The document explains how to handle companies that fail during a historical stock study, such as an analysis comparing returns by corporate social responsibility ratings. Its answer recommends defining an investable universe using information available at…
The document considers how to align closing-price histories for indices traded on exchanges with different holidays and weekly schedules. It outlines several treatments for missing observations and explains the trade-offs of each. Keeping only dates shared…
The document asks how to compute an option-value expectation expressed as a path integral. The central practical answer is to use Monte Carlo simulation: generate many possible realizations of the stochastic process and estimate the expectation with a…
The document asks how to estimate execution-price deviations and slippage for stock strategies when only daily OHLCV data is available. The proposed starting point in the question relates the daily high-low range to trading volume, with a restriction on…
The document outlines how to build an equity curve for a two-stock pair-trading backtest. It starts from entry and exit signals, assigns long and short portfolio weights, and estimates share quantities using initial capital and prices at entry. It then…
The document discusses adding a penalty proportional to absolute portfolio changes to a mean–variance objective, while retaining constraints such as long-only holdings and fully invested weights. Its central modeling idea is to represent each position change…
The document considers whether a trader who needs tight spreads should post non-marketable limit orders inside the quoted bid–ask spread instead of crossing it. It explains why the chance and timing of a fill are difficult to estimate in spot foreign…
The document discusses foresight, or look-ahead, bias in least-squares Monte Carlo valuation of American options. In the Longstaff–Schwartz approach, regression on the same simulated paths used for valuation can overfit continuation values and make estimated…
The document asks how to form a confidence interval for a set of long-window moving averages when adjacent values are dependent. The questioner is unsure whether a simple standard deviation based interval is appropriate, given the overlap among observations,…
The discussion asks whether a strategy with many successful trades gives stronger evidence of skill than one with few trades but similar returns. One answer invokes the law of large numbers: as independent observations accumulate, a sample average tends to…
The document describes a portfolio-selection problem: individual strategies can be profitable yet generate trades in bursts, leaving gaps in activity and uneven profit growth. The author wants to combine strategies so that trades and returns are distributed…
The document explores how to include callable bonds in a historical-simulation risk model. For plain bonds, the questioner proposes applying historical changes in the currency zero curve and issuer or rating spreads, then repricing. Callable bonds add…
The discussion addresses a backtest in which a mean-reversion pairs strategy scales positions as the spread moves farther from its mean. Its central recommendation is to track daily profit and loss in currency terms, reflecting the strategy’s actual position…
The document considers how to assess trading-signal performance across instruments, sectors, volatility levels, and combinations of market conditions, while managing a large number of possible segments. One response warns that increasingly fine-grained…
The document outlines a rolling-window procedure for comparing portfolios by out-of-sample variance. At each step, returns within a fixed estimation window are used to construct portfolios; the window then advances by one month, dropping the oldest…
The post attempts to fit a log-periodic power-law model to Kuala Lumpur stock index closing levels from 1991–1994, treating price deviations as possible signs of bubbles and seeking to forecast a recession or crash. It uses a nonlinear least-squares routine…
The note considers how to compare stock ranking models intended to surface candidates for later fundamental analysis. Its central recommendation is to define the predictor and its outcome separately, then test whether the predictor ranks or classifies future…
The document asks how to simulate a mean-reverting Ornstein–Uhlenbeck process driven by a Lévy process. It proposes a basic Euler step: approximate the drift over each time interval using the current process value, then add an increment sampled from the Lévy…