This notebook demonstrates training a generative adversarial network on daily ETF features with differential privacy. It introduces the privacy guarantee and budget, then uses Opacus to clip each sample's discriminator gradient before aggregating gradients…
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
715 documents
This notebook applies TabM, a weight-sharing neural ensemble, to stock-return targets built from equity-option features. Its members use a common two-layer network backbone, with separate activation scaling vectors and output heads whose predictions are…
This notebook explains how to construct forward price-return labels for an eight-hourly crypto perpetuals panel. It shifts bar-open timestamps to the time completed-bar data becomes available, then calculates future returns on the contract price series…
This chapter surveys ways to generate synthetic financial data and how to decide whether the output is useful. It starts from the limited number of realized market paths and the risk that repeated strategy searches inflate apparent backtest performance. It…
This notebook declares and runs a double machine learning analysis of the variance risk premium’s effect on S&P 500 option returns to expiry. It makes the estimand, observed timing, confounders, temporal cross-validation setup, nuisance model, HAC covariance…
This notebook applies TabM to a flat table of US stock features, positioning it between penalized linear models and tree ensembles. Each ensemble member shares a neural network backbone but has its own scaling vector and output layer; averaging member…
This notebook describes a supervised autoencoder that compresses ETF feature rows into a low-dimensional representation and predicts forward returns directly from that representation. Unlike a conditional autoencoder, it does not assume that returns arise…
This notebook fits ridge, lasso and elastic-net models to a broad set of established US stock characteristics, including value, profitability, investment, momentum, size, risk and liquidity measures. It evaluates raw monthly returns, a cross-sectionally…
This analysis compares registered ETF prediction models across several families on a shared cross-asset panel. It evaluates how well each model ranks funds by subsequent returns using information coefficients, examines confidence intervals and fold-level…
This analysis applies correlation-based principal component analysis to returns from sector exchange-traded funds. Standardizing returns before decomposition gives each sector unit variance, so the leading components describe co-movement rather than being…
This utility computes selection-bias and performance uncertainty metrics for groups of strategy backtests. It forms cohorts at family, stage-and-label, and label granularity, then calculates measures including deflated Sharpe ratios, effective trial counts,…
This document describes implementation principles for a shared backtest runner and focuses on interpreting return grids correctly when annualizing performance. It estimates the observed sampling frequency from typical gaps between return observations,…
This document presents a supervised autoencoder as a control for conditional latent-factor models. It maps firm characteristics directly to forward returns while compressing 57 inputs through a narrow bottleneck. Comparing it with a conditional autoencoder…
This notebook explains how stock splits and cash dividends disrupt raw historical price series and distort calculated returns. It demonstrates backward adjustment, in which historical prices are rescaled for subsequent corporate actions, and applies the…
This notebook uses ETF features and forward returns to demonstrate classical ordinary least squares inference before turning to prediction-focused methods. It examines coefficient tests and standard errors, then diagnoses heteroscedasticity, residual…
This experiment combines validation predictions from a gradient-boosted tree model, a tabular neural network, and a latent-factor model for monthly ETF ranking. It first standardizes predictions cross-sectionally with z-scores, then averages them. The…
This document presents shared methods for generating fitted-model features without using future observations. For hidden Markov models, it distinguishes filtered state probabilities, based on observations up to the current time, from smoothed probabilities…
This document describes a walk-forward method for turning prediction residuals into per-entity uncertainty widths used to size positions. At each decision time, calibration uses residuals that have had time to resolve, with a lag based on the prediction…
This case study selects one configuration from a frozen pool of crypto perpetual futures strategies spanning multiple return and direction labels, portfolio sizing methods, and risk overlays. It chooses the highest validation Sharpe, then examines…
This guide describes public factor return datasets from the Ken French Data Library and AQR, including market, size, value, profitability, investment, momentum, quality, and low-beta factors. It explains how to download and load monthly or daily…
This notebook uses double machine learning to estimate whether deviations in perpetual-futures premiums relate to subsequent eight-hour returns, and whether the estimated relationship differs between high- and low-volatility markets. It describes a panel…
This notebook presents PCMCI as a way to discover lagged relationships in multivariate financial time series without specifying a causal graph in advance. It applies the method to ETF and volatility-index returns, compares its conditional analysis with…
This notebook explains how to evaluate probability forecasts and govern a forecasting pipeline. It compares Brier and log scores, expected calibration error, and sharpness; shows how reliability diagrams reveal where forecasts are over- or under-confident;…
This study tests whether the poor fit of a linear model to monthly US stock returns comes from its squared-error objective. It holds the unwinsorized forward-return target, features, and walk-forward folds fixed while comparing boosted tree models trained…