Requesting recommendation for tracking capital gains

58 views
Skip to first unread message

Ghanashyam Prabhu

unread,
Jan 18, 2021, 7:23:41 PM1/18/21
to Beancount
I am currently maintaining a beancount ledger file for tracking my crypto transactions and I'd like to seek advice on the workflow especially when recording capital gains from these transactions. Below is an example. 

Let's say I accumulated some BTC at some cost basis of 3500 and have a capital gain of 256.52$ from this transaction below. This transaction resulted in a total cash of $3756.53 which got deposited in my Coinbase account. What is the recommendation to track the capital gains correctly? Also is there a way I can automatically calculate short term and long term capital gains that could have resulted from this transaction?

I currently plan to add the below 

2020-11-26 * "Coinbase" "Sell BTC at Coinbase"
Assets:US:Crypto:Coinbase:BTC -0.22712412 BTC {} @ 16539.50 USD
Assets:US:Crypto:Coinbase:Cash 3500.00 USD
Income:Crypto:Capital-gains 256.52 USD

After this sell, I re-invested all of this cash of $3756.52 again to buy BTC again a few days later. At this point should I split the transaction to use the Cash of 3500 from Coinbase account and use a fresh $256.52 deducted from a different account (other than Crypto:Capital-gains)? 

I think I should be using $252.56 from a different account since using it from the Capital-gains account will reduce my actual Capital-gains to 0 i.e. which is incorrect. On the other hand, using money from a different account is also incorrect since I re-used the money from total cash generated by the Sell transaction.

Option 1 (this seems incorrect)
2020-11-28 * "Coinbase" "Buy BTC at Coinbase"
  Assets:US:Crypto:Coinbase:BTC           0.20778508 BTC {} @ 18078.87 USD
  Assets:US:Crypto:Coinbase:Cash            -3500.00 USD
  Assets:US:BofA:Checking                           -256.52 USD 

Option2 (this seems incorrect since it reduces Capital-gains to zero)
2020-11-28 * "Coinbase" "Buy BTC at Coinbase"
  Assets:US:Crypto:Coinbase:BTC           0.20778508 BTC {} @ 18078.87 USD
  Assets:US:Crypto:Coinbase:Cash            -3500.00 USD
  Assets:US:Crypto:Coinbase:Capital-gains  -256.52 USD 

Please suggest what is a good way to handle this where I'd like to track Capital Gains at the end of the year for taxation. 

Thanks
Ghanashyam

Martin Blais

unread,
Jan 18, 2021, 9:55:44 PM1/18/21
to Beancount
On Mon, Jan 18, 2021 at 7:23 PM Ghanashyam Prabhu <gpio...@gmail.com> wrote:
I am currently maintaining a beancount ledger file for tracking my crypto transactions and I'd like to seek advice on the workflow especially when recording capital gains from these transactions. Below is an example. 

Let's say I accumulated some BTC at some cost basis of 3500 and have a capital gain of 256.52$ from this transaction below. This transaction resulted in a total cash of $3756.53 which got deposited in my Coinbase account. What is the recommendation to track the capital gains correctly?

What precisely do you mean by "track"?
Tell us what you need to do.

 
Also is there a way I can automatically calculate short term and long term capital gains that could have resulted from this transaction?

All the data is there, but you have to write scripts.
e.g.

BTW, this will be much easier in the next version because I'm going to add a way to easily extract "trades" with incoming and outgoing postings matched up.

 

I currently plan to add the below 

2020-11-26 * "Coinbase" "Sell BTC at Coinbase"
Assets:US:Crypto:Coinbase:BTC -0.22712412 BTC {} @ 16539.50 USD
Assets:US:Crypto:Coinbase:Cash 3500.00 USD
Income:Crypto:Capital-gains 256.52 USD

After this sell, I re-invested all of this cash of $3756.52 again to buy BTC again a few days later. At this point should I split the transaction to use the Cash of 3500 from Coinbase account and use a fresh $256.52 deducted from a different account (other than Crypto:Capital-gains)? 

No. You entered this wrong. It should be:

2020-11-26 * "Coinbase" "Sell BTC at Coinbase"
Assets:US:Crypto:Coinbase:BTC -0.22712412 BTC {} @ 16539.50 USD
Assets:US:Crypto:Coinbase:Cash 3500.00 + 256.52 USD
Income:Crypto:Capital-gains -256.52 USD
 
The number from the second leg is something you should be able to import from your account/institution, and in practice you'd write it like this (same numbers):

2020-11-26 * "Coinbase" "Sell BTC at Coinbase"
Assets:US:Crypto:Coinbase:BTC -0.22712412 BTC {} @ 16539.50 USD
Assets:US:Crypto:Coinbase:Cash 3756.52 USD
Income:Crypto:Capital-gains 


I think I should be using $252.56 from a different account since using it from the Capital-gains account will reduce my actual Capital-gains to 0 i.e. which is incorrect. On the other hand, using money from a different account is also incorrect since I re-used the money from total cash generated by the Sell transaction.

Option 1 (this seems incorrect)
2020-11-28 * "Coinbase" "Buy BTC at Coinbase"
  Assets:US:Crypto:Coinbase:BTC           0.20778508 BTC {} @ 18078.87 USD
  Assets:US:Crypto:Coinbase:Cash            -3500.00 USD
  Assets:US:BofA:Checking                           -256.52 USD 

Option2 (this seems incorrect since it reduces Capital-gains to zero)
2020-11-28 * "Coinbase" "Buy BTC at Coinbase"
  Assets:US:Crypto:Coinbase:BTC           0.20778508 BTC {} @ 18078.87 USD
  Assets:US:Crypto:Coinbase:Cash            -3500.00 USD
  Assets:US:Crypto:Coinbase:Capital-gains  -256.52 USD 

Capital-gains is never an Assets account.
Those two transactions make no sense to me.
Just record it like the second one I suggest and it all just works out.
Remember: you record what's actually happening in the accounts. 

 

Please suggest what is a good way to handle this where I'd like to track Capital Gains at the end of the year for taxation. 

Thanks
Ghanashyam

--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/df24be66-a890-4c87-bbca-e8c3afdfa532n%40googlegroups.com.

Ghanashyam Prabhu

unread,
Jan 19, 2021, 12:06:54 AM1/19/21
to bean...@googlegroups.com
Got it, I have updated the changes. I now understand the capital gains recording concept. 
 

Martin Blais

unread,
Jan 19, 2021, 8:08:48 AM1/19/21
to Beancount
No worries. 

Be patient. Learning how to do bookkeeping right is like solving little puzzles. It takes time. Eventually you see patterns.

(Two weeks ago I reviewed ten years of health care bills and finally figured out a decent way to handle all the variations of billing and converted all of them and reconciled a ton of errors I had made in recording. I need to write a doc on it)

Reply all
Reply to author
Forward
0 new messages