This strategy turns changes in a spread series into long and short entry thresholds. It separates historical spread changes into positive and negative values, then calculates a chosen upper quantile of positive changes and a lower quantile of negative…
Biblioteka wiedzy
Podsumowania i najważniejsze idee z książek, publikacji naukowych, artykułów i kodu czytanych przez naszych agentów AI, przygotowane przez agenta badawczego Stratmill. Każda strona zawiera link do oryginału.
Przeszukaj bibliotekę
Liczba dokumentów: 219
This strategy forecasts the future value of a spread between cointegrated assets, then compares the forecast with the current spread to generate trades. The document describes three approaches: trading predicted spread returns directly, following spread…
This document describes a bivariate Frank copula implementation for modeling dependence between two uniform variables. It provides methods to sample paired observations, calculate the copula density and cumulative distribution, and evaluate a conditional…
This guide explains how unit-root and cointegration tests can help identify mean-reverting combinations of asset prices. It presents the Augmented Dickey–Fuller test as a test of whether price changes depend on the current level, and relates the estimated…
This document explains a method for selecting profit-taking and stop-loss boundaries for a mean-reversion strategy modeled with an Ornstein–Uhlenbeck process. A position is closed when it reaches either boundary or when its maximum holding horizon expires.…
This module describes ways to select groups of stocks for vine copula analysis, a component of a statistical arbitrage approach. It starts from price histories, calculates daily returns and ranked returns, and narrows candidate partners for each target stock…
The document defines interfaces for a backtesting system that processes historical market events and order interactions. A local processor can submit, modify, and cancel orders, expose positions and state values, report market depth and recent trades, and…
This guide explains how to prepare tick-by-tick trades and full order-book updates for HftBacktest, noting that this level of historical data is not commonly available for free in the way daily bars are. For Binance Futures, it describes collecting raw feed…
The document explains why a high-frequency trading backtest should account for delays between exchange activity and a trader’s system. It separates latency into feed latency, order-entry latency, and order-response latency, distinguishing when market data…
This tutorial develops a market-making approach that estimates a futures contract’s fair price from spot-market returns. Its basic arbitrage pricing theory relationship assumes futures and spot returns move one-for-one with no intercept; the strategy uses…
The document outlines safeguards for cryptocurrency futures trading during sharp market moves and delayed updates. It recommends monitoring the gap between a futures contract and its underlying spot price, and between last price and mark price, as signs that…
This Rust component connects to a Bybit public WebSocket stream and converts incoming order book and public trade messages into internal live feed events. It subscribes to several order book depth levels and public trades for requested symbols, parses bid…
This tutorial illustrates how combining assets or strategies can smooth portfolio returns and raise the portfolio Sharpe ratio, even when individual components have weak risk-adjusted performance. It generates synthetic return series, builds equal-weight…
This code describes queue position models for estimating when a simulated limit order may fill. The conservative model starts with the displayed quantity ahead at the order’s price and advances only as trades occur there. A probability based alternative also…
This module describes two ways to estimate hedge ratios from security price data. Ordinary least squares (OLS) treats one selected asset as the dependent variable and fits coefficients for the remaining assets, optionally including an intercept. It returns…
This note proposes a short-term Chinese equity screen that selects stocks with a price amplitude above one, an appearance on the prior day's trading list with buying greater than selling, and a rising DEA indicator. The rationale is to combine elevated…
The document describes an optimal transport measure that compares the empirical dependence between two data series with a chosen target copula. It first converts paired observations to ranked uniform values, then measures transport distances from that…
This document describes an analytical method for choosing entry and exit levels in a statistical arbitrage strategy whose log price follows an exponential Ornstein–Uhlenbeck process. The trade cycle runs from an entry level to an exit level and back to the…
This reference explains how information theory can measure dependence between variables, including asset returns. It introduces entropy as uncertainty, then defines mutual information as the reduction in uncertainty about one variable from observing another.…
The introduction frames pairs trading as a way to create a mean-reverting portfolio by holding one risky asset and shorting another correlated or co-moving asset. Such a spread may offer statistical arbitrage opportunities, but the central challenge is…
This document describes a data-conversion workflow for preparing Hyperliquid market feeds for HftBacktest. It reads timestamped stream records, handles trade and level-two book messages, and converts them into typed depth and trade events using configurable…
This document describes a class for applying an exponential Ornstein–Uhlenbeck model to mean-reverting portfolio prices. It inherits fitting and portfolio construction from an OU model, then works in log-price space to estimate optimal liquidation levels,…
The Rust module outlines a connector for Binance USD-M futures that combines market data subscriptions, user account updates, and order management. It reads connection and credential settings from configuration, tracks registered symbols, and starts…
The document explains how to form and evaluate long-short stock portfolios, focusing on pairs trading. It compares hedge-ratio methods: ordinary least squares minimizes portfolio variance under a correlated random-walk and Gaussian framework, while total…