This equity strategy ranks stocks by their trailing 252-day returns, after screening for average dollar volume above $10 million over 30 days. Each day before the market opens, it selects the three highest-ranked stocks. At a scheduled rebalance 30 minutes…
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
95 documents
This QuantConnect example demonstrates estimating the QC500 index constituents through the platform’s built-in universe selection. It configures daily data resolution, sets a historical test interval covering 2018, assigns starting cash, and adds the QC500…
This example shows how to connect a custom coarse and fine fundamental universe selector to a sector-weighted portfolio construction model in an algorithm framework. It sets daily data resolution, defines a short test period and starting cash, then wires…
This educational strategy sets paired buy and sell limit orders around an account’s current balance of cash and assets. A configurable distance, denominated in the quote currency, determines the target prices and order amounts intended to rebalance holdings…
This system describes an adaptive long/short strategy for Binance USDⓈ-M perpetual contracts. It starts from five seed factors spanning momentum, reversal, funding, premium, and open interest, then evaluates additional candidates through a constrained factor…
This algorithm example combines hourly ETF constituent data with RSI-derived directional views. It loads constituents of SPY and filters for holdings with available weights above a minimum threshold. For each eligible asset, it initializes a short-period…
This example demonstrates custom universe selection by cycling through a predefined list of stocks on an hourly schedule. The selection function uses the hour of the timestamp to choose one symbol from the list, while the universe and security data are…
The document outlines a simple portfolio rebalancing rule for a basket of major cryptocurrencies. It proposes allocating equal portions of portfolio value to four assets and trading when an asset’s share of the account departs from its target by a stated…
This document describes a rules-based Bitcoin rebalancing method that maintains a chosen split between cash and coin value. After price changes, it calculates total portfolio value and trades enough Bitcoin to restore the target allocation. Its worked…
This framework example demonstrates combining multiple risk controls in one portfolio risk-management model. It applies a maximum unrealized profit percentage rule and a maximum drawdown percentage rule to each security, showing how separate controls can be…
This example applies technical signals calculated from the S&P 500 index to a universe of Nasdaq 100 stocks. It constructs separate strategies from the index's TRIX, RSI, or rate of change, then assigns liquid stocks binary exposure when paired comparisons…
This example demonstrates a basic stock-universe selection process. At the coarse-selection stage, it ranks available securities by daily dollar volume and retains the three highest-ranked symbols. The algorithm requests daily data and starts with a…
This market-neutral strategy ranks USDT perpetual contracts using a weighted composite of cross-sectional price momentum and funding-rate information. It goes long the highest-scoring coins and short the lowest-scoring ones. Funding intervals are normalized…
The document outlines a composite, low-frequency CTA approach that combines multiple factors, markets, time horizons, and strategy types. Its components include trend following, mean-reversion signals intended to offset trend exposure, swing trading that…
This UMD strategy ranks stocks by returns over a long lookback while omitting the most recent month, then buys the strongest group and shorts the weakest. It updates the selections monthly, uses equal weighting, and delays positions by one period before…
This document describes a bot that maintains target portfolio weights by comparing each asset’s current value with its assigned share of total portfolio value. For each asset, configurable buy and sell deviation thresholds determine when the bot trades…
This alpha model forms every eligible pair from the selected securities and tracks the ratio of the first asset’s price to the second’s. It smooths that ratio with an exponential moving average and sets upper and lower bands using a configurable percentage…
This strategy ranks configured equity sectors by the average lookback return of their valid constituents, using closed four-hour bars. It buys every member of the strongest sector and shorts every member of the weakest, with equal total notional on each…
The code describes three candidate factors for ranking crypto assets: an ATR-based volatility measure, a volume-distribution measure, and an inverse-price measure. The volatility function calculates ATR over 14 periods, ranks the observations, and maps the…
This example shows how to include technical signals in coarse fundamental universe selection. It maintains fast and slow exponential moving averages for each symbol, updated with adjusted daily prices, and retains securities whose fast average exceeds the…
The document describes a sector rotation approach combining relative momentum with a market regime filter. Its stated rules hold the strongest sectors by three-month gains when the S&P 500 is above its ten-month simple moving average, exit when the index…
The document outlines a rule-based strategy for Hong Kong’s Hang Seng leveraged ETF 00631L. It starts with half of the available capital invested and compares unrealized profit with remaining cash. When either side exceeds the other by the stated margin, the…
This strategy forms a spread from two instruments using hedge weights estimated with the Johansen cointegration procedure on a rolling lookback. It recalculates those weights daily, then measures the spread against its rolling mean and standard deviation. A…
This Binance spot strategy rebalances a selected basket of crypto assets toward configured target weights. It values each holding using the midpoint of the bid and ask, compares each asset’s share of the tracked account value with its target allocation, and…