This notebook assembles a forecasting agent from a language-model client, a search tool, and a bounded turn loop. The agent searches for evidence and returns a binary probability with a rationale. Its response parser handles common formatting failures and…
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
4,510 documents
This notebook describes a workflow for turning S&P 500 companies’ quarterly MD&A disclosures into trading features. It uses filing acceptance dates as the point-in-time anchor, collapses multiple filings for a company on the same date to the latest period,…
This notebook compares three ways to classify financial news sentences as positive, neutral, or negative: TF-IDF word and word-pair features with logistic regression, averaged pretrained GloVe vectors with logistic regression, and a pretrained FinBERT…
This notebook explains how to extract narrative sections from 10-K and 10-Q filings for later text analysis. It maps form-specific item numbers, converts filing HTML while preserving paragraph boundaries, cleans page furniture, and identifies section starts…
This notebook explains how to combine probability forecasts from multiple agents and how to calibrate the resulting probabilities. It presents Neyman extremization, which moves the mean forecast away from a base rate according to panel size and an assumed…
This notebook demonstrates a trade-level diagnostic workflow that links realized failures to a model’s SHAP explanations. It trains a LightGBM model on lagged price and volatility features plus macro inputs to forecast next-session SPY returns. A fixed…
This notebook assembles a research agent that searches for evidence and returns a structured probability for a binary question. It describes action parsing and validation, a turn budget, and a saved forecast artifact that records the rationale and supporting…
This module describes two components in a multi-agent forecasting pipeline. A debate agent alternates between bullish and bearish arguments, requiring each side to address the other’s claims and provide a probability estimate with supporting evidence. It…
This notebook fine-tunes three transformer checkpoints for three-class financial sentence sentiment and compares their accuracy, macro F1, confusion matrices, parameter counts, and training time. It uses a stratified train, validation, and test split of the…
This notebook examines a keyword-based ESG headline pipeline and contrasts its structured classifier output with the requirements a retrieval-augmented generation assistant would need to meet. A first keyword list selects headlines, and a second assigns…
The notebook uses SHAP to explain FinBERT’s three-class financial sentiment probabilities at the token level. It pins a model checkpoint, aligns output labels explicitly, then examines which tokens raise or lower the predicted class probability for several…
This notebook builds a forecasting agent that alternates between reasoning and actions in a ReAct loop. Its action space is deliberately small: the agent can search for evidence or submit a probability forecast. A shared two-method interface lets the loop…
This guide introduces the public CFTC Commitment of Traders reports as a source of weekly futures positioning data. It distinguishes the Traders in Financial Futures report, which categorizes participants such as dealers, asset managers, and leveraged money,…
This chapter presents retrieval-augmented generation as a way to make language models more useful for open-ended financial research, where unsupported claims and hallucinations can be costly. It walks through the system from document ingestion and…
The document explains how to retrieve weekly CFTC Commitment of Traders data for selected futures products and save each product’s history as a Parquet file. COT reports capture Tuesday positioning and are released on Friday; trader categories vary between…
The paper examines how Bitcoin returns and volatility relate to Google Trends attention. It distinguishes attention focused specifically on cryptocurrency from a broader uncertainty measure constructed from Google search data. The reported findings do not…
The study asks whether diversity among language model families persists in trading after agents are selected into submitting orders. In synthetic markets containing a fixed mixture of three model families, different presentations of news alter which families…
The document presents an analytically tractable stochastic model of stock dynamics that switches between healthy and distressed regimes. It uses this framework to connect realized credit default swap spreads with expected stock returns, treating spreads as a…
The paper tests whether Google search activity can help predict which S&P 100 stocks will outperform the index median the next day. It combines lagged financial variables with search query volumes and trains gradient boosted decision trees to classify those…
FedNLP is presented as a multi-component natural language processing system for examining Federal Reserve communications, which can be lengthy and difficult to interpret. It combines methods ranging from traditional machine learning to deep neural networks…
The document describes a model for analyzing price movements in terms of effective forces associated with trend-following and trend-adverse traders. Its purpose is to infer which type of behavior is prevailing over a chosen interval, rather than to prescribe…
This paper studies whether trading signals expressed in cryptocurrency influencers' and news outlets' Twitter posts are associated with market prices. Large language models identify buy and non-buy signals in posts, which are then compared with prices for…
This analysis examines the May 2022 failure of the Terra project, focusing on the relationship between TerraUSD, Luna, and the Anchor protocol. It reviews news from varied social media sources to organize the events surrounding the collapse, then uses hourly…
This study examines whether central-bank policy narratives help explain Bitcoin returns, separating market expectations from realized policy actions. It constructs a weekly Monetary Policy Expectations index by using a large language model to classify market…