Tax-loss harvesting demonstrates consistent benefits to long-term portfolio growth; yet implementing it efficiently often involves complex considerations that are specific to the holdings within that portfolio and the individual who owns it. We introduce a custom capital gains calculation engine and a RAG-retrieved vector store of market advisory reports to provide context for a multi-agent trade recommendation system. We investigate the effects of each context provider on the quality of recommendations, measured by relative capital gains incurred during portfolio liquidation. A 2x2 repeated-measures ANOVA revealed a significant main effect of the tax optimization engine (F(1,29)=9.17, p=.005, ηp2=.240): enabling the engine reduced tax savings by approximately 55 percentage points relative to the no-engine conditions. The RAG main effect was not significant (p=.841), nor was the interaction (p=.553). The RAG-only condition achieved the highest descriptive mean tax savings (47.7%), and the baseline condition performed second-best (30.6%), suggesting that the pre-trained language model's internalized financial knowledge may be sufficient for competent tax-loss harvesting recommendations without explicit tooling. These results indicate that augmenting LLM agents with domain-specific computation engines does not guarantee improved performance and may introduce conflicting optimization signals.
Figures & tables
Tax Tools
RAG
n
M
SD
Mdn
Off
Off (Baseline)
30
30.55%
99.16
24.01
Off
On (RAG Only)
30
47.73%
45.98
35.63
On
Off (Tax Tools Only)
30
− 11.03%
114.96
0.00
On
On (Tax Tools + RAG)
30
− 21.02%
161.94
0.00
Table 1: Descriptive Statistics for Tax Savings by Condition
Figure 1: Distribution of Tax Savings Across Experimental Conditions
Source
SS
df
MS
F
p
η2p
Tax Tools
91,289.80
1, 29
91,289.80
9.17
.005
.240
RAG
389.09
1, 29
389.09
0.04
.841
.001
Tax Tools × RAG
5,536.84
1, 29
5,536.84
0.36
.553
.012
Table 2: Repeated-Measures ANOVA for Tax Savings Percentage
Figure 2: Distribution of Tax Savings Across Experimental Conditions