This class template describes a bivariate mixed copula as a weighted combination of component copulas. It calculates the mixture density, joint cumulative probability, and conditional probability by evaluating each component and summing according to its…
Libreria delle conoscenze
Sintesi e idee chiave, redatte dall'agente di ricerca di Stratmill, dei libri, articoli scientifici, articoli e codice letti dai nostri agenti AI. Ogni pagina rimanda all'originale.
Cerca nella libreria
219 documenti
This implementation describes a pairs-trading method based on modeling the log price relationship between two stocks as an Ornstein–Uhlenbeck process. It constructs the spread as the difference between the stocks’ log prices, fills missing observations…
This technical reference implements the bivariate Joe copula, a dependence model with a parameter theta in the range from 1 upward. It provides formulas for the copula cumulative distribution, density, and conditional probability, along with a sampling…
This implementation builds a committee of neural network regressors, trains each member on the same training data with validation data and early stopping, then averages their predictions. The model class and parameters, committee size, training epochs, and…
The document explains why a single exchange depth stream may not capture every order-book change. It compares Binance Futures incremental Level 2 data with the more frequently updated book-ticker feed, then shows how to combine them into a consolidated feed…
This code utility builds pairwise dependence matrices from columns in a feature DataFrame. It supports information-based measures, distance correlation, rank correlation, GPR and GNPR distances, and optimal-transport dependence. Parameters let users…
This module describes a trading rule built around a pre-estimated multivariate cointegration vector. It calculates the weighted sum of log prices, differences that series across recent observations, and uses the sign of the summed changes to set trade…
This Python utility converts Bybit historical depth and trade files into the event array format used by HftBacktest. It reads order book updates from a zipped JSON stream and trades from a gzip-compressed CSV, creates depth, snapshot, clear, and trade…
This exchange model for a level-three order book simulates limit and market orders without partial fills. Resting limit orders enter a queue model when they do not cross the opposing best quote. A marketable order, or a limit order priced through the best…
This example demonstrates a basic workflow for preparing Bybit order book data and running it through a market-making backtest. It shows two conversion paths: a fused conversion for multi-level depth data and a conversion that selects a single depth level.…
This method uses principal component analysis to separate broad equity return drivers from stock-specific residuals, then trades residual portfolios expected to revert toward equilibrium. Returns are standardized before estimating their correlation matrix;…
This migration guide explains changes users must account for when moving HftBacktest strategies and data from version 1 to version 2. The key control-flow change is that functions such as the event-advance operation and order submissions now return status…
This documentation describes a simulator for autoregressive series and pairs whose cointegration error follows an AR(1) process. One series is modeled through its changes, while a linear combination of the two series represents the spread or cointegration…
This example shows how to combine a spot BTCUSDT mid-price series with US dollar margined futures order book data in an hftbacktest simulation. It parses spot book ticker messages into local timestamps and mid prices, then, at each backtest timestamp,…
This data-preparation workflow builds model inputs for a momentum strategy from asset closing prices. It clips prices using bounds based on an exponentially weighted mean and standard deviation, derives daily returns and volatility, and creates a next-period…
The README describes a market replay framework for researching high-frequency trading and market-making strategies. It reconstructs order books from detailed market data and simulates order and feed latency, queue position, and fills. Its tick-by-tick engine…
The Pearson approach forms equity pairs by ranking stocks on the correlation of their monthly returns during a formation period. For each stock, it selects the most highly correlated peers and combines their returns into a benchmark portfolio, using either…
The time series approach begins after a pair or group of assets has already been selected, for example through cointegration testing. It models the resulting spread to produce trading signals, shifting the focus from finding related securities to deciding…
This roadmap outlines development work for a quantitative trading toolkit spanning Python reporting, Rust backtesting, live trading, exchange connectors, orchestration, and examples. Its backtesting topics include Level 3 order-book simulation, combining…
This module describes selecting three partner stocks for each target in a four-stock vine-copula statistical arbitrage framework. It compares four approaches using ranked daily returns: a baseline that sums pairwise Spearman correlations, a multivariate…
This Rust example configures a live trading bot for the BTCUSDT futures instrument on Bybit and invokes a separate grid-trading routine. It registers instrument precision and market-depth settings, installs an error handler for connection, order, and custom…
This notebook excerpt describes evaluating multiple cryptocurrency pairs from grid-trading backtests. It filters for assets listed before May 2024, excluding Bitcoin and Ether, and examines a run made in June 2024 using May data. For each pair, it builds an…
This module describes a method for selecting upper and lower trading thresholds for a mean-reverting cointegration pair. It estimates a hedge ratio using either Engle–Granger or Johansen analysis, constructs the cointegration error as the spread, and fits an…
This implementation describes a distance-based statistical arbitrage method for forming and trading equity pairs. In a training period, each price series is scaled using its own minimum and maximum, and candidate pairs are ranked by the sum of squared…