PT4 documentation isn't complete yet, but you could check out the PT3
Tutorial: Custom Reports and Statistics to get started.
The starting stack is stored in the database field:
cash_hand_player_statistics.amt_before
To calculate that in BB divide by:
cash_hand_player_statistics.amt_before