How do I get the "cost basis" for a given position?  I'm trying to replicate behaviour from Quantopian, so I'm looking for the VWAP per share of a given position.  Is this something I need to calculate myself?

Author