* Christophe Schockaert <[email protected]> [2014-06-11 22:10]:
> ; Details of shares at 2014/01/01
> 2014-01-01 Details for shares
> Assets:Investments:Stocks:Total Value
This is incorrect (see below).
> Assets:Investments:Stocks:Share A 15 ShareA @ 20€
> Assets:Investments:Stocks:Share B 5 ShareB @ 100€
>
> Then, I run "ledger --real -B -V balance", which returns:
> : 5000,00 € Assets
> : 5000,00 € Bank:Check Account
> : 0 Investments:Stocks
> : 300,00 € Share A
> : 500,00 € Share B
> : -800,00 € Total Value
> : -5000,00 € Equity:Opening Balance
> : --------------------
> : 0
>
> That's fine. I understand that doing this, only the gains and loss will end in
> the assets. I put the "Total Value" entry in order to see at a glance the
> value
> of all shares.
This "Total Value" entry is incorrect. It's not the total value, but
the cost. You have share A worth 300 and share B worth 500. How did
you pay for those shares? You either have to reduce cash, or your
case, use Equity:Opening Balance.
What you want is something like this:
2014-01-01 Details for shares
Assets:Investments:Stocks:Share A 15 ShareA @ 20€
Assets:Investments:Stocks:Share B 5 ShareB @ 100€
Equity:Opening Balance
Also, -B -V doesn't make much sense together. -B is the cost (what
you paid), -V is the current value (what it's worth now). Look here:
2014-01-01 Details for shares
Assets:Investments:Stocks:Share A 15 ShareA @ 20€
Assets:Investments:Stocks:Share B 5 ShareB @ 100€
Equity:Opening Balance
P 2014-02-01 ShareA 30€
bal 'Assets:Investments:Stocks:Share A' -B
€300 Assets:Investments:Stocks:Share A
bal 'Assets:Investments:Stocks:Share A' -V
€450 Assets:Investments:Stocks:Share A
> In my second try (case B), I wish to see the contribution of my stocks within
> the assets (I don't know if that's a valid practice but it gives me an
> overview
> of the whole money available a time "t").
I don't know what you're trying to say exactly, but in any case, this
is the correct accounting practice to use.
> The, I sell some shares of stock B at a higher price, in both cases.
> This is were problems rises for me.
...
> There are a few things that bother me:
> 1) The presence of the "Equity:Capital Gains", which I understand balances
> the
> entry, but it is automatically added and I can't choose its name. I
> thought
> the balance would go to the "Income:Investments Gains" in fact.
These Equity entries ledger generates are wrong. This is bug
http://bugs.ledger-cli.org/show_bug.cgi?id=712
The good news is that John and I agreed on a fix recently. You can
try the 713-costs branch and see if it does what you expect.
> So, what's the status for this question ?
There's a fix. We're just waiting for more people to test it.
> 2) The left-over for "Share B" shows 260€, which does not render the fact
> that
> I still have 3 plain stocks, which would at least value 300€ (from their
> initial value), or 360€ for the current value.
This is http://bugs.ledger-cli.org/show_bug.cgi?id=713
which should be fixed on the 713-costs branch.
> 3) I would like to have a view of the left-over value of the stocks, at time
> "t". In "case A", the total still show "800€" which is the initial value,
> and in "case B", I see 560€, which reflects the "800€-240€", but not the
> sum of the 10 ShareA and the 3 remaining ShareB.
I'm not entirely sure I understand, but with the 713-costs branch,
you should get the correct result:
bal 'Assets:Investments:Stocks' -B
600,00 € Assets:Investments:Stocks
300,00 € Share A
300,00 € Share B
--------------------
600,00 €
bal 'Assets:Investments:Stocks' -V
660,00 € Assets:Investments:Stocks
300,00 € Share A
360,00 € Share B
--------------------
660,00 €
-B is the cost: you originally paid 20 for A and 100 for B: 3 * 100 + 15*20 =
600
-V is the current value. A is worth 20, B is worth 120: 3 * 120 + 15*20 = 660
> However, I run into other issues, mainly that it only uses the last value,
> even
> for the initial value, and if I mix the notation in "plain shares" (-2 ShareB)
> and the notation with attributed values (-2 ShareB {100€} @ 120€), they don't
> get along very well.
I'm not sure I understand.
BTW, you use Assets:Investments:Stocks:Share A and
Assets:Investments:Stocks:Share B
as account names. General practice on this list appears to be not to
use too many subaccounts. I'd just use Assets:Investments:Stocks for
both. If you want to see what Share A is worth only, you can do
-l "commodity == 'ShareA'"
--
Martin Michlmayr
http://www.cyrius.com/
--
---
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.