On Wed, Jul 30, 2014 at 6:33 AM, Nathan Grigg <[email protected]>
wrote:
> I am in favor of the recent changes to Equity:Capital Gains, etc, which
> allow you to book the gains to whichever account you want. The downside is
> that the final cost is now ignored. Here is an example:
>
> 2014-06-30 Sell stock
> Assets:Stock -40 TWTR {$30} @ $50
> Assets:Cash $2,000
> Income:Capital Gains $-800
>
> Now, change $50 to $5,000, and it still balances. The stock counts as
> quantity * cost, and the gain/loss is quantity * ( basis-cost), and the
> gain/loss is added to the total transaction, the end result is that the
> stock counts as quantity * basis.
>
Beancount has been doing the same thing since the beginning and it's a
solution that works.
The cash postings determine what is that actual PnL.
>
> The first solution that comes to mind is some kind of special syntax that
> allows you to capture the loss or gain.
>
> 2014-06-30 Sell stock
> Assets:Stock -40 TWTR {$30} @ $50
> Assets:Cash $2,000
> Income:Capital Gains @@
>
> This has the meaning “book gain/loss to Income:Capital Gains”. (The exact
> syntax is not important for now; this is the first thing that came to mind.)
>
> This will guarantee that the split between actual cash and gain/loss
> happens as desired. In fact, you could even elide the other amount:
>
> 2014-06-30 Sell stock
> Assets:Stock -40 TWTR {$30} @ $50
> Assets:Cash
> Income:Capital Gains @@
>
> Thoughts?
>
I'm trying to think how this generalizes...
What I can imagine is two sets of balances: balance all the costs, and
separately balance all the market values.
Postings without a cost can be either at cost (as in Assets:Cash above) or
at market value (as in Income:Capital Gains) above, which is what your @@
market classifies the posting as.
Does this generalize to multiple postings at cost, multiple postings with
either cost or market value?
And most importantly, is it really necessary? Why do you care about the
price?
The most important thing for calculating the profit how much was _actually_
deposited in the other legs.
The price is documentation.
(Beancount doesn't quite ignore it, it is used to synthesize price
directives automatically.)
And also, is this able to solve the problem of excluding commissions
pro-rate the number of shares?
(This problem has been solved in my inventory booking proposal using the
current "balance everything at cost".)
--
---
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 [email protected].
For more options, visit https://groups.google.com/d/optout.