On Mon, Jun 23, 2014 at 02:02:57AM -0400, Martin Blais wrote:
> I've been doing some thinking about improving the booking method used
> in Beancount. In the following document, I summarize the issues with
> inventory booking and list some unsatisfied use cases, identify
> current shortcomings in both Beancount and Ledger (with specific
> examples), list a set of requirements for a better inventory booking
> method and outline a design proposal for an improved method:
> 
> https://docs.google.com/document/d/1F8IJ_7fMHZ75XFPocMokLxVZczAhrBRBVN9uMhQFCZ4/

I've finished going through it only now.  I'm affected by one of the
problems you describe, namely the inability to book against the average
cost lot (your "{*}" syntax), and I've found the solution you propose
quite elegant.  Ditto for the mechanisms of specifying lots and
resolving incomplete (or "ambiguous", if you wish) lot specifications.

[ In passing: the only way I've found with Ledger to actually find out
  the average lot price is to first do
  "ledger bal Stocks -l 'commodity == XXX'", then redo the same adding
  "-B", and finally do the division myself. If there is a better way,
  I'd be glad to learn about it. ]

I'm left wondering whether average cost basis should be a per account
property, rather than (or maybe: in addition to) something that
auto-magically happen the first time you post using "{*}". 

Your main example for average cost basis are tax sheltered accounts. By
definition that is an example of an account-specific property. If that
is a common use case for average cost basis, then it'd make sense to
allow user to declare accounts (or account/commodity pairs, as we
discussed in the customizable rounding thread) as average cost basis.
Those accounts will have the property that they always contain a single
lot, whose cost is updated every time you post something to it,
computing the new average cost.

I wouldn't mind having both the ability to declare accounts as average
cost basis and, for other accounts, automatic fusion at the first
occurrence of "{*}".

I've also added other (minor/editorial) comments to the document itself.

Cheers.
-- 
Stefano Zacchiroli  . . . . . . .  z...@upsilon.cc . . . . o . . . o . o
Maître de conférences . . . . . http://upsilon.cc/zack . . . o . . . o o
Former Debian Project Leader  . . @zack on identi.ca . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »

-- 

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