Re: lot-date for average cost

2018-03-21 Thread Martin Blais
Well the shares have to have been acquired on the same day... might as well
not count as average.


On Mon, Mar 19, 2018 at 9:43 AM, Justus Pendleton 
wrote:

> On Monday, March 19, 2018 at 3:19:48 PM UTC+7, Martin Blais wrote:
>>
>> Actually, to be realistic, in the US, everything I know that's allowed at
>> average cost is treated as tax-free, e.g. in a 401k plan.
>>
>
> In Australia you are allowed to use average cost basis for taxable things
> (with a few restrictions[1]). So a "various" wouldn't work for Australia.
>
> [1]: https://www.ato.gov.au/General/Capital-gains-tax/
> Shares,-units-and-similar-investments/Identifying-when-
> shares-or-units-are-acquired/
>
> --
> 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/98e7d520-dd1e-4a95-9250-6398d62f0452%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+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%2BhMdgpoBpZEsCuJJ%2BtFYrSugF2%2BJZ89NaeFSyNXPGhD2wA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: lot-date for average cost

2018-03-19 Thread Justus Pendleton
On Monday, March 19, 2018 at 3:19:48 PM UTC+7, Martin Blais wrote:
>
> Actually, to be realistic, in the US, everything I know that's allowed at 
> average cost is treated as tax-free, e.g. in a 401k plan.
>

In Australia you are allowed to use average cost basis for taxable things 
(with a few restrictions[1]). So a "various" wouldn't work for Australia.

[1]: 
https://www.ato.gov.au/General/Capital-gains-tax/Shares,-units-and-similar-investments/Identifying-when-shares-or-units-are-acquired/

-- 
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/98e7d520-dd1e-4a95-9250-6398d62f0452%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: lot-date for average cost

2018-03-19 Thread Martin Blais
On Fri, Mar 16, 2018 at 6:38 AM, Martin Michlmayr  wrote:

> * Martin Blais  [2018-02-06 00:43]:
> > > > 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 ccycostcost-ccy lot-datelabel
> > > >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.
> >
> > The thing is in the USA it may have tax consequences, e.g. LT vs. ST
> > capital gains rates are different.
>
> I don't know much about US taxation but wouldn't it depend on the
> *last* time you bought something?
>

Actually, to be realistic, in the US, everything I know that's allowed at
average cost is treated as tax-free, e.g. in a 401k plan.
The reality is that for those lots, the date doesn't really matter, and
besides perhaps some generic marker like "VARIOUS" would be the better
treatment than making a choice.
That would introduce an inconsistency in the data type though, i.e,
"sometimes the lot date field is VARIOUS".

In the meantime, I think an option to decide which date should be selected
(oldest or newest) is totally fair game.



> Perhaps the Right Thing to do would be to provide an option to select what
> > should happen automatically.
>
> Right, that might be a good idea.
>
> Actually, I wanted to ask how the average cost method will work.
> Presumably, if I buy some shares and then buy more shares, it will
> calculate the average cost immediately?


> Personally, I prefer to keep the original holdings as long as
> possible.  i.e. I'd prefer to calculate the average cost only when
> needed (e.g. immediately before selling some).
>

IIRC that's the proposal I put forward, that lot augmentations shouldn't
merge immediately, but that lot reductions should trigger a merge before
and after reducing (to recalculate the cost, in case you reduce at another
cost than average).


Will this be possible?  e.g. can I tell beancount not to use anything
> and then easily call the average cost function from beancount code?
>

Yes, I think this way it makes it automatic enough, yet it leaves some
under your control.

Another option will also be to leave the account as e.g., FIFO but if/when
you want to force averaging, you could use the unimplemented merge marker
that's supported in the syntax, e,g. "{101.23 USD, *}".




--
> 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/20180316103800.atdrkt2vel2stxx2%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%2BhOLo9%3D9dp%3DmfMX4Po%2B0XyshR45E1V36WqKYyAwgApKZ2w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: lot-date for average cost

2018-02-05 Thread Martin Blais
On Sun, Feb 4, 2018 at 4:43 PM, Martin Michlmayr  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 ccycostcost-ccy lot-datelabel
> >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=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=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.


lot-date for average cost

2018-02-04 Thread Martin Michlmayr
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 ccycostcost-ccy lot-datelabel
>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?

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

-- 
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.