Skip to content

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.

Quant Q&A
20,364 documents
SuperMind
12,226 documents
OKX Learn
8,431 documents
Strategy library
7,910 documents
MQL5 code base
7,090 documents
BigQuant
3,481 documents
Bitget Academy
3,298 documents
MQL5 articles
3,012 documents
TradingView scripts
1,976 documents
ProRealCode
1,507 documents
Deribit Insights
1,232 documents
Machine Learning for Trading
1,124 documents
arXiv papers
1,033 documents
Amberdata research
766 documents
FMZ forum
682 documents
FMZ digest
662 documents
vn.py community
560 documents
QuantInsti blog
511 documents
Galaxy Research
340 documents
QuantStart
246 documents
Stratmill research code
219 documents
Robot Wealth
195 documents
NautilusTrader
191 documents
Hummingbot docs
181 documents
Paradigm research
175 documents
Lumibot
164 documents
Kraken Learn
163 documents
Quant course library
157 documents
OctoBot
152 documents
Cryptohopper blog
144 documents
Systematic trading blog (Rob Carver)
132 documents
Qlib
116 documents
TqSdk
86 documents
Quantpedia
86 documents
Hyperliquid docs
79 documents
Freqtrade
68 documents
Hudson & Thames
62 documents
Awesome Systematic Trading
61 documents
backtrader
54 documents
vn.py
50 documents
Binance API docs
45 documents
Quantopian lectures
45 documents
FMZ guides
38 documents
pysystemtrade
34 documents
Freqtrade docs
32 documents
quant-trading
31 documents
FinRL
28 documents
Zipline
22 documents
FMZ live strategies
21 documents
Jesse
17 documents
pyfolio
16 documents
Alphalens
14 documents
WonderTrader
14 documents
backtesting.py
11 documents
Technical Analysis
9 documents
QTPyLib
8 documents
QuantRocket
7 documents
Lumibot strategies
7 documents
Awesome Quant
1 documents

Search the library

21 documents

backtrader

This Backtrader example demonstrates a simple moving average crossover strategy and how cheat-on-open mode changes the timing of order decisions. It builds two moving averages, with configurable periods and moving-average type, then uses their crossover as…

EquitiesTechnical indicatorsBacktestingExecution
backtrader

This proposed stock screen combines daily price movement, a morning star candlestick setup, and market activity. It first calls for amplitude above 1, then identifies a morning star pattern and sorts qualifying shares by perceived popularity. The…

EquitiesChina marketsTechnical indicatorsSentiment
backtrader

This Backtrader example combines two entry and exit signals on a selected data feed: a short and long simple moving average crossover, and a MACD line crossing its signal line. Each bullish crossover adds half of the strategy's target stake, while bearish…

EquitiesTechnical indicatorsTrend followingBacktesting
backtrader

This Backtrader example demonstrates a simple breakout-style strategy and a way to process daily bars in two stages. The strategy compares the current high with a rolling highest-high indicator, submits an entry when they match, and exits after a configured…

EquitiesBreakoutBacktestingExecution
backtrader

This Backtrader example demonstrates how to monitor portfolio drawdown while running a simple moving-average crossover strategy. It calculates a 15-period simple moving average and uses a crossover between closing price and the average to generate buy and…

EquitiesTechnical indicatorsRisk management
backtrader

This code defines two pivot-point indicators that calculate a central pivot, two support levels, and two resistance levels from high, low, and close prices. The first uses the previous bar’s prices, a common way to derive levels for the next period without…

Technical indicatorsEquitiesFutures
backtrader

This example shows how to compare two long-only signal strategies in Backtrader. One strategy enters based on a crossover between 10-period and 30-period simple moving averages; the other uses a crossover between the closing price and a 10-period simple…

EquitiesTechnical indicatorsBacktesting
backtrader

This Backtrader example shows how a strategy can use two data feeds: a moving average crossover on the second asset generates long entry and exit signals, while orders are placed on the first. The signal uses a simple moving average and a crossover of the…

Multi-assetEquitiesTechnical indicatorsBacktesting
backtrader

This sample Backtrader strategy demonstrates how to connect Interactive Brokers data and broker components, inspect incoming data, and optionally submit test orders. It prints bar fields and a simple moving average, reports data, order, and trade…

ExecutionTechnical indicatorsEquities
backtrader

This sample demonstrates how to configure a Backtrader run with a trading calendar and resampled market data. It defines a custom NYSE calendar for 2016, loads Yahoo Finance data either from a feed or a local CSV file, and resamples the input series to…

BacktestingEquities
backtrader

This script implements a long-only buy-the-dip strategy for a single price series. It measures declines using one of several definitions: close versus prior close, close versus open, close versus high, or low versus high. When the selected measure crosses a…

Mean reversionBacktestingPosition sizingEquities
backtrader

This Backtrader example shows how to include credit interest in a simple moving average crossover strategy. It computes fast and slow averages, uses their crossover as a signal, and lets the user choose long-short, long-only, or short-only trading. A fixed…

EquitiesFuturesTechnical indicatorsBacktesting
backtrader

This Backtrader example combines a moving-average crossover entry signal with three buy limit orders placed at progressively lower prices after an upward crossover. The orders can be linked using one-cancels-other behavior, so execution of a linked order…

BacktestingTechnical indicatorsExecutionEquities
backtrader

This Backtrader example compares three ways to attach protective exits to a moving-average crossover entry: a stop set after the entry completes, a stop submitted alongside the entry using cheat-on-close behavior, and a parent-child order arrangement that…

EquitiesRisk managementExecutionBacktesting
backtrader

The code implements a two-asset pairs trading strategy using a rolling ordinary least squares transformation and its z-score. It opens a short-spread position when the z-score exceeds an upper threshold and a long-spread position when it falls below a lower…

Pairs tradingMean reversionEquitiesBacktesting
backtrader

This example defines a long-only stock strategy that enters when the MACD line crosses above its signal line while a simple moving average is declining relative to its value over a lookback period. It initializes a protective stop several ATR units below the…

EquitiesTechnical indicatorsRisk managementPosition sizing
backtrader

This Backtrader example attaches two price data series to one strategy. It calculates a simple moving average on the second series and uses crossovers of that series’ close against its average to create long and exit signals. The sample then submits orders…

EquitiesTechnical indicatorsTrend followingBacktesting
backtrader

This code example implements a long-only moving average crossover strategy in Backtrader. It calculates two simple moving averages, with default lookback periods of 10 and 20 bars, and adds a long signal when the shorter average crosses the longer one. A…

EquitiesTrend followingTechnical indicatorsBacktesting
backtrader

This example demonstrates how a Backtrader strategy can schedule callbacks around market-session events. Timer settings include the event time, an offset, repeated intervals, selected weekdays or month days, and rules for carrying a scheduled event across…

BacktestingExecutionEquities
backtrader

This Backtrader example defines a long signal from a crossover between a shorter and a longer simple moving average, then attaches the Calmar analyzer to the run. It loads price data from a Yahoo Finance CSV feed, permits optional date bounds, and exposes…

EquitiesTechnical indicatorsBacktestingRisk management
backtrader

This sample strategy initializes two Parabolic SAR indicators on a single price series: TA-Lib's SAR, calculated from the high and low data, and Backtrader's built-in PSAR. It loads historical market data from a CSV feed with optional start and end dates,…

EquitiesTechnical indicatorsBacktesting