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
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).
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
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.
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?I don't understand the question. If you try to reduce and provide USD in the description, it will only match against lots in USD. Can you provide an example pair of transactions?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'm still not sure I understand, it will never convert currencies when reducing.
option "title" "My Personal Ledger"
option "operating_currency" "USD"
option "operating_currency" "CAD"
option "booking_method" "FIFO"
2016-01-01 open Equity:Opening-Balances
2016-01-01 open Assets:US:Cash USD
2016-01-01 open Assets:CA:Cash CAD
2016-01-01 open Assets:MyBackpack:Stuff APPLES
2016-01-01 open Income:CapitalGains
2016-05-26 price CAD 0.77046 USD
2016-05-28 price CAD 0.76761 USD
2016-05-24 * "Opening Balances"
Assets:US:Cash 40.00 USD
Assets:CA:Cash 0.00 CAD
Equity:Opening-Balances
2016-05-25 * "Bought some apples in New York"
Assets:MyBackpack:Stuff 10 APPLES {1.00 USD}
Assets:US:Cash
2016-05-26 * "Convert USD to CAD"
Assets:CA:Cash
Assets:US:Cash -15.03 USD @ 1.29792 CAD
2016-05-26 * "Bought some more apples in Montreal"
Assets:MyBackpack:Stuff 13 APPLES {1.50 CAD}
Assets:CA:Cash
2016-05-27 * "Bought some apples in New York"
Assets:MyBackpack:Stuff 11 APPLES {1.20 USD}
Assets:US:Cash
2016-05-28 * "Sold some more apples in Montreal"
Assets:MyBackpack:Stuff -14 APPLES {USD} @ 1.70 CAD ; should sell 10 APPLES {1.00 USD} & 4 APPLES {1.50 CAD}, a cost basis of 14.605 USD
Assets:CA:Cash 23.80 CAD ; converts to 18.269 USD
Income:CapitalGains ; revenue (18.269 USD) - cost basis (14.605 USD) = 3.665 USD
; CapitalGains = 3.47 USD per beancount when the {1.50 CAD} lot doesn't get reduced.
2016-05-28 * "Sold some more apples in Montreal"
Assets:MyBackpack:Stuff -10 APPLES {USD} @ 1.70 CAD
Assets:MyBackpack:Stuff -4 APPLES {CAD} @ 1.70 CAD
Assets:CA:Cash 23.80 CAD
Income:CapitalGains
One clarification: over lunch I was thinking about this, and realized that beancount does FIFO booking reductions correctly for securities like stocks under the usually valid assumption a security is sold/ reduced in the same currency it was purchased in, since each security is denominated in the currency of its exchange.
This is reasonable: if one buys shares in Nokia (NOK) listed on the New York Stock Exchange, they're always listed in USD. Shares listed in EUR are available on the Helsinki Stock Exchange, but their symbol is NOKIA, hence a different security.
Where thinks currently seem not to work is if one is tracking a real commodity -- apples, bitcoin, or coffee -- anything that doesn't have an intrinsic currency for valuing it.
Does that make sense, or have I misunderstood something?
Thanks for all you work on beancount. It's a great tool!
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/dc892eed-3ce2-4372-92c3-6decc85ccab0%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
Hi,I've just read the Selinger's excellent post. I have a few questions:1. Martin said "This transaction is inserted by this code:", but then it's followed by the duplicate link to the Selinger's post (probably mistakenly). What's the correct link?
2. Using Selinger's terminology, what method of multiple currency balancing is used in beancount? I'm coming from Gnucash, so I'm familiar with the Trading Accounts method.
3. Is there beancount documentation devoted to the multiple currency question? I think I've read most of the docs, but don't recall anything.
Thank you!Dennis Golomazov
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/e1b43304-3ea7-407b-a03c-45d76e7accf8%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/e1b43304-3ea7-407b-a03c-45d76e7accf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAK21%2BhP8WT0GCXxz73Vv7PrJviqYftC8zsduAsBxwjbG9Ogk%3Dg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/e1b43304-3ea7-407b-a03c-45d76e7accf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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 post to this group, send email to bean...@googlegroups.com.
Hi,I have been thinking about this and it seems that regular syntax doesn't contain enough information (if you don't use the position syntax with {}) for it to be possible (or at least feasible) to implement it.
The information gets lost when you do transformations like CurrencyA => CurrencyB => CurrencyC => CurrencyAIn this case there has to be some hint as to which lot/position you are trading or the software has to hold a "full-path" reference to the positions (the whole history of trading) which will explode in complexity. I presume GnuCash generates positions/lots upon every transformation between currencies.
Of course, I might be wrong in my understanding of the whole process, please correct me if so.
Best Regards,Metin
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/e1b43304-3ea7-407b-a03c-45d76e7accf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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 post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAK21%2BhP8WT0GCXxz73Vv7PrJviqYftC8zsduAsBxwjbG9Ogk%3Dg%40mail.gmail.com.
--
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 post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAEk80bmtGDeSKT%2B%2BPsx-x-DCozOdspXTaTWZQ05axVyEwMtDaw%40mail.gmail.com.
Best Regards,Metin
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/e1b43304-3ea7-407b-a03c-45d76e7accf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAK21%2BhP8WT0GCXxz73Vv7PrJviqYftC8zsduAsBxwjbG9Ogk%3Dg%40mail.gmail.com.
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAEk80bmtGDeSKT%2B%2BPsx-x-DCozOdspXTaTWZQ05axVyEwMtDaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAK21%2BhNqFLdtWn-A7CbJgHZqJ3aG0ZOC3aQjFD91OBPcFFYERA%40mail.gmail.com.