Hello!

I have a scary accounting question for Halloween...

I have 8 years of GnuCash data I'd like to convert to beancount. The 
problem is that, as far as I can tell, GnuCash doesn't track cost basis for 
trades. Because of that, I'm having difficulty replicating the suggested 
approach from https://beancount.github.io/docs/trading_with_beancount.html. 
I am using https://github.com/falsifian/gnucash-to-beancount and can 
'successfully' convert my data to beancount, but instead of specifying the 
cost basis, purchases of investments end up looking like:

2014-10-31 * "BUY 1 SPY @ 200"
  Assets:Current-Assets:Brokerage:SPY 1 SPY @ 200 USD 
  Assets:Trading:CURRENCY:USD 200 USD
  Assets:Current-Assets:Brokerage -200 USD
  Assets:Trading:NYSE:SPY -1 SPY @ 200 USD

Sales are in essentially the same form, just in reverse. In this way, my 
Assets:Trading:CURRENCY:USD 
account ends up being a weird combination of the total cost basis of all my 
current investments and the gains or losses from previous investments. 
Obviously I have enough data here to calculate the cost basis for 
*purchases* of investments, so that ought to be do-able with some 
modification of the gnucash-to-beancount scripts, but I'm not sure how best 
to handle the sales. I've been reading the beancount documentation and have 
found the "FIFO" booking method - is that pretty much my only option at 
this point? Are there any gotchas to using it in my case?

As a bonus - if I end up using the "FIFO" booking method, is it possible to 
get beancount re-write my .beancount file with the cost basis it calculated 
internally for the sales? My goal there would be to make the implicit cost 
basis on sales explicit - and allow me to use STRICT moving forward without 
having to manually fix up 8 years of transactions.

Thanks for any pointers!

-Aaron

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/01dd4feb-9b9a-423b-bbee-d7a9d2613035n%40googlegroups.com.

Reply via email to