It is related to the trading delay. I just set the trading delay to zero and the equity curve looks good. However, my understand is that a trading delay of zero means the system will trade on the current period's open. I need to take a close look at the trades. I don't usually trade on the open...