The document asks how to simulate the Cox–Ingersoll–Ross (CIR) variance process efficiently on a GPU in MATLAB. It presents a nonnegative Euler discretization, where each step uses the prior variance, mean reversion, and a Brownian shock, then clips negative…
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
Corporate actions such as splits, dividends, and mergers can create discontinuities in historical price series. The document explains that split adjustments can be applied with multiplicative factors, while cash dividends require additive adjustments.…
The document asks how to estimate Expected Shortfall (ES) from a return series using the block maxima approach in Extreme Value Theory. It contrasts that question with a peaks-over-threshold formula based on Generalized Pareto Distribution parameters and…
The document considers how to choose buy, sell, or hold actions from historical stock data while accounting for transaction costs, bid-ask spread, and slippage. It cautions that the problem cannot be judged by the apparent size of its search space alone: a…
The document describes the Kupiec proportion-of-failures test for evaluating unconditional coverage of a Value at Risk model. The test compares the observed fraction of violations with the model’s target violation probability over a sample. It raises the…
The document discusses how to approximate a sell execution price when backtesting with one-minute OHLC bars. It offers simple proxies: the bar close as a representative price, the low as a conservative scenario, or the mean of the four OHLC values. The…
The document clarifies how to interpret the statistic returned by an automatic variance ratio test applied to financial returns. The null hypothesis is that returns are serially uncorrelated, corresponding to a variance ratio of one; the alternative is…
The document discusses how to assemble futures data for regressions that forecast monthly Brent spot prices at several future horizons. Its model uses the futures quote available at time t for a maturity matching the forecast horizon, alongside other…
The discussion clarifies how to simulate an oil spot price trajectory when starting from observed market data. For each simulated path, the first simulated value uses the actual starting spot price; subsequent values should be generated recursively from the…
The document considers ways to obtain historical S&P 500 options data when a researcher has WRDS access but lacks direct access to OptionMetrics. Suggested routes include checking whether faculty or other university researchers can share institutional…
The document considers adapting Longstaff–Schwartz Monte Carlo to a put that can be exercised at several discrete dates. It describes simulating geometric Brownian motion paths, estimating continuation values by regressing discounted future payoffs on a…
The document discusses how to evaluate a stock-sorting strategy whose portfolio returns appear to have different Fama–French three-factor alphas. It recommends using Newey–West standard errors to account for autocorrelation and heteroskedasticity, and…
The document describes challenges in estimating value at risk and conditional value at risk from high-frequency strategy returns. At short sampling intervals, returns may be heavy-tailed and discrete, while periods with no open position create many zero…
The document investigates why a QuantLib piecewise yield-curve example produces zero rates different from those shown in its teaching slides. The reported output from the copied code is substantially lower than the slide values, despite using the same…
The document asks where to find historical order-level data, including orders and their final statuses or execution reports, to test a trading system that processes FIX orders through limit order books and auction or continuous sessions. It points to two…
The document gives a recursive method for simulating portfolio value when an initial lump sum is combined with periodic investments. At each step, add the contribution arriving during that period to the previous portfolio value, then apply the next period’s…
The document shows how to turn daily stock probability rankings into an equal-weighted portfolio that holds the five highest-ranked names and rebalances every ten days. The example uses a table of dates, stock names, returns, and model probabilities. The…
The document considers how to build a total return time series for interest rate swaps, including market-value changes and carry or roll, for use in trend-following research. One suggested route is to use an existing swap total-return index if accessible.…
The document poses a question about interpreting an ordinary least squares regression of a stock’s three-month holding-period returns on the ten-year Treasury yield. It uses a hypothetical coefficient to illustrate how a change in yields would be associated…
The document explains why reading a single SOFR fixing at a coupon date does not reproduce the rate paid on a compounded-in-arrears SOFR bond. A floating-rate coupon based on term rates uses one fixing near the period start, while an overnight SOFR coupon…
The document raises a preprocessing question about a minute-bar time series with a small fraction of missing values, where timestamps exist for every minute between the endpoints. It considers replacing missing observations with a rolling mean or median, or…
The document considers how to create yield-to-maturity data for testing curve-fitting methods such as Nelson–Siegel and cubic splines. Its central caution is that independently randomized yields can produce curves that violate no-arbitrage relationships,…
The discussion compares approaches to simulating the Heston stochastic volatility model, prompted by a moment-matching method that can fail when volatility of volatility is large and the Feller condition is strongly violated. In that method, equations for…
The document describes the inputs needed for periodic portfolio rebalancing: current weights, updated expected returns or alpha forecasts, forecast uncertainty, transaction costs, risk aversion, objective function, and portfolio constraints. Its central…