This implementation describes a bivariate Student-t copula for modeling dependence between two variables represented by uniform pseudo-observations. It explains sampling from a correlated Student-t distribution, evaluating copula density and cumulative…
Бібліотека знань
Огляди й ключові ідеї книжок, наукових праць, статей і коду, які читають наші ШІ-агенти. Їх підготував дослідницький агент Stratmill. На кожній сторінці є посилання на оригінал.
Пошук у бібліотеці
Документів: 219
This document explains copula-based measures for comparing financial return series by separating marginal distributions from dependence. It presents Spearman’s rho as a rank-based dependence measure and contrasts it with Pearson correlation, which captures…
This document extends a cointegration-based spread strategy from pairs to three or more assets. It forms a weighted combination of log prices using a cointegration vector, then derives a spread return from the same weights. Under stated stationarity…
This code implements a bivariate Gumbel copula for representing dependence between two uniform variables. It provides methods to generate paired samples from independent uniform inputs, calculate the copula density and cumulative distribution, and evaluate a…
This document describes a latency interface for high-frequency trading backtests, separating the delay from submitting an order to exchange processing from the delay between exchange processing and receiving a response. A constant model assigns fixed values…
Threshold autoregression (TAR) extends a standard unit-root test to allow a series to adjust differently depending on whether it is above or below a threshold. The document illustrates the idea with the gasoline crack spread, defined as unleaded gasoline…
The document presents a simplified high-frequency grid market-making approach inspired by GLFT. Rather than dynamically estimating order-arrival intensity to set spreads and skew, it uses recent price volatility to determine quote distance. Inventory is…
The document describes processing Bybit’s compressed raw feed files into event data compatible with a high-frequency backtesting system. It handles order book snapshots and updates, as well as public trades, and offers two approaches: combine multiple book…
This experiment runner configures repeated, rolling train-and-test evaluations for LSTM and Temporal Fusion Transformer models on a multi-asset Quandl dataset. It offers variants with different input sequence lengths and optional changepoint feature…
The document describes a bivariate Clayton copula as a way to model dependence between two uniform variables. It provides methods to generate dependent pairs from independent uniform draws, calculate the copula density and cumulative distribution, and…
This documentation describes a function for estimating the half-life of a mean-reverting process under an Ornstein-Uhlenbeck assumption. The model represents changes in a variable as a pull toward a level, plus Gaussian noise. The half-life is a way to…
This implementation describes an equity pairs strategy that selects stocks with highly correlated historical returns, then compares each stock’s return with a portfolio of its selected peers. It estimates a regression coefficient during a formation period…
This document describes a backtest reporting framework that computes metrics over a full record and, optionally, across daily, hourly, or monthly partitions. Metric classes can be instantiated with relevant supplied parameters, then receive the record and a…
This stock-screening note selects companies in the beverage and alcohol import-export industry, requiring daily turnover between 3% and 12% and displayed best-bid volume greater than best-ask volume. It characterizes the turnover range as a liquidity filter…
This guide explains why futures contracts for the same underlying can have different prices at successive expiries. It defines contango and backwardation and links the price gap to carrying costs such as financing, dividends, or storage. Because a continuous…
The document presents a literature-search workflow for financial machine learning and quantitative finance, where relevant work may be spread across econometrics, machine learning, and other fields. It describes using a paper-mapping service to find related…
This module generates synthetic pairs whose relationship is defined by a hedge ratio and a mean-reverting cointegration error. It first simulates the change in one asset’s price as an autoregressive process, cumulatively sums those changes into a price…
This reference explains two utilities for copula-based trading research: a linearly interpolated empirical cumulative distribution function (ECDF), and a quick selector for candidate pairs. A standard empirical CDF is a step function, which can map sparse…
This tutorial demonstrates how to inspect market depth and trade flow in an event-driven backtest. It first reads the nearest visible bid and ask levels, then shows a region-of-interest vector representation that limits depth access to a configured price…
This module supports copula analysis by mapping observations to marginal empirical cumulative probabilities, with optional linear interpolation and probability bounds. It provides a multivariate row-wise transform, fits a supplied copula to two series after…
The document presents a market-depth implementation that stores bid and ask quantities by integer price ticks in ordered B-tree maps. It tracks the best bid and ask, converts prices to ticks using a configured tick size, and filters near-zero quantities…
This module describes calendar rules for rolling several futures series: crude oil, NBP natural gas, refined products including RBOB, grains, and ethanol. The rules use contract-specific termination conventions, such as dates near the 25th or 15th of a…
Hedge ratios set the relative sizes of legs in a spread so that price differences do not leave the position unintentionally unbalanced in dollar terms. The document introduces a simple price-ratio method, then describes normalizing weights so the dependent…
This method adapts mean-reversion pairs trading to the risk that a spread shift reflects a lasting structural change rather than a temporary deviation. It models the pair spread as having two Markov-switching states, each with its own mean and volatility,…