Richard,

ok, thanks, it works indeed! Great!  It also works if I run report on 
assets all together

ledger -f ledger.txt bal Assets  -X EUR --now 2018-12-31 --unrealized


But I am just thinking aloud here.

Unrealized gains can only happen against assets, they cannot happen against 
expenses or income. Correct?  So, to see all unrealized gains one just 
needs to mention

  
bal Assets
 

However unrealized gains only make sense to show in "Income statement-like 
report", hence in report, which contains Income and Expenses, but not 
Assets, however I am forced to include Assets.

You can see on the below example

====================================================================
2018-01-01  Opening Balance
    Assets:Checking                         1000.00 USD
    Equity:Opening Balances


P 2018-01-01 USD 1 EUR
P 2018-07-01 USD 1.5 EUR
==================================================================


So, at the end of the year I became 500 Euro richer due to exchange rate 
change.

Ledger does calculate unrealized gain correctly

ledger -f ledger.txt bal Assets  -X EUR --now 2018-12-31 --unrealized
             EUR1500  Assets:Checking
             EUR-500  Equity:Unrealized Gains
--------------------
             EUR1000



But what is the meaning of these EUR1000 below the line?
What Ledger is trying to tell me?
Does it make any sense to add together Assets and unrealized gains? 
I don't think these 1000 EUR have any sense

I would expect some report, which would have EUR -500 below the line. 
Because I because richer by 500 EUR, which is supposed to be -500 in income 
statement in ledger's terms

Do you have any comments?


On Wednesday, March 6, 2019 at 1:29:43 PM UTC+1, Richard Lawrence wrote:
>
> Hi Chary, 
>
> Chary Chary <[email protected] <javascript:>> writes: 
>
> > But I can't find any report, which would show me why assets have 
> increased 
> > 2 times. Option --unrealized  does not have any effect in this case 
> > 
> > I would expect some report, which would say something like 
> > 
> > -1000 EUR Unrealized gain 
> > -1000 EUR    Unrealized gain due to EUR/USD changes 
> > 
> > So, how can it be done? 
>
> I think John answered without seeing that you had already tried 
> --unrealized, so let me try to help: 
>
> There is something sort of subtle going on with --unrealized.  If you 
> just run the balance report with --unrealized, but without specifying 
> any account like you did here: 
>
> > C:\_code\ledger>ledger -f ledger.txt balance -X EUR --now 2018-12-31 
> >              EUR2000  Assets:Checking 
> >             EUR-2000  Equity:Opening Balances 
> > -------------------- 
> >                    0 
>
> then you won't see any unrealized gains.  But if you specifically ask 
> for the balance of the Checking account in EUR, you'll see the 
> unrealized gains: 
>
> ledger -f ledger.txt bal Checking  -X EUR --now 2018-12-31 --unrealized 
>              EUR2000  Assets:Checking 
>             EUR-1000  Equity:Unrealized Gains 
> -------------------- 
>              EUR1000 
>
> I don't know exactly why this is, or even whether it's expected 
> (vs. being a bug), but maybe it makes some sense: when you're getting 
> the balance of all accounts together, including Equity, there are no 
> "unrealized" gains (the gains are "realized" in Equity, or at least 
> reflected in the balance of the Equity account, as you noticed).  But 
> when you are just getting the balance of Checking, and you're getting it 
> in a currency other than the amount actually inside that account, then 
> there are unrealized gains in that account, which ledger notices. 
>
> Hope that helps! 
>
> -- 
> Best, 
> Richard 
>

-- 

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

Reply via email to