On Sun, Feb 4, 2018 at 4:43 PM, Martin Michlmayr <t...@cyrius.com> wrote:

> The "How Inventories Work" document has the following example:
>
> > 2016-07-28 * "Buy some shares of retirement fund"
> >   Assets:Invest       45.0045 VBMPX {11.11 USD}
> >  …
>
> > 2016-10-12 * "Buy some shares of retirement fund"
> >  Assets:Invest       54.5951 VBMPX {10.99 USD}
> >   …
>
> > Should result in a single lot with the total number of units and the
> averaged cost:
> >          units ccy    cost    cost-ccy lot-date    label
> >        99.5996 VBMPX {11.0442 USD,     2016-07-28, None}
>                                          ^^^^^^^^^^
>
> But average cost is calculated with the second transaction so
> shouldn't the lot_date be 2016-10-12?
>

No, it's a choice.
See here in the incomplete code:
https://bitbucket.org/blais/beancount/src/9c9de54513aba0b55db8e7be626c8cdf9071fa67/beancount/parser/booking_method.py?at=default&fileviewer=file-view-default#booking_method.py-223

The thing is in the USA it may have tax consequences, e.g. LT vs. ST
capital gains rates are different.
Perhaps the Right Thing to do would be to provide an option to select what
should happen automatically.



>
> Also, what's the status of the average cost function?
>

Not done:
https://bitbucket.org/blais/beancount/src/9c9de54513aba0b55db8e7be626c8cdf9071fa67/beancount/parser/booking_method.py?at=default&fileviewer=file-view-default#booking_method.py-174





>
> --
> Martin Michlmayr
> http://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 beancount+unsubscr...@googlegroups.com.
> To post to this group, send email to beancount@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/beancount/20180204214349.atqbgvyvypiavcxc%40jirafa.cyrius.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+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhOH0FRDkhGA-H3Ra5SLmZtN%2B19FwmcEMJY0JLGPKdqsHw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to