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

72 documents

TqSdk

This documentation explains how to run a TqSdk strategy over historical data without changing its core logic, and how to retrieve trade logs and account statistics when the simulation ends. It describes catching a backtest-finished event, accessing summary…

BacktestingFuturesEquitiesExecution
TqSdk

This reference explains advanced order instructions for futures and options trading through TqSDK. It compares ordinary limit orders, FAK orders that cancel any unfilled remainder, and FOK orders that cancel unless the full quantity can execute immediately.…

ExecutionFuturesOptionsMarket microstructure
TqSdk

This TqSdk guide explains how to run timed actions inside the main loop driven by wait_update, rather than pausing the program with a separate sleep loop. For actions tied to the trading session, it recommends checking the market timestamp in quote.datetime,…

ExecutionFuturesRisk management
TqSdk

This code describes a mean-reversion strategy for the spread between Dalian Commodity Exchange coke and coking coal futures. It calculates a weighted value spread using contract prices, contract multipliers, and a specified leg ratio, then estimates the…

FuturesCommoditiesPairs tradingMean reversion
TqSdk

This comparison explains differences between TqSdk and vn.py that matter when adapting existing trading strategies. vn.py is presented as an integrated package with market data, trading connections, storage, and interface components. TqSdk instead uses…

FuturesBacktestingExecutionMarket microstructure
TqSdk

This guide explains a replay mode for reviewing a trading strategy against historical market data for a chosen trading day. Unlike event-driven backtesting, replay is time-driven: the service streams the day’s historical data for subscribed contracts,…

FuturesBacktesting
TqSdk

This reference distinguishes local simulation accounts from remote Quick simulated accounts for futures and stocks. It describes TqSim as a local futures simulation option for development and backtests, TqKq as a Quick linked futures account, and…

FuturesEquitiesBacktestingExecution
TqSdk

The document argues that trading systems should be written so that changes to strategy logic require only localized code edits. It illustrates this with an R-Breaker example: if backtesting suggests that holding positions overnight adds risk without enough…

FuturesBacktestingExecutionRisk management
TqSdk

This example implements an intraday breakout strategy around the prior session’s high and low. It opens a long position when the latest price rises above the prior high and a short when it falls below the prior low, targeting a fixed position size in either…

FuturesBreakoutTrend followingRisk management
TqSdk

This example describes a futures strategy using the Volume Price Trend (VPT) indicator on daily bars. It updates VPT by adding volume multiplied by the latest percentage price change, then compares the current value with a moving average. A trade is…

FuturesTechnical indicatorsMomentumBacktesting
TqSdk

This example demonstrates an iceberg-style execution workflow for a futures contract. The trader chooses a symbol, a total volume, minimum and maximum order sizes, and a buy or sell direction. A target-position task manages orders toward the desired net…

FuturesExecutionMarket microstructure
TqSdk

This report utility converts daily account snapshots and trade records into tables, then calculates summary statistics for simulated futures accounts or stock accounts. For both account types it derives daily profit and returns, cumulative profit and loss…

BacktestingStatisticsRisk managementFutures
TqSdk

The document explains how to enable TqSdk’s browser-based chart interface by setting the API’s web GUI option. It describes using an automatically assigned local address or supplying a fixed address, then illustrates a live setup that subscribes to a futures…

FuturesBacktestingTechnical indicators
TqSdk

The script describes a two-sided futures strategy on hourly bars. It identifies confirmed swing low and swing high fractals, then enters long when price breaks above a bullish fractal’s high during a short-over-long moving-average uptrend. It enters short…

FuturesCommoditiesTrend followingBreakout
TqSdk

This example implements a futures Turtle-style trend-following system. It enters long when price breaks above a prior Donchian channel high and short when price breaks below the channel low. Position size is based on account balance, contract multiplier, and…

FuturesTrend followingBreakoutVolatility
TqSdk

The strategy models a refining spread using crude oil, fuel oil, and a third petroleum product in a 3:2:1 weighting. It calculates the spread as the weighted value of the two product legs minus the weighted crude leg, then compares the current spread with…

FuturesCommoditiesMean reversionArbitrage
TqSdk

This example implements a daily mean-reversion strategy for a Shanghai Futures Exchange gold contract. It calculates a Z-score from recent closing prices, enters long when the score falls below a negative entry threshold and short when it rises above a…

FuturesCommoditiesMean reversionStatistics
TqSdk

This TqSdk reference explains how to authenticate with a platform account and select a live futures account, a shared platform simulation account, or a local simulation account when creating the API object. It describes live-account binding limits and common…

FuturesExecution
TqSdk

This reference explains common market-data workflows in the TqSdk Python interface. It covers subscribing to real-time quotes, monitoring updates to quote fields, and requesting K-line bars or tick series as data frames that update in place. It also…

FuturesMarket microstructureExecution
TqSdk

This tutorial explains the true range (TR) and average true range (ATR), then shows how to calculate and display both for a Shanghai Futures Exchange gold contract using TqSdk. True range takes the largest of the current high-low range, the gap between the…

FuturesTechnical indicatorsVolatility
TqSdk

The document shows how to send a phone notification through a DingTalk custom robot when a TqSdk strategy starts or a market condition is met. Its example watches a futures quote, checks whether the last price crosses a threshold, sends a text alert, and…

FuturesExecution
TqSdk

This asynchronous example implements a futures grid around a chosen starting price. It creates multiple long and short trigger levels using repeated percentage steps, assigns a trade size to each level, and starts a watcher task for every grid interval. A…

FuturesGrid tradingExecutionRisk management
TqSdk

This script describes a three-leg futures strategy that treats hog value minus weighted corn and soybean meal costs as a proxy for livestock feeding profitability. It estimates the spread’s mean and standard deviation from daily bars, calculates a z-score,…

FuturesCommoditiesMean reversionArbitrage
TqSdk

The script demonstrates a calendar spread strategy for two nearby equity index futures contracts. It calculates the spread between their closing prices over a rolling window, estimates the mean and standard deviation, and sets upper and lower thresholds two…

FuturesPairs tradingMean reversionBacktesting