This thread has conflicting information.
Here's the low-down:

- Average cost booking is not implemented. '*' won't work yet.

- Gains from exchange rates aren't being tracked. The correct way to
account for gains resulting in varying rates over time is to use the
"trading accounts" method linked somewhere else on this list, not the cost
basis. Eventually Beancount will make that method the default method to
balance currency conversions, and then it should be possible.

- However, if you're actually trading currencies for the sake of trading,
you should instead treat those trades not as Beancount currencies, but as
instruments, e.g. "USDCHF", in which case cost basis would make sense.
There's the extra complication of symmetry introduced by the unique nature
of currencies and I haven't bothered building something special for it. I
trade currencies myself, and I don't bother, I only report quarterly
aggregates (too many trades, and long/short exposure makes it more
complicated than I want to be, and my broker reports nice aggregates so why
bother).

I hope this helps,





On Mon, Sep 18, 2017 at 2:14 PM, patrick via Beancount <
[email protected]> wrote:

> Hi,
>
> I've now tried to search for this for quite a bit but somehow I'm not
> finding the right stuff or maybe not understanding it right and I hope
> someone can help me.
>
> I would like to separate the currency gains from other income and would
> like to also differentiate between realized and unrealized gain.
>
> Let's take the following example
>
> 2017-06-01 * "Buy USD"
> Assets:CHF -30 CHF
> Assets:USD 20 USD @ 1.5 CHF
>
> 2017-07-01 price USD 1.7 CHF
>
> 2017-08-01 * "Sell USD"
> Assets:USD -20 USD @ 2 CHF
> Assets:CHF           40 CHF
>
>
>    - On 2017-07-01 I would have an unrealized currency gain of 4 CHF, how
>    would I see this?
>    - On 2017-08-02 I would have a realized currency gain of 10 CHF, how
>    would I set this up to see this as income?
>
>
> One thing I found was
> http://www.mathstat.dal.ca/~selinger/accounting/tutorial.html
>
> Which looked quite interesting to me and seems to have a solution for this
> but I'm struggling with implementing some of the details of it.
> I think in my case the concept of "adjusted cost base" seems to be the
> simplest and make sense.
>
> So if I understood that correct I would need to do the following:
>
> 2017-06-01 *
> Assets:CHF -30 CHF
> Income:USDTrading       30 CHF
> Income:USDTrading       -20 USD
> Assets:USD 20 USD
>
> 2017-07-01 price BTC 0.30 CHF
>
> 2017-08-01 *
> Assets:USD -20 USD
> Income:USDTrading       20 USD
> Income:USDTrading       -30 CHF
> Income:USDTradingRealized       -10 CHF
> Assets:CHF           40 CHF
>
> What I get out of this
>
>    - If I take the balance of Income:USDTradingRealized with the current
>    exchange rate this should reflect my unrealized gain
>
>
> A couple of things that confuse me
>
>    - This feels somehow "wrong" as I'm no longer using the @ price
>    annotation and have this price implicit in the difference between the
>    amounts in one currency going into the USDTrading and and out of the
>    USDTrading in the other currency.
>    - I need to manually calculate the -10 CHF realized gain
>    - Income:USDTradingRealized could actually be an income or an expense,
>    depending on current exchange rates
>
>
> Can anyone help me with this or point me in the right direction?
>
>
> Thanks and Regards,
> Patrick
>
>
> --
> 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/397c15c6-c5ea-4d9c-917f-60adf03344d4%40googlegroups.com
> <https://groups.google.com/d/msgid/beancount/397c15c6-c5ea-4d9c-917f-60adf03344d4%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 [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/CAK21%2BhP%2BvBHMGenBG9zMz3zhaYF7j%2Byj1YPyXXV42kqjgFKnig%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to