The answer will be surprising: it doesn't.
If you insert a commodity with a cost basis it is stored with the lot. If
it doesn't have a cost basis the cost is a null value. You can think of
that as a special lot with "no basis basis".

This may need to be revised to be less flexible following the updated
booking rules design (the one I wrote a doc about, that supports futures
and a simplified and more intuitive reduction syntax, the one that I'll
probably have time to implement in 2050 or so)

On Thu, Nov 24, 2022, 08:17 nug get <[email protected]> wrote:

> Hi all
> how does beancount differentiate between commodities where it keeps track
> of lots (shares) and those where it does not (currencies)?
>
> For example, I have two commodities USD and VTI (neither is the ledger
> base currency).
>
> Both are introduced the same way
>
> 1970-01-01 commodity USD
>     name: "US Dollar"
>   price: "CHF:yahoo/^CHFUSD=X"
> 1970-01-01 commodity VTI
>     name: "VTI"
>     price: "USD:yahoo/VTI"
>
> accounts are opened the same way
> 1970-01-01 open Assets:Invest:IB:VTI     VTI
> 1970-01-01 open Assets:Invest:IB:USD     USD
>
> but still beancount keeps track of VTI lots, but not of USD lots.
>
> Where is the difference between them introduced? How can I control it?
>
> Thanks!
> Best,
> Nugget
>
> --
> 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/CAHUjHhE%3DP5M2VK_OD%3DB%3D-d0PCDHXJVkJigKZ2myQ-iSfdNuGHQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/beancount/CAHUjHhE%3DP5M2VK_OD%3DB%3D-d0PCDHXJVkJigKZ2myQ-iSfdNuGHQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAK21%2BhOanj_EbWo%2BcYoGa6i1O7DtUM2SHHdpUgUj1h2Qhsii-A%40mail.gmail.com.

Reply via email to