> a stock purchase/sale. Is there a convention for this?
Yes, the typical convention is as follows:
2004/05/01 Stock purchase
Assets:Broker 50 AAPL @ $30.00
Expenses:Broker:Commissions $19.95
Assets:Broker $-1,500.00
This assumes you have a brokerage account that is capable of managed
both liquid and commodity assets. Now, on the day of the sale:
2005/08/01 Stock sale
Assets:Broker -50 APPL {$30.00} @ $50.00
Expenses:Broker:Commissions $19.95
Income:Capital Gains $-1,000.00
Assets:Broker $2,500.00
You can, of course, elide the amount of the last posting. I just put
it there for clarity's sake.
The {$30.00} is a lot price. You can also use a lot date,
[2004/05/01], or both, in case you have several lots of the same price/
date and your taxation model is based on longest-held-first.
John
> Do you know of any other ledger related tools for computing the gains
> or losses using different methods for cost calculation (average cost,
> first-in-first-out (same as longest-held-first), last-in-first-out)?
Right now -- as with most things in the ledger world because it's about
reporting and not entering or modifying data -- you have to manually
specify exactly which past commodities you wish to sell. I think a GUI
on top of Ledger could do a good job of showing you which lots are
held, and allowing you to select an optimum set based on your desired
cost calculation. But the Ledger core does none of this.
John
> So you need to specify the original cost of the commodities you wish
> to sell or the date on which you bought those commodities or both?
You can specify one, both or none.
> What does ledger do if you specify neither?
Ledger itself doesn't actually know anything about commodities as
opposed to anything else you might trade. Depending on the
information you provide, it can generate reports which reflect that
info. If you don't provide it, it just won't come through in any
reports.
> Must the cost be the actual purchase price or can it be an average
> cost?
Must be the actual purchase price.
> Since capital gains (or profit in general) is both an income entry and
> a kind of report, might a ledger option compute these profit entries
> on behalf of the user which the user could then use to replace the
> original entries? Or, if the user leaves them out, might ledger
> compute them automatically, similar to how it already automatically
> balances a transaction by calculating the other side?
Ledger doesn't really do any automatic computation of this kind. That
would be the job of an external tool, which might then generate Ledger-
compatible transactions.
John