;doc: Update pathspec for running roi-unrealised.ledger and generated output.

This commit is contained in:
Charlie Ambrose 2023-11-29 14:56:32 +11:00 committed by Simon Michael
parent f2a7f71a00
commit 3645720157

View File

@ -25,21 +25,23 @@
;
; and so on. And then ROI could be computed thusly:
;
; hledger -f examples/roi-unrealised.ledger roi --inv Assets:Trading:RY -b 2015-01-01 -e 2019-01-01 --pnl Income --yearly --value=then
; hledger -f examples/investing/roi-unrealised.ledger roi --inv Assets:Trading:RY -b 2015-01-01 -e 2019-01-01 --pnl Income --yearly --value=then
;
; See Cookbook -> (Return on Investment) for more info.
comment
$ hledger -f examples/roi-unrealised.ledger roi --inv Assets -b 2015-01-01 -e 2019-01-01 --pnl Income --yearly --value=then
+---++------------+------------++---------------+----------+-------------+--------++--------+--------+
| || Begin | End || Value (begin) | Cashflow | Value (end) | PnL || IRR | TWR |
+===++============+============++===============+==========+=============+========++========+========+
| 1 || 2015-01-01 | 2015-12-31 || 725.50 | 0 | 756.30 | 30.80 || 4.24% | 4.25% |
| 2 || 2016-01-01 | 2016-12-31 || 756.30 | 0 | 998.80 | 242.50 || 31.96% | 31.96% |
| 3 || 2017-01-01 | 2017-12-31 || 998.80 | 0 | 1151.20 | 152.40 || 15.26% | 15.26% |
| 4 || 2018-01-01 | 2018-12-31 || 1151.20 | 0 | 1145.00 | -6.20 || -0.54% | -0.54% |
+---++------------+------------++---------------+----------+-------------+--------++--------+--------+
$ hledger -f examples/investing/roi-unrealised.ledger roi --inv Assets -b 2015-01-01 -e 2019-01-01 --pnl Income --yearly --value=then
+-------++------------+------------++---------------+----------+-------------+--------++--------++------------+----------+
| || Begin | End || Value (begin) | Cashflow | Value (end) | PnL || IRR || TWR/period | TWR/year |
+=======++============+============++===============+==========+=============+========++========++============+==========+
| 1 || 2015-01-01 | 2015-12-31 || 725.50 | 0 | 756.30 | 30.80 || 4.24% || 4.25% | 4.25% |
| 2 || 2016-01-01 | 2016-12-31 || 756.30 | 0 | 998.80 | 242.50 || 31.96% || 32.06% | 32.06% |
| 3 || 2017-01-01 | 2017-12-31 || 998.80 | 0 | 1151.20 | 152.40 || 15.26% || 15.26% | 15.26% |
| 4 || 2018-01-01 | 2018-12-31 || 1151.20 | 0 | 1145.00 | -6.20 || -0.54% || -0.54% | -0.54% |
+-------++------------+------------++---------------+----------+-------------+--------++--------++------------+----------+
| Total || 2015-01-01 | 2018-12-31 || 725.50 | 0 | 1145.00 | 419.50 || 12.07% || 57.82% | 12.07% |
+-------++------------+------------++---------------+----------+-------------+--------++--------++------------+----------+
end comment