Repository navigation
Closed
Labels
A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.Something wrong, confusing or sub-standard in the software, docs, or user experience.affects4-manyAffects potentially a significant number of users.Affects potentially a significant number of users.annoyance4-majorMajor usability/doc bug, or any regression or crash.Major usability/doc bug, or any regression or crash.investingRelated to investments, lots, capital gains, etc.Related to investments, lots, capital gains, etc.
Description
The docs of hledger holdings --help says:
Fully disposed commodities and accounts are not shown, unless you add
-E/--empty. (But the RGain and XIRR in the totals row always includes
them.)
In practice, the RGain from closed accounts is missing if -E or -t is not added.
Example journal:
commodity 1.NVDA ; lots:
commodity 1.AAPL ; lots:
2026-09-01 Buy Apple
assets -10e
stocks:appl 2APPL {}
2026-09-02 Buy Nvidia
assets -20e
stocks:nvda 2NVDA {}
2026-09-04 Sell Apple
assets 40e
stocks:appl -2APPL {}
RGain missing:
[0]$ hledger-lots hold -f hledger.journal
Holdings on 2026-10-06
|| Date Age Units Avg cost Unit price Total cost Total value Weight UGain UGain% RGain XIRR
=============++===========================================================================================================
stocks:nvda || 2026-09-02 34d 2NVDA 10e 20e
-------------++-----------------------------------------------------------------------------------------------------------
|| 2NVDA 10e 20e
RGain visible:
$ hledger-lots hold -f hledger.journal -t
Holdings on 2026-10-06
|| Date Age Units Avg cost Unit price Total cost Total value Weight UGain UGain% RGain XIRR
========++===========================================================================================================
stocks || 2026-09-02 34d 2NVDA 10e 20e
nvda || 2026-09-02 34d 2NVDA 10e 20e
--------++-----------------------------------------------------------------------------------------------------------
|| 2NVDA 10e 20e 30e
$ hledger-lots hold -f hledger.journal -E
Holdings on 2026-10-06
|| Date Age Units Avg cost Unit price Total cost Total value Weight UGain UGain% RGain XIRR
=============++===========================================================================================================
stocks:appl || 0APPL 30e
stocks:nvda || 2026-09-02 34d 2NVDA 10e 20e
-------------++-----------------------------------------------------------------------------------------------------------
|| 2NVDA 10e 20e 30e
Version
hledger 1.99.5, linux-x86_64
Metadata
Metadata
Assignees
Labels
A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.Something wrong, confusing or sub-standard in the software, docs, or user experience.affects4-manyAffects potentially a significant number of users.Affects potentially a significant number of users.annoyance4-majorMajor usability/doc bug, or any regression or crash.Major usability/doc bug, or any regression or crash.investingRelated to investments, lots, capital gains, etc.Related to investments, lots, capital gains, etc.
Activity
fix:holdings: the totals row's RGain and XIRR include fully disposed …
simonmichael commentedon Oct 10, 2026
Thanks for the report! I believe it's fixed in main.
imp: holdings: totals can be computed for any account
imp: holdings: totals can be computed for any account
imp: holdings: totals can be computed for any account
imp: holdings: totals can be computed for any account
imp: holdings: totals can be computed for any account
imp: holdings: totals can be computed for any account