I’ve made a preliminary spreadsheet with a rolling daily NAV calculation for assets on exchange at Cryptopia.
The spreadsheet is on Google Docs here: https://docs.google.com/spreadsheets/d/12-WtyJAPM_x3AQuqXh5LBMvQq0ReFyhz3-hiPyQVaMw/edit?usp=sharing
The first sheet is the raw data that I’ve used. I’ve pulled deposits, withdrawals and trades from the Cryptopia API and collected historical Bitcoin prices from the Coindesk HIstrical BPI API detailed here http://www.coindesk.com/api/.
The second sheet is the NAV calculation which I have kept a running total of each asset, adding and subtracting appropriately as deposits, withdrawals and trades take place. Then for each days total, I calculate the dollar value of the Bitcoin on account and add it to the NBT on account (I assume that NBT is $1). The code for this calculation looks like this:
# transactions
if activity['activity_type'] == 'transaction':
if activity['Type'] == 'Deposit':
if activity['Currency'] == 'BTC':
btc_total += Decimal(activity['Amount'])
if activity['Currency'] == 'USNBT':
nbt_total += Decimal(activity['Amount'])
if activity['Type'] == 'Withdraw':
if activity['Currency'] == 'BTC':
btc_total -= Decimal(activity['Amount'])
if activity['Currency'] == 'USNBT':
nbt_total -= Decimal(activity['Amount'])
# trades
if activity['activity_type'] == 'trade':
if activity['Type'] == 'Sell':
nbt_total -= Decimal(activity['Amount'])
btc_total += Decimal(activity['Total'])
if activity['Type'] == 'Buy':
nbt_total += Decimal(activity['Amount'])
btc_total -= Decimal(activity['Total'])
The third sheet is a chart showing the NAV per day. It’s the same chart as below:

While I am confident that the maths is good and the data complete, I would appreciate any feedback on the calculation and my method along with any improvements anyone would like to see. As mentioned elsewhere, the next step will be to do similar with assets at Bittrex or held elsewhere, then to automate the update of the data and populate a dynamic chart somewhere where it’s immediately obvious to all.