Hi Chary and all, Here's a few more thoughts.
Chary Chary <[email protected]> writes: > 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 Yes, that makes sense to me. > 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. Here, I don't follow you. (Maybe I don't understand what an "income statement-like" report is?) Conceptually, it seems to me that unrealized gains or losses have nothing to do with income and expenses. Income and expenses seem like *realized* gains and losses, pretty much by definition, right? If you're in the context of asking about unrealized gains and losses, you're not asking about income and expenses you actually had -- you're asking about what income or expenses you *could potentially* have, if you were to make a transaction that realizes them. > 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 Well, as you recognize, the 1000 EUR you see here is just the sum of the lines above. Here's how I'd think about this report: (potential assets) - (unrealized gains) = (actual assets) >From that perspective, it makes sense. The 1500 EUR on the first line does not represent your actual current assets (according to your example file, you don't *actually* have *any* euros!), but your potential assets. I guess the question is in what sense 1000 EUR represents your "actual assets" here, but that has a pretty straightforward answer: it represents the value in euros of the actual dollars in your account, at the time they entered that account. If you were to realize these gains by exchanging currencies, then you could record the gains as Income. I *think* this would be the right way to do that: 2018-01-01 Opening Balance Assets:Checking 1000.00 USD Equity:Opening Balances 2018-07-10 My Currency Broker ; cash in on a sweet exchange rate! Assets:Checking 1500.00 EUR Assets:Checking -1000.00 USD {1 EUR} @ 1.5 EUR Income:Realized Currency Gains This uses ledger's notion of "lot price" to track the gains, following the example with stocks in the manual. Basically, the second transaction says: I exchanged 1000 USD, which were valued at 1 EUR at the time I acquired them, for 1500 EUR, at a rate of 1.5 EUR/USD. The unbalanced 500 EUR is realized as income, as you'll see if you run the balance report. Can someone with more experience confirm that this is the right way to do it? I'm also interested in this question. -- 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.
