The document derives a rough out-of-sample observation length for testing whether a strategy’s mean return exceeds zero. Assuming independent, identically distributed returns, it models the sample mean’s uncertainty as the return standard deviation divided…
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 asks why volatility models used to estimate Value at Risk may pass a backtest at a 5% confidence tail while failing at a 1% tail. The response says this pattern is common: as the tail becomes more extreme, the assumed return distribution matters…
The document asks for free software to price high-dimensional American basket options under the Black–Scholes model using the Longstaff–Schwartz, or least squares Monte Carlo, method. It seeks control over the number of basis functions, simulation paths, and…
This note describes a numerical approach to pricing European and American options under Kou’s double-exponential jump-diffusion model. The implementation uses a Crank-Nicolson time scheme for the partial integro-differential equation, a nonuniform spatial…
This note outlines a transformation of the Black-Scholes option-pricing equation into a diffusion equation, then asks how to simulate the transformed PDE numerically. It gives the variable substitutions, the resulting heat-equation form, and a transformed…
The document answers whether Python trading libraries can support forex strategies. It describes three routes: combine plotting tools with a broker's REST API, use a backtesting framework that accepts OHLC data regardless of instrument, or run Zipline…
The document asks about obtaining long historical daily price series across thousands of instruments and several asset classes. The response says that paid vendors do offer historical datasets, but that assembling prices is only part of the task. Data…
The document poses an idealized optimization problem: given the historical prices of a small set of assets over a fixed interval, find the sequence of trades that maximizes terminal wealth from an initial cash amount. The investor may hold up to a limited…
The discussion explains why corporate actions can distort daily returns when a price series is adjusted incorrectly. A stock split should be reflected consistently across historical prices; a discontinuity caused by a mismatched close and adjusted close can…
The document describes how to combine three asset return series into a portfolio index with fixed weights of 50%, 25%, and 25%. It recommends calculating each asset's simple percentage return, taking the weighted sum at each time step, adding one to obtain…
The document explains how to calculate portfolio drawdowns from cumulative returns and find both the deepest decline from a prior peak and the longest period spent below a peak. It identifies a common pandas indexing error: integer access can fail when a…
The document asks whether annualized Sharpe ratios for separate years are enough to calculate a Sharpe ratio across the full period. It explains that, in general, they are not: the ratios alone do not specify the return means, volatilities, or dependence…
The document outlines a proposed historical equity backtest that starts with a total-market portfolio weighted by free-float market capitalization in a chosen year. It would then track that initial set of holdings over later years, reinvesting dividends…
The document considers how to choose two strategy parameters from an in-sample grid using Sharpe ratio, Sortino ratio, and maximum drawdown. Its central lesson is to assess the pattern across nearby parameter settings rather than automatically selecting the…
The post asks how to maximize a portfolio return metric computed by a large R function with one bounded input parameter. The parameter is restricted to a range from 1.0 to 1.5, starts at 1.25, and only needs precision to increments of 0.05. The author…
The document asks how to optimize an automated trading strategy when higher expectancy coincides with sharply fewer trades. It also notes that maximum drawdown appears to improve as trade counts fall, making it difficult to judge whether performance gains…
This document asks why a 15-period binomial model gives an unexpected value for an American put under specified Black–Scholes assumptions. It does not provide a corrected price or a specific diagnosis. Instead, the response offers a general debugging…
The document considers when net income and operating cash flow can legitimately enter a backtest that trades around quarterly reports. Its key principle is to use information only after it became public. An earnings date may identify a press release, but…
The document presents a time-series modeling problem: an ARFIMA(12,0,12) mean with an eGARCH volatility specification produces plausible one-step forecasts on a sample of 2,000 observations, but extreme mean and variance forecasts after fitting the same…
This discussion examines why a return calculated from an adjusted share-price series may differ from a reported total shareholder return with dividends reinvested. It explains that a total-return series is a constructed price history: dividends are treated…
The document considers a process formed by summing the squares of several Brownian motions and derives its stochastic differential using Itô's formula. It then presents a simulation that accumulates the Brownian increments and the corresponding drift, asking…
The document presents a slow nested-loop implementation for pricing European calls, Asian options, digital calls, and up-and-in barrier calls under the Merton jump-diffusion model. It motivates the problem as a comparison with the exponential variance-gamma…
The document asks how computational cost scales for standard mean-variance portfolio optimization, whether minimum-variance portfolios are easier, and what runtimes or faster alternatives to expect. It characterizes MVO as a quadratic program and gives a…
The document considers how much historical data to use when monthly portfolio rebalancing is based on Sharpe-ratio or mean-variance optimization. It does not identify a universally suitable window. One response emphasizes that expected returns and volatility…