Hello fellow beancount users,

I've got a bunch of bitcoin purchases in USD that I then sold for EUR, and 
beancount isn't matching the EUR sales with the USD purchases of bitcoin. 
Running *bean-check* against the transactions results in a "No position 
matches" and a list of the current non-reduced lots--all denominated in 
USD. I have daily EUR - USD and BTC - USD price histories per beancount's 
syntax in my ledger file. All my sales of bitcoin to USD reduced just 
fine... its just the sales to EUR that aren't working out.

Originally I had my reducing legs of the transactions with empty curly 
braces {} but then I tried the following:

option "title" "My Personal Ledger"
option "operating_currency" "USD"
option "booking_method" "FIFO"

2013-01-01 open Equity:Opening-Balances
2013-01-01 open Assets:Crypto:Bitcoin           BTC
2013-01-01 open Assets:Checking:CapitalOne      USD
2013-01-01 open Expenses:Crypto:Fees:Coinbase   USD
2013-01-01 open Assets:Checking:BNP             EUR
2013-01-01 open Income:CapitalGains

2016-05-25  price  BTC    449.24 USD
2016-05-25  price  EUR    1.12 USD
2016-05-27  price  BTC    474.38 USD
2016-05-27  price  EUR    1.11 USD

2016-05-25 * "Coinbase" "Bitcoin purchase"
    Expenses:Crypto:Fees:Coinbase    4.60 USD
    Assets:Crypto:Bitcoin            1.02140000 BTC {450.07 USD}
    Assets:Checking:CapitalOne    -464.30 USD

2016-05-27 * "(s9d8fukf0)" "Sell BTC via bitsquare"
    Assets:Crypto:Bitcoin           -0.50000000 BTC {USD} @ 416.75 EUR
    Assets:Checking:BNP            208.38 EUR
    Income:CapitalGains

2016-05-27 * "(l2l3jfp5d)" "Sell BTC via bitsquare"
    Assets:Crypto:Bitcoin           -0.50000000 BTC {USD} @ 412.00 EUR
    Assets:Checking:BNP            206.00 EUR
    Income:CapitalGains

That seems to work, except that that *bean-report* balances now shows me 
EUR and USD on separate capital gains lines:
Income:CapitalGains             -414.38       EUR
Income:CapitalGains              450.07       USD

So, I've got two questions:

1. Since my file includes prices, is there a way I can have beancount know 
the USD equivalent for reducing lots in EUR that were purchased with USD?

2. If I explicitly put "USD" in all my empty {}, how does will FIFO booking 
option handle the occasional cases where I've purchased bitcoin with euros? 
Will it always reduce the oldest bitcoin lots first, regardless of the 
currency I'm reducing with, or will explicitly specifying the reducing 
currency mean I have to manually check the order lots are cleared to make 
sure that the total of the two currencies reduces correctly per FIFO?

I guess I'm looking to understand more specifically what the FIFO booking 
is doing or not doing when a commodity (BTC) is purchased in one currency 
(USD) and sold in another (EUR).


-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/77653225-48df-4b1d-8e36-939a4ae6b138%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to