This notebook describes a stochastic discount factor (SDF) model for pricing the cross-section of US firm returns. Instead of first estimating factors and then applying them, it directly learns firm-month weights under a no-arbitrage condition: discounted…
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
5,018 documents
This notebook presents a deployment bridge between an offline machine-learning pipeline and QuantConnect's LEAN trading engine. It selects a model run reproducibly from a registry, exports its holdout predictions as date-indexed JSON, and uses a small…
This document describes fitting temporal convolutional networks to NASDAQ 100 minute level microstructure features. Causal convolutions prevent a prediction from using later observations, while dilation lets successive layers capture patterns over multiple…
This notebook specifies and executes a double machine learning analysis of the effect of the variance risk premium on short-option returns through expiry. Before execution, it resolves the treatment, outcome, confounders, timing, nuisance model, temporal…
This analysis compares predictions from several model families trained on monthly US stock characteristics to forecast next-month returns. It focuses on cross-sectional information coefficient, which measures how well a model ranks stocks within each month.…
This case study fits regularized linear models to returns from short at-the-money straddles held to expiry. The trade collects call and put premiums, giving it a capped maximum gain but potentially very large losses when the underlying moves sharply.…
The document explains how an experiment registry can track a model from its training configuration through predictions to backtest results. Each stage receives an identifier derived from a canonicalized specification, allowing repeated identical runs to…
This notebook compares methods for discovering relationships among a panel of ETF returns: NOTEARS for contemporaneous linear directed acyclic graphs, VAR-LiNGAM for lagged and instantaneous structure, PCMCI for conditional-independence links, and Granger…
This notebook demonstrates tuning LightGBM hyperparameters with Optuna's TPE sampler, using cross-sectional information coefficient as the objective. It combines early stopping to choose the number of boosting rounds with a custom pruning callback that…
This chapter presents portfolio construction as the process of converting return forecasts, risk estimates, and constraints into weights, leverage, and rebalancing decisions. It lays out a research workflow for documenting allocator choices, avoiding…
This notebook studies how ridge, lasso, and elastic net behave when a crypto perpetuals feature matrix measures one economic quantity—the premium—many different ways. Premium levels, changes, volatility, standardized positions, ranks, and related funding…
This notebook brings together five latent-factor approaches for modeling the S&P 500 options case study’s equity return cross-section. PCA estimates common movements from returns alone; IPCA maps characteristics to exposures linearly; a conditional…
This notebook develops a two-model exit policy for hourly crypto perpetuals. An entry classifier identifies unusually strong forward returns, while an exit classifier predicts whether the next forward return will be negative. The exit model receives…
This notebook explains a supervised autoencoder for predicting the direction of future US equity returns across multiple horizons. Its encoder feeds a reconstruction decoder, an auxiliary classifier, and a main classifier. Joint training combines…
This notebook builds a portfolio allocator that places a Temporal Fusion Transformer-style variable-selection network before an LSTM encoder. The selection network embeds each input feature separately and assigns softmax weights, allowing the model to vary…
This notebook describes a TabM workflow for foreign-exchange pair models. TabM applies a small neural network to each decision row rather than treating the observations as a sequence. The notebook takes architecture and checkpoint schedules from…
This document presents a cross-market inventory of model-based feature artifacts from nine case studies. It reads parquet schemas rather than loading their rows, excludes identifier columns, counts feature columns, and groups names by tokens associated with…
This document reframes a five-session equity return prediction by sampling daily data on Fridays. The label remains a five-session return, but on the weekly grid it spans about one model step. The notebook compares direct regression, using a fixed lookback…
This document describes refitting the configuration selected by earlier validation stages on all eligible pre-2021 history, then generating predictions for the 2021 holdout. It derives the training interval from the declared evaluation window, label buffer,…
This notebook evaluates gradient-boosted trees on equity option analytics, where features such as implied volatility, skew, term structure, and variance risk premium encode market expectations. It asks whether a nonlinear model can combine those forecasts…
This notebook tests whether gradient-boosted trees improve cross-sectional ranking across currency pairs beyond a penalized linear model. The FX universe contains pairs sharing currencies, so observations are dependent: a move in one currency affects…
This utility module supports deep learning workflows for financial time series across multiple assets. It resolves dataset aliases and loads canonical case study data, then creates sliding-window sequences independently for each symbol. The sequence…
This notebook compares two locally run, open-weight embedding models on passages from recent 10-K filings and a fixed set of financial research queries. It builds two-sentence passages, embeds the same documents and queries with each model, and evaluates…
This notebook compares three ways to orchestrate a four-phase forecasting workflow: direct composition in Python, a role-prompted CrewAI version, and a LangGraph version that delegates to the same specialist classes as the native implementation. It examines…