Hi,
Here is an example. Sorry that it's a bit long, but it needs to be, so that
<Adjustment> shows up:
2015-01-01 Broker
Assets:Broker 2000 USD
Assets:Bank -1800 EUR ; I don't care if exchange rates are correct
2015-01-02 Apple
Assets:Stocks:AAPL 1 AAPL
Assets:Broker -500 USD
2015-01-02 Microsoft
Assets:Stocks:MSFT 1 MSFT
Assets:Broker -500 USD
P 2015-01-10 AAPL 510 USD
P 2015-01-10 MSFT 520 USD
P 2015-02-15 USD 1 EUR
P 2015-02-15 AAPL 520 USD
P 2015-02-15 MSFT 530 USD
2015-02-20 Microsoft
Assets:Stocks:MSFT 1 MSFT
Assets:Broker -535 USD
2015-02-20 Apple
Assets:Stocks:AAPL 1 AAPL
Assets:Broker -525 USD
Then I do my report like this:
ledger -f example.ledger -M reg ^Assets -X EUR
And here is the result:
15-Jan-01 - 15-Jan-31 Assets:Bank -1800 EUR
-1800 EUR
Assets:Broker 900 EUR
-900 EUR
Assets:Stocks:AAPL 459 EUR
-441 EUR
Assets:Stocks:MSFT 468 EUR
27 EUR
15-Feb-01 - 15-Feb-28 <Adjustment> 228 EUR
255 EUR
Assets:Broker -1055 EUR
-800 EUR
Assets:Stocks:AAPL 520 EUR
-280 EUR
Assets:Stocks:MSFT 535 EUR
255 EUR
Then my script accumulates these "changes" to generate "current value".
When I do this over a lot of months, the <Adjustment> keeps getting bigger
and bigger.
And it's only one <Adjustment> section for all of the portfolio
The perfect thing would be if Ledger reported no <Adjustment> and just
included the "current value" of the respective asset.
One other solution would be if I run my report once per stock and do the
calculations myself, but that will require more hacking on my side (which
I'll probably do at some point)
On Tue, Dec 15, 2015 at 12:16 AM, Martin Michlmayr <[email protected]> wrote:
> * Metin Akat <[email protected]> [2015-11-16 01:15]:
> > All of my assets get reported with their "original" prices and the plot
> is
> > really boring (they don't change over time).
> > On top of that I get quite a big "<Adjustment>" lump which brings the
> > running total to the correct value, but the adjustment is summed together
> > for all the assets.
> >
> > What I'd like to be able to do is either:
> >
> > 1. Report the "projected to current prices" change of each account and no
> > <Adjustment> entry at all
> > 2. Have a separate <Adjustment> per account. Then I can sum this with my
> > "original" asset value.
> >
> > Both of these would work equally good for me.
> > Is there a way to achieve it?
>
> Can you show an example showing how you track your assets in ledger?
>
> Using shares as an example, you could use the -B option to get the
> cost and -V to get the market value. -G, gain, is the difference.
>
> ledger -f d bal assets:inve -B
> 10.00 EUR Assets:Investments
> ledger -f d bal assets:inve -V
> 12.00 EUR Assets:Investments
> ledger -f d bal assets:inve -G
> 2.00 EUR Assets:Investments
>
> D 1000.00 EUR
>
> 2015-01-01 * Buy 1 AAA for 10 EUR
> Assets:Investments 1 AAA @@ 10.00 EUR
> Assets:Cash
>
> P 2015-02-02 AAA 12.00 EUR
>
> --
> 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.
>
--
---
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.