This Qlib documentation describes visual reports for evaluating intraday portfolios and prediction models. Portfolio reports display benchmark and portfolio cumulative returns, returns with and without transaction costs, turnover, drawdowns, and cumulative…
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
29 documents
The document introduces Temporal Routing Adaptor (TRA), a model designed to learn multiple trading patterns from stock market data. It describes using TRA with Qlib datasets and workflows, and notes that the paper’s reproduction setup first trains a backbone…
The document explains how Qlib’s tuner searches hyperparameters and combinations of models, trainers, strategies, and data labels. A configuration defines each tuner’s search spaces and evaluation limit, then organizes tuners into a pipeline. Users choose a…
Qlib is introduced as a modular platform for researching quantitative investment strategies with AI and machine learning. Its components are loosely coupled, so parts of the platform can be used independently. The architecture is organized into…
This Qlib documentation explains a workflow for preparing financial data for quantitative research. Users convert market data into Qlib’s binary format, derive features with its expression engine, apply more complex transformations through data handlers, and…
The document motivates adapting forecasting models to changing market conditions: financial data distributions can shift over time, so models trained on earlier periods may lose predictive strength. It compares two approaches, RR and DDG-DA, using linear and…
DoubleEnsemble is an ensemble framework for financial prediction that addresses noisy training data and large feature sets. It combines two procedures: it uses each sample’s learning trajectory during training to identify influential examples and adjust…
This Qlib documentation describes a workflow for generating, storing, training, and collecting multiple research tasks. A task can include a model, dataset, and recorded outputs. Task generators such as RollingGen can create tasks for different date…
This Qlib documentation explains why historical strategies need the versions of financial data that were available at each past decision time. Financial statements can be revised after publication; using only the latest value in a historical simulation can…
This document describes a data preparation workflow for daily risk estimates on China A-shares. For each date, it selects the CSI 300 constituents, gathers a rolling window of closing prices, calculates returns, and clips extreme returns at the…
This workflow note explains how to prepare data when training models across rolling windows. As each window advances, the training sample changes, and learned processor state—such as means and standard deviations—must be recalculated for that window. Reusing…
The document defines Qlib data handlers for one-minute bars, aimed at high-frequency research and backtesting. The training handler creates normalized open, high, low, close, and approximate VWAP features, along with volume features. Price features are…
The code implements a time-series prediction model paired with a TRA component that can combine predictions across multiple states. A base model, such as an LSTM, produces hidden representations and state-specific predictions. When multiple states are…
This document defines an abstract data-formatting interface for experiments using the Temporal Fusion Transformer (TFT). Dataset-specific formatters are expected to define column names and roles, fit scalers, transform features, reverse prediction…
This note presents a Chinese equity screen that selects stocks with turnover between 3% and 12%, excludes Beijing-listed shares, and applies a price-to-earnings cutoff below 20. The accompanying Python example also filters out names marked as special…
The notebook describes an evaluation workflow for stock-return prediction models, including linear and neural models as well as a Transformer and an approach combining predictors with a learned router. It ranks predictions cross-sectionally each day,…
This document introduces two high-frequency trading examples: handling a dataset for reinforcement learning and predicting price trends. It explains that the dataset is represented by a Qlib DatasetH object, which can be serialized to disk and reloaded.…
The guide lays out different entry paths for using QlibRL, depending on whether the reader is new to reinforcement learning, researches RL algorithms, or already has quantitative finance experience. It recommends learning RL fundamentals, understanding…
This documentation excerpt explains how to access market data through Qlib after initializing it with a local data provider. It demonstrates loading a trading calendar, retrieving instruments from a market universe, and filtering that universe by instrument…
GeneralPtNN is presented as a redesign intended to support both time-series and tabular datasets through a common PyTorch workflow. The stated approach is to keep the workflow configurable and change the network and dataset classes when moving between data…
The code describes a manager for tuning model hyperparameters through random search over discrete parameter ranges. For each trial it samples one value per tunable parameter, adds fixed experiment parameters, checks that the parameter set is complete, and…
The document introduces a periodically rolling retraining framework for forecasting models. Its central idea is to refresh a model using up-to-date data at intervals so its forecasts can adapt as market conditions change. The default model is linear, and…
The document explains Qlib’s meta-controller framework for learning patterns across forecasting tasks and using them to guide future tasks. A meta-task packages data for a meta-model, while a meta-dataset manages how task information is generated and…
This Qlib documentation explains its experiment-management structure for organizing quantitative research. An experiment manager oversees experiments, each experiment groups recorders, and each recorder represents an individual run. The high-level Qlib…