Where we left off

The VWAP filter post ended on a sting: once UK Stamp Duty (0.5% on every share purchase) was charged, the strategy’s ten-year result went from +£22,251 to −£39,306. The signals were fine - average R unchanged, permutation test still passed - but the duty, charged on the whole position every time, was bigger than the strategy’s average profit per trade.

The obvious way round it is to trade CFDs (contracts for difference) instead of the shares themselves.

A CFD is the same stock in a different wrapper

A share CFD at IBKR tracks the real share price one-for-one - the same prices, the same candles, the same signals. What changes is how you hold it: you never own the shares, so there’s no Stamp Duty. In exchange there are two CFD-specific costs, taken from IBKR UK’s own published pricing:

  • Commission: 0.05% of each order’s value, with a £3 minimum. At the ~£4,600 positions this strategy takes, 0.05% is about £2.30, so the £3 minimum applies - the same £3 each way as shares.
  • Overnight financing (a “swap” in forex terms, “contract interest” at IBKR): because you only put up margin, IBKR effectively funds the whole position. For every night a trade is open, a long pays interest at the Bank of England’s overnight rate (SONIA) + 1.5% a year on the position’s value; a short is paid SONIA − 1.5% (or pays, when SONIA is below 1.5% - as it was from 2016 to 2021).

Gecko now models both, using the actual SONIA rate for every single night a trade was held - near zero until 2021, over 5% in 2023-24. Six of the 115 stocks have no IBKR CFD (all small caps) and drop out, leaving 109.

The result

3:1 + VWAP filter, ten years Shares, before Stamp Duty Shares, with Stamp Duty CFDs
Stocks 115 115 109
Trades 2,789 2,789 2,834
Commission £16,734 £16,734 £17,004
Stamp Duty - £58,106 £0
CFD financing - - £1,687
Net result £22,251 −£39,306 +£17,966

Financing turned out to be almost negligible. £1,687 over ten years - about 60p per trade - against £58,106 of Stamp Duty avoided. Longs paid £2,027 in total; shorts were paid £341 overall, mostly in the high-rate years. In 2024, with SONIA above 5%, the shorts’ interest income almost exactly cancelled the longs’ costs: the whole year’s net financing was £5.

Why so small? Because TFM trades are short: on average a trade is open about four days. Stamp Duty is charged once, in full, on every purchase no matter how briefly you hold; financing only accrues for the nights you’re actually in.

(The CFD run also has three more months of history than the share runs: gecko’s daily candles now go back to May 2015, so evaluation genuinely starts on 1 June 2016 rather than 31 August - see the note at the end.)

Per trade, side by side

Per trade (average) Shares with Stamp Duty CFDs
Position £4,369 £4,640
Gross profit +£12.74 +£12.93
Commission −£6.00 −£6.00
Stamp Duty −£20.83 -
Financing - −£0.60
Net −£14.09 +£6.34

Same edge, same commission - the whole difference is swapping a £20.83 tax for a 60p interest charge.

What about capital?

Here’s what CFDs change and what this backtest deliberately didn’t change.

  • Unchanged: position size and risk. Every CFD trade was sized exactly as the share trade would have been - the same number of shares, the same stop, the same maximum of £100 at risk, and no position bigger than the £5,000 account. Risk management doesn’t care whether it’s a share or a CFD.
  • Changed: how much cash each position ties up. A share position needs its full value in cash. A UK share CFD needs 20% margin (UK rules cap retail share CFDs at 5:1). A £4,640 position ties up about £928 instead of £4,640, leaving room for several positions open at once instead of one.

That’s a real benefit, but it isn’t in these numbers yet. The next experiment is to let positions grow when a trade’s stop is very tight - which is exactly what hurt the 8:1 version on a small account - while keeping the £100 risk cap, and measuring the extra danger that comes with bigger positions: an overnight gap straight through the stop costs more when the position is bigger.

The caution on the other side

IBKR shows a warning on every CFD page: around 58-60% of retail accounts lose money trading CFDs with them. The usual reason is the one this experiment deliberately avoids - treating margin as buying power and taking positions far bigger than the risk rules allow. The discipline is the same as with shares: size by the stop, not by the margin.

And the usual caveats still apply: everything here is a backtest over the same ten years the strategy was tuned on, execution is idealised (fills exactly at the planned prices), and IBKR’s current pricing is assumed for the whole decade. The real test is the forward test - which will move to CFDs on the paper account once IBKR has opened the CFD account.

A note on dates: the earlier TFM posts’ backtests only started evaluating on 31 August 2016 (gecko needs a year of daily history before its first signal, and its daily candles began in September 2015). Daily candles now go back to May 2015, so runs from this one on evaluate from 1 June 2016 as intended. The extra three months happened to be slightly negative for this strategy - about −£670.