You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
➜ hledger roi --investment='Investment:APPL' --pnl='Unrealized:APPL'
+---++------------+------------++---------------+----------+-------------+-----++-------+-------+
| || Begin | End || Value (begin) | Cashflow | Value (end) | PnL || IRR | TWR |
+===++============+============++===============+==========+=============+=====++=======+=======+
| 1 || 2019-06-20 | 2020-06-23 || 0 | 300 | 325 | 25 || 8.22% | 8.21% |
+---++------------+------------++---------------+----------+-------------+-----++-------+-------+
This approach requires to offset pnl of each investments into a dedicated account (eg. Unrealized:APPL in this case), which I found somehow not very practical since it spams my journal by 'not real' transaction.
Moreover, I guess this needs of offseting latest pnl is redundant with the P directive (cf. https://hledger.org/journal.html#declaring-market-prices) since the pnl is only a subtraction of the latest price minus the buying price and then could be easily calculated by the command.
In my opinion, the ROI commands should work this way:
Buy assets and record new price with the P directive
2019-06-20 Gettin' Rich ; buy some APPL
Assets:cash - $300
Investment:APPL
P 2020-06-15 APPL $ 280.80 ; record new price
P 2020-06-15 APPL $ 290.43 ; same
And then the ROI command should be able to calculate the latest pnl for the selected commodity, maybe with a new flag like that for example
➜ hledger roi --investment='Investment:APPL' --commodity='AAPL'
+---++------------+------------++---------------+----------+-------------+-----++-------+-------+
| || Begin | End || Value (begin) | Cashflow | Value (end) | PnL || IRR | TWR |
+===++============+============++===============+==========+=============+=====++=======+=======+
| 1 || 2019-06-20 | 2020-06-23 || 0 | 300 | 325 | 25 || 8.22% | 8.21% |
+---++------------+------------++---------------+----------+-------------+-----++-------+-------+
Curious to have opinon around this wish, let me know if it seems relevant 😳
The text was updated successfully, but these errors were encountered:
This approach requires to offset pnl of each investments into a dedicated account (eg. Unrealized:APPL in this case), which I found somehow not very practical since it spams my journal by 'not real' transaction.
I am slightly late to the party with this comment, but I just want to note that there is no need to have a separate pnl account per investment - you use a single one for all of them.
Also, with #1483 roi should that P directives into account automatically, hopefully removing the need for manual valuation transactions (in your use-case, at least)
Hello all,
First things first, thank you all for this very nice software ! 👍
Few days ago, I suggested via IRC (ping @adept) that the ROI command could be a little bit more ux-friendly by removing the need of the --pnl flag.
Here's an example of how I understand the ROI commands works now
This approach requires to offset pnl of each investments into a dedicated account (eg. Unrealized:APPL in this case), which I found somehow not very practical since it spams my journal by 'not real' transaction.
Moreover, I guess this needs of offseting latest pnl is redundant with the P directive (cf. https://hledger.org/journal.html#declaring-market-prices) since the pnl is only a subtraction of the latest price minus the buying price and then could be easily calculated by the command.
In my opinion, the ROI commands should work this way:
And then the ROI command should be able to calculate the latest pnl for the selected commodity, maybe with a new flag like that for example
Curious to have opinon around this wish, let me know if it seems relevant 😳
The text was updated successfully, but these errors were encountered: