I just wanted to note that trading accounts are a very powerful idea,
usable with all commodities (not just currencies). While they are great
for unrealized gain/loss and can calculate that on the basis of price
declarations, they leave realized loss/gain calculation up to the user.
Trading accounts make it very easy for me to know how much I invested in a
set of shares, how many of those shares I bought, and how much those shares
are currently worth.
Some examples:
$ ledger -f unified.journal bal equity:trading:mf
-738.108 INF200K01180
-7.937 INF200K01MO2
-580.030 INF209K01793
₹58,400.00 Equity:Trading:MF
-738.108 INF200K01180 INF200K01180:INR
-7.937 INF200K01MO2 INF200K01MO2:INR
-580.030 INF209K01793 INF209K01793:INR
₹58,400.00 INR
₹25,000.00 INF200K01180
₹16,700.00 INF200K01MO2
₹16,700.00 INF209K01793
--------------------
-738.108 INF200K01180
-7.937 INF200K01MO2
-580.030 INF209K01793
₹58,400.00
$ ledger -f unified.journal bal equity:trading:mf -X '₹'
₹-9,755.93 Equity:Trading:MF
₹-29,903.71 INF200K01180:INR
₹-19,527.87 INF200K01MO2:INR
₹-18,724.35 INF209K01793:INR
₹58,400.00 INR
₹25,000.00 INF200K01180
₹16,700.00 INF200K01MO2
₹16,700.00 INF209K01793
--------------------
₹-9,755.93
(This shows that I have an unrealized gain of ₹-9,755.93.)
Around a month ago, I revised the wiki entry to include the ordered
commodity pair method, since that allows you to gain more insight during
reporting:
https://github.com/ledger/ledger/wiki/Multiple-currencies-with-currency-trading-accounts
You can extend this with dates as sub-accounts as well to manage lots (if
you're using the commodities for investment/speculation rather than as a
purchasing currency).
On Friday, 19 April 2019 12:19:08 UTC+5:30, Alen Šiljak wrote:
>
> Martin (and others), FYI,
>
> Ledger Wiki contains the article on how to implement Selinger's method:
>
> https://github.com/ledger/ledger/wiki/Currency-trading-accounts
>
> There, simple "Currency:EUR" account names are used. GnuCash uses
> "Trading:Currency:EUR" or whatever other commodity is used.
>
> To me this makes sense only for currencies or such. I fail to see the
> point of using this method for shares as the profit/loss there is accounted
> for in Capital Gains account.
> Thinking, for example, about strawberries, makes an interesting case.
> Seeing some people use ledger for tracking inventories is impressive.
> And going into time is even more interesting and fluid but I digress.
>
> Just wanted to share that link to the Trading Accounts. I mean, the title
> clearly states "Currency Trading Accounts" but I believe, like in GnuCash,
> the concept can be used for (almost) any commodity.
>
> On Wednesday, 17 April 2019 12:59:27 UTC+2, Martin Michlmayr wrote:
>>
>>
>> I don't know what a trading account is, ...
>>
>
--
---
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ledger-cli/8bab7d99-5007-4fdd-b394-d72e72e2afaa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.