Taxable investors holding appreciated equity positions face a decision that pre-tax portfolio models cannot resolve: selling protects accumulated gains but triggers an immediate tax liability, while waiting preserves tax deferral but leaves the position exposed to future price movements. When short-term and long-term capital gains rates differ, the timing of realization has direct economic value, and the optimal liquidation path depends on the investor's unrealized gain, remaining holding period, and market conditions simultaneously. This sequential, path-dependent structure makes tax-aware liquidation a natural candidate for reinforcement learning. This thesis develops a tax-aware Deep Q-Network framework for the partial liquidation of a single already-appreciated equity position. Using daily U.S.-listed equity data over the 2010–2025 period, historical prices are transformed into 10,119 appreciated-position episodes across 934 tickers. The agent observes stock-level technical indicators, market and macro variables, rolling PCA factors, and normalized tax-state variables, including unrealized gain and remaining days to the long-term threshold, and chooses among hold and fixed-fraction sale actions at each step. The environment applies inventory constraints, sale-level tax accounting, and terminal liquidation so that DQN-derived and benchmark policies are compared on a consistent after-tax basis. The preferred calibrated DQN improves over all simple active liquidation rules: immediate sale; partial sale; and random liquidation and displays economically coherent tax-sensitive behaviour: it delays discretionary sales, reduces short-term realization, and becomes especially conservative when the long-term threshold is near. It does not, however, outperform the passive hold-to-terminal benchmark, which remains the strongest policy in mean final after-tax value on the test split. The framework is therefore best understood as a decision-support tool for selective risk reduction: useful when an investor needs to reduce an appreciated position for reasons beyond tax efficiency, but not a general substitute for passive deferral.
Gli investitori soggetti a tassazione che detengono posizioni azionarie con plusvalenze latenti devono affrontare una decisione che i modelli di portafoglio pre-imposte non sono in grado di risolvere: vendere protegge i guadagni accumulati ma genera un’immediata passività fiscale, mentre attendere preserva il differimento d’imposta ma lascia la posizione esposta ai futuri movimenti di prezzo. Quando le aliquote sulle plusvalenze a breve e a lungo termine differiscono, il momento della realizzazione ha un valore economico diretto, e il percorso ottimale di liquidazione dipende simultaneamente dalla plusvalenza non realizzata dell’investitore, dal periodo residuo di detenzione e dalle condizioni di mercato. Questa struttura sequenziale e dipendente dal percorso rende la liquidazione fiscalmente consapevole una candidata naturale per l’apprendimento per rinforzo. Questa tesi sviluppa un framework Deep Q-Network fiscalmente consapevole per la liquidazione parziale di una singola posizione azionaria già rivalutata. Utilizzando dati giornalieri di azioni quotate negli Stati Uniti nel periodo 2010-2025, i prezzi storici vengono trasformati in 10.119 episodi di posizioni rivalutate su 934 ticker. L’agente osserva indicatori tecnici a livello di titolo, variabili di mercato e macroeconomiche, fattori PCA rolling e variabili normalizzate dello stato fiscale, inclusi la plusvalenza non realizzata e i giorni rimanenti al raggiungimento della soglia di lungo termine, e sceglie a ogni passo tra azioni di mantenimento e di vendita a frazioni fisse. L’ambiente applica vincoli di inventario, contabilizzazione fiscale a livello di vendita e liquidazione terminale, in modo che le politiche derivate dal DQN e quelle di riferimento siano confrontate su una base al netto delle imposte coerente. Il DQN calibrato preferito migliora rispetto a tutte le semplici regole attive di liquidazione: vendita immediata, vendita parziale e liquidazione casuale, e mostra un comportamento fiscalmente sensibile economicamente coerente: ritarda le vendite discrezionali, riduce la realizzazione di plusvalenze a breve termine e diventa particolarmente conservativo quando la soglia di lungo termine è vicina. Tuttavia, non supera il benchmark passivo di mantenimento fino al termine, che rimane la politica più forte in termini di valore finale medio al netto delle imposte nel test split. Il framework va quindi inteso soprattutto come uno strumento di supporto decisionale per la riduzione selettiva del rischio: utile quando un investitore deve ridurre una posizione rivalutata per ragioni diverse dall’efficienza fiscale, ma non come sostituto generale del differimento passivo.
A tax-aware deep reinforcement learning framework for optimal partial liquidation of appreciated equity positions
BAUMGRATZ PAES, PEDRO
2025/2026
Abstract
Taxable investors holding appreciated equity positions face a decision that pre-tax portfolio models cannot resolve: selling protects accumulated gains but triggers an immediate tax liability, while waiting preserves tax deferral but leaves the position exposed to future price movements. When short-term and long-term capital gains rates differ, the timing of realization has direct economic value, and the optimal liquidation path depends on the investor's unrealized gain, remaining holding period, and market conditions simultaneously. This sequential, path-dependent structure makes tax-aware liquidation a natural candidate for reinforcement learning. This thesis develops a tax-aware Deep Q-Network framework for the partial liquidation of a single already-appreciated equity position. Using daily U.S.-listed equity data over the 2010–2025 period, historical prices are transformed into 10,119 appreciated-position episodes across 934 tickers. The agent observes stock-level technical indicators, market and macro variables, rolling PCA factors, and normalized tax-state variables, including unrealized gain and remaining days to the long-term threshold, and chooses among hold and fixed-fraction sale actions at each step. The environment applies inventory constraints, sale-level tax accounting, and terminal liquidation so that DQN-derived and benchmark policies are compared on a consistent after-tax basis. The preferred calibrated DQN improves over all simple active liquidation rules: immediate sale; partial sale; and random liquidation and displays economically coherent tax-sensitive behaviour: it delays discretionary sales, reduces short-term realization, and becomes especially conservative when the long-term threshold is near. It does not, however, outperform the passive hold-to-terminal benchmark, which remains the strongest policy in mean final after-tax value on the test split. The framework is therefore best understood as a decision-support tool for selective risk reduction: useful when an investor needs to reduce an appreciated position for reasons beyond tax efficiency, but not a general substitute for passive deferral.| File | Dimensione | Formato | |
|---|---|---|---|
|
A Tax-Aware Deep Reinforcement Learning Framework for Optimal Partial Liquidation of Appreciated Equity Positions.pdf
accessibile in internet per tutti
Dimensione
1.34 MB
Formato
Adobe PDF
|
1.34 MB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/260497