On Wed, Jul 16, 2014 at 4:06 AM, Stefano Zacchiroli <z...@upsilon.cc> wrote:

>
> > I'm not so sure I understand your concern. Please be specific (this is
> > subtle).
> > If you use {} to specify the cost, e.g.,
> >
> >   ...    -10 MSFT {}
> >
> > this is only unambiguous in the case the inventory has a single lot for
> > that commodity, so that degenerates to the same as the average cost (the
> > average cost of one lot is ... just the cost of that lot).
> > Otherwise, you'd have to use {*} everywhere there might be ambiguity:
> >
> >   ...    -10 MSFT {*}
> >
> > In which case every lot reduction triggers an aggregation.
>
> If there is a way to enforce the invariant that there is always only one
> lot, then I'd be fine with the {} version. But AFAICT there is no such
> way, as when I buy, it will create lots at different prices, right?
>

Yes. When you buy, you cannot use {} nor {*} anyway, you have to provide
the cost basis.
The question at hand is whether it triggers a merge of the lots right away,
or later, on the subsequent reduction.



>
> So, unless there is a way to automatically trigger lot merge also when
> *increasing* a position, it looks like one will have to invariably use
> the {*} version because, AFAIU the current state of your spec, lot
> merges are performed only when reducing. (Or maybe they also happen upon
> increases if you've chosen AVERAGE as the default posting method, but
> that was not entirely clear to me upon first read.)


Auto-trigger lot merge on lot creation is a good idea.
When I implement it I'll see if it fits the paradigm, it might be easy and
it might just make sense.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to