Quant500 Academy

3. Turnover, offsetting losses and blocking rules

Costs 5: Tax as a cost

So far we have looked at tax from the side of the gains. The other half is still missing, and it is less intuitive and a good deal more interesting: in a system that taxes what you make, a realized loss has economic value, because it reduces what you owe on what you have made. Grasping that changes the way you read a portfolio with positions in the red.

I repeat the warning, because the ground in this module is especially slippery: what is explained here is how a mechanism works, not what you ought to do with it. This is not tax advice, the specific rules change frequently, and the detail depends entirely on the country and on the type of security.

A realized loss is a tax asset

If in the same tax year you realize 12,000 euros of gains and 7,000 of losses, the system does not charge you on the 12,000: it charges you on the balance, 5,000. That capacity to subtract is called offsetting, and it turns the loss into something that, in accounting terms, is worth money. In the example, at a 19% rate — Spain again at the time of writing, and again subject to checking — the 7,000-euro loss has cut the year's bill by 1,330 euros.

Hence the phrase tax asset: the loss does not give you back the money you lost, but it works like a voucher you can redeem against present or future gains. And if you do not manage to redeem the whole of it this year, systems usually allow the negative balance to be carried forward into subsequent tax years for a limited number of them.

Offsetting has compartments, and it has an order

What almost nobody expects is that you cannot subtract everything from everything. Tax systems tend to build compartments, and in Spain the mechanics work as follows, in general terms and without going into the exact percentages, which have to be verified:

The practical consequence is that a loss is not always available when you need it, nor in the amount you were expecting. It is an asset, yes, but one with terms and conditions attached.

The rule that blocks the buy-back

And here is the most important rule in the module. If the system let you sell at a loss and immediately buy the same thing back, anybody could manufacture losses at will without changing their portfolio one jot: you sell on December 30, you buy on January 2, your position is identical and your bill has gone down. Every serious jurisdiction closes that door.

The mechanism is always the same: the loss cannot be counted if, within a given window before or after the sale, homogeneous securities are acquired, meaning essentially the same ones. In Spain there are different windows depending on the type of security — listed and unlisted securities are not treated alike — and since those windows have been amended and are not something to handle from memory, what you need to retain is the structure: there is a window of time around the sale and, if you buy back inside it, the loss is blocked.

Two points that are constantly misunderstood:

The link with turnover: the cost the backtest cannot see

Here the circle closes with the previous module and with the whole course. A high-turnover algorithmic strategy realizes gains constantly, because its very nature is to go in and out. Every exit in the green is an accrual. Every accrual is capital leaving the portfolio and ceasing to compound.

The trouble is that practically no backtest builds this in. A backtest calculates entry and exit prices and, at best, subtracts commissions and the spread. The curve it shows is that of a tax-exempt entity, not that of a private individual. Two strategies with the same curve and very different turnover produce very different net results, and the chart does not so much as hint at it. It is the same finding documented by those who measured fund performance before and after tax: a good part of the difference between managers came not from getting more calls right, but from trading less. And it is curious that the loss should be, in this one respect, more manageable than the gain: a realized gain compels, a realized loss merely offers.

A worked example

An investor reaches December with 12,000 euros of gains already realized. He also holds a position sitting on 7,000 euros of unrealized losses that he no longer wants to keep. He sells it on the 20th.

The same portfolio move, the same economic outcome, and a difference of 1,330 euros that turns on a date and nothing else.

To go deeper into this lesson

The rest of Quant500

What you are learning, applied to the index every day:

The model portfolio, weekly in your inbox

Every Saturday, its week in one minute: how it went, the best and the worst, and which insiders bought with their own money. Plus, the day the model is rebuilt, which stocks come in and which go out. A simulation, not advice. At most one email a week, no ads, no account; one-click unsubscribe. Made by one person: Pol Gracia.

A model portfolio with simulated results, not a personalized recommendation. Your email is used for this only: privacy.

Behind the Academy and the rest of Quant500 there is one person: Pol Gracia Serrahima.