Kisiel & Gorse (2022) train a Transformer to output portfolio weights that maximise cost-adjusted Sharpe—no separate return forecast step. Plain-language intro. Not investment advice.
Takeaway. The Portfolio Transformer (PT) skips predict-then-Markowitz: an encoder–decoder with attention, Time2Vec, and gated residual nets outputs signed weights (gross = 1) trained to maximise Sharpe after 2 bp costs.
Portfolio Transformer for Attention-Based Asset Allocation (Damian Kisiel, Denise Gorse, 2022; arXiv:2206.03246) is the after-work “train the allocation, not the forecast” paper.
Fit for learners: End-to-end Sharpe-optimizing transformer weights — skip predict-then-optimize and train allocation directly.
This Hub note is a plain-language intro. Not investment advice.
Two-step pipelines leak forecast error into weights. LSTMs struggle with long windows. Mean–variance needs a decent μ and Σ that we do not have. High turnover without a cost term in the loss looks brilliant in-sample and dies live.
Research on ETFs, commodities, and a large stock panel—not a product allocation.
This is a reason to implement softmax on scores and a Sharpe loss before you touch BERT. Pair with Deep Momentum Networks: same “optimise the trading metric” religion, different architecture.
Tiny evening exercise: three toy scores s = [0.2, −0.5, 0.1]; compute signed-softmax weights and check sum(abs(w))==1. Learning only.
Landing: arXiv abs
Not investment advice. This Hub note is educational only. Kisiel–Gorse is academic research—not a recommendation to replace your allocation with a Transformer.
Single course CTA: SoloQuant Academy’s Introduction to Python Programming—nested lists become return matrices; softmax is just exp and a sum.