Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
How is the gains being calculated?

I am trying to understand how the initial position value and gains are being calculated in the "Daily Positions and Gains" part of the backtest.

I'm just looking at a simple long AAPL and short MSFT. I understand the initial position values for both stocks, but what I am trying to understand is how is the initial cash value being calculated, and subsequently how the initial gains are calculated for both stocks.