Hi,

I completed Boot Camp 103 futures lesson by Jared set the available cash to $10k. I then set the end date past the expiration of the first contract (to 2014-05-01) in order to see a couple of orders go through.

The first trade on 2013-12-20 displays $10,000 correctly as remaining margin with the self.Portfolio.MarginRemaining method but for some strange reason the available margin jumps to $56,363 after the first trade is liquidated automatically on 2014-02-27, so I get successive margin calls.

Why is the margin wrong and does it have to do with the automatic delisting liquidation? I don't think it is a bug.

Here is the log output where I'm printing the remaining margin before the market order:

2013-12-20 00:00:00 :	Launching analysis for 9bf5f7007929551d137abbf06a2b3f3e with LEAN Engine v2.5.0.0.13573
2013-12-20 02:07:00 :	2013-12-20 02:07:00 NEW CONTRACT Symbol:GC VOFJUCDY9XNH Expiry:2014-02-26 00:00:00 LastPrice:1192.80 OpenInterest:246184 Multiplier:100 MarginReq:$7,975 RemMargin:$10,000
2013-12-20 02:07:00 :	2013-12-20 02:07:00 InitialMargin:7975.0 Contracts:1.0 RemMargin:2736.3
2014-02-27 00:00:00 :	2014-02-27 00:00:00 NEW CONTRACT Symbol:GC VQ3M41P8XYFX Expiry:2014-04-28 00:00:00 LastPrice:1327.70 OpenInterest:235111 Multiplier:100 MarginReq:$7,975 RemMargin:$56,363

Cheers,

Andres