This document describes a backtest framework for recurring fixed-amount purchases on daily, weekly, or monthly schedules. The schedule determines when to buy within a selected date range; each purchase converts the specified cash amount into units at the…
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,922 documents
This example shows how to construct a changing equity universe from a downloaded file that maps dates to ticker lists. The algorithm parses each row into a date and US equity symbols, then uses the symbols for that date as its coarse universe selection. Fine…
QuantumGridAllocator is a Hummingbot controller that manages grid executors across configured crypto assets. It calculates the portfolio’s actual and target allocations, treating the quote asset as the unallocated remainder, and validates that configured…
This module applies the Double Seven mean-reversion approach across a portfolio of ETFs or other symbols. For each asset, it buys when the close equals the rolling period low, provided a 200-day regime filter is positive unless that filter is disabled. It…
This document outlines a periodic buying method that adjusts purchases according to the difference between current holdings and a rising target portfolio value. At each weekly step, the target value increases by a fixed contribution amount. The script…
This example demonstrates applying a volume-share slippage model to a stock portfolio selected from an ETF’s constituents. The model is configured to limit fills to a fraction of historical trading volume and apply a specified market impact. The universe…
The Global Equities Momentum approach allocates among U.S. stocks, international stocks, and U.S. aggregate bonds. Each month, it compares the trailing 12-month performance of the two equity markets and selects the stronger one, provided U.S. stocks have…
This QuantConnect example shows how to send portfolio targets to Numerai Signals on a daily schedule. It builds a universe from the constituents of a broad US equity ETF, keeps track of eligible securities, and submits targets before each trading day. The…
This utility tracks the combined marked-to-market change in account value for pairs of exchange accounts. Users provide an even number of exchange connections; each adjacent pair appears as a series in a chart and as rows in a status table. Initial balances…
This document outlines a simple recurring Bitcoin purchase simulation. At each fixed interval, it spends a preset amount of currency to buy BTC at the observed latest price, accumulates the purchased quantity, and compares the holding’s current market value…
The document defines price-to-book as closing price divided by book value per share, with book value per share calculated from total assets less total liabilities, divided by common shares outstanding. It implements this measure as a pipeline factor using…
This spot strategy repeatedly rebalances one cryptocurrency toward a target share of account value. When the asset’s share moves below the target by a configured adjustment threshold, it places a buy order; when the share moves above the target threshold, it…
This document describes a single-coin spot strategy that repeatedly returns the portfolio toward a target coin allocation. When the coin’s share of account value moves below the target by a set adjustment band, the bot places a buy order; when it moves above…
This QuantConnect example shows how framework components can be assembled into an options algorithm. Its universe model filters for weekly puts near the money with expirations within a short date window, and calls a user-provided selector daily to choose the…
This document presents a multi-asset buy-and-hold portfolio method that assigns target weights either directly or through a selected metric. Available approaches include equal allocation, annualized Sharpe ratio, annualized return, standard deviation,…
This document presents a rebalancing method inspired by Shannon’s Demon. It values the asset holdings at the current ask price, compares that value with the account’s cash and total portfolio value, and trades toward an equal cash-and-asset allocation when…
This US equity strategy builds an equal-weighted portfolio through successive screens. It starts with liquid NYSE stocks while excluding financial companies, ADRs, and REITs; selects firms with low enterprise-value-to-EBIT ratios; then favors stronger…
This example shows how to connect a QuantConnect algorithm to CrunchDAO and submit portfolio targets on a weekly schedule. It reads a remote security skeleton to build a changing universe, tracks additions and removals, filters for securities with positive…
This educational example shows how to define a dynamic equity universe using a built-in selection helper. It selects the three stocks with the highest dollar volume and applies daily data resolution to securities added through the universe. The algorithm…
This QuantConnect example shows how to prepare indicators for securities that enter a dynamic universe. In a coarse fundamental selector, it creates or retrieves a 100-day simple moving average for each symbol and warms it with daily history before updating…
This source describes a simple portfolio rebalancing loop for an account holding cash and one asset. It compares the cash balance with the market value of the holdings, then estimates the amount needed to bring the two sides toward equal value. If the…
This example shows how an algorithmic trading framework can connect a fundamental universe-selection process to portfolio construction and risk management. It sets daily data resolution, then supplies custom coarse and fine selection functions. The coarse…
This US equity strategy builds a machine learning feature set from fundamentals, quality measures, price and volume behavior, technical indicators, securities data, and market signals. Its target is the following week's return. Fundamental inputs are…
This NASDAQ-100 stock strategy constructs portfolio weights from several technical indicator rules. The functions calculate TRIX or EMA on each stock’s high-price series, then compare shifted indicator values at multiple lags. The resulting Boolean signals…