* Red S <[email protected]> [2019-11-25 02:18]:
> 2016-01-07 * "sell"
> Assets:Inv -10 XYZ @ 8 USD
> Assets:Bank 80 USD
> Income:CapGains
do it manually:
2016-01-07 * "sell"
Assets:Inv -3 XYZ { 9 USD} @ 8 USD
Assets:Inv -3 XYZ {10 USD} @ 8 USD
Assets:Inv -4 XYZ {11 USD} @ 8 USD
Assets:Bank 80 USD
Income:CapGains
or calculate average cost first manually:
2016-01-07 * "Calculate average cost"
Assets:Inv 10 XYZ {10.1 USD}
Assets:Inv -3 XYZ { 9 USD}
Assets:Inv -3 XYZ {10 USD}
Assets:Inv -4 XYZ {11 USD}
2016-01-07 * "sell"
Assets:Inv -10 XYZ {10.1 USD} @ 8 USD
Assets:Bank 80 USD
Income:CapGains
> So I really have zero units of XYZ. However, because of the way these are
> booked, bean-price includes XYZ in its output. Given I have several such
> cases, what is the best way to handle this? I can think of these:
> - wait until average cost booking is available (will it solve this problem?)
> - book the purchases above as prices instead of commodities held at cost
> (will I lose the average cost of the commodity? How will I know the cost
> basis to book profit and loss?)
> - hack a way to get a list of commodities whose lots aggregate to zero, and
> remove those from what bean-price lists?
> - something else?
>
> Thank you.
>
> --
> 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/5e4d37c1-016d-499b-a988-a2cf0e7138eb%40googlegroups.com.
--
Martin Michlmayr
https://www.cyrius.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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beancount/20191126181423.GA11129%40jirafa.cyrius.com.