I am experimenting with the Cfd's for the first time.

I have written testing 'Buy and hold' algo that buys asset on the beginning and hold till end of the period.

What confuses me is very different result between equity and Cfd holdings.

In one case, I buy SPY and hold till end. The Return is is 344%. .

In second case, I buy Cfd SPX500USD. The return is 218%.

I thought returns on Cfd's for SPX should be very similar to returns on SPY if holding for the same period.

In attached algo you can see results..