Hi Nick,
1) It is very different because it is calculated in a completely different way. When we calculate UnrealizedProfit, the algorithm actually simulates a self.Liquidate() instead of a manual exercising. For example, here is the order information of our initial purchases:
2017-05-01 09:31:00 Time: 5/1/2017 1:31:00 PM OrderID: 1 Symbol: GOOG 170616P00890000 Status: Filled Quantity: 1 FillPrice: 13.3 USD OrderFee: 1 USD
2017-05-01 09:31:00 Time: 5/1/2017 1:31:00 PM OrderID: 2 Symbol: GOOG 170616P00920000 Status: Filled Quantity: -1 FillPrice: 23.7 USD OrderFee: 1 USD
And if you try to Liquidate immediately after that, here are the log:
2017-05-01 09:32:00 Time: 5/1/2017 1:32:00 PM OrderID: 3 Symbol: GOOG 170616P00890000 Status: Filled Quantity: -1 FillPrice: 9.1 USD OrderFee: 1 USD
2017-05-01 09:32:00 Time: 5/1/2017 1:32:00 PM OrderID: 4 Symbol: GOOG 170616P00920000 Status: Filled Quantity: 1 FillPrice: 27.4 USD OrderFee: 1 USD
With some calculation (with consideration of order fee), you would find the actual profit after these transactions is the "profit2" - self.Portfolio.TotalUnrealizedProfit.
In fact, if we run this algorithm longer, those two calculations gets closer until reach the same value at the moment when options expire.
2) Yes you are right, we should use buy.FillPrice and sell.FillPrice. You could access them in OnOrderEvent(){https://www.quantconnect.com/docs/algorithm-reference/trading-and-orders#Trading-and-Orders-Order-Events}. However, by self.Buy() and self.Sell() we actually make MarketOrder which fills immediately, the fill price is buy.AskPrice and sell.BidPrice for buy and sell repectively.
3) It's theoretical profit. It calculates the profit if the options expire immediately and exersice.
4) The "total equity" you see is actually self.Portfolio.TotalPortfolioValue . It stands for the current market price of all of your holdings. As the price goes up, the total value of the two options we are holding also goes up and that's why you see the total holding value is not exactly the original cash in hand.