quantlab.model.predefined.master#
MASTER: a market-guided transformer over one bar’s cross-section.
MASTERNet reproduces the network of SJTU-DMTai/MASTER (master.py,
Li et al., “MASTER: Market-Guided Stock Transformer for Stock Price
Forecasting”, AAAI 2024): a market gate that rescales the stock features,
attention over time within each stock, attention across stocks at every
time step, and a temporal aggregation queried by the last step.
MASTERRegressor is the TorchModel head that trains it with the
official settings. See docs/research/qlib-gats-master.md §2.
Classes
MASTER's pre-LayerNorm multi-head attention block with a feed-forward layer. |
|
|
|
The MASTER network with its market gate columns anywhere among the features. |
|
MASTER on the cross-section of every bar, gated by the |
|
Adds the fixed sinusoidal encoding of each step's position, up to |
|
Aggregates a symbol's N steps with weights |