Consider the following long trade with SPX asset over almost a year time period:
(it is definitely long, since the script is only capable of opening long trades)
The asset grew over $100 in value between enter time and exit time.
Surely, simulated slippage and transaction costs cannot be that huge as to make this a losing trade! oO
What do you think is going on?
Here is what the log says about it (its the last Long entry in 2010 and first Sell after that in 2011):
[92422: Wed 10-09-08 14:10] -522 0 0/11 (1099.40)
[92423: Wed 10-09-08 14:20] -522 0 0/11 (1099.10)
[92424: Wed 10-09-08 14:30] -522 0 0/11 (1099.90)
[SPX500::L2401] Long 1@1101.76 at 14:30:00
[92425: Wed 10-09-08 14:40] -522 +0.11908203 1/11 (1101.60)
[92426: Wed 10-09-08 14:50] -522 -1.19 0/12 (1102.40)
[92427: Wed 10-09-08 15:00] -522 -1.01 0/12 (1100.90)
...
...
...
[124244: Thu 11-08-04 19:20] -522 -65.59 0/12 (1222.40)
[124245: Thu 11-08-04 19:30] -522 -71.68 0/12 (1216.40)
[SPX500::L2401] Sell 1@1210.36: -70.85 at 19:30:00
[124246: Thu 11-08-04 19:40] -592 0 0/12 (1209.40)
[124247: Thu 11-08-04 19:50] -592 0 0/12 (1211.60)
The log says the price was indeed over $100 above the entry point, but the profit somehow deteriorated to -$70.85!!
How is this possible?
Is this a bug, or am I being stupid not seeing something?