New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
roi command includes unwanted amounts when given a period and dates on postings. #2197
Comments
Thanks for the report. There was one fix for
Could you confirm your issue still happens with 1.33 ? |
Thanks - I get the same results with |
@adept, any thoughts ? |
@hbwales , in this transaction:
your assumption seems to be that these cash movements have taken place:
However, roi takes an "A-centric" view, and treats all transactions that mention A as related to the investment. So the interpretation is this:
This is documented in https://hledger.org/1.33/hledger.html#semantics-of---inv-and---pnl If this interpretation does not suit you, you need to split this transaction into two so that the transaction that is not related to your investment will not have any mention of A. This is not a recent development, I would've expected |
@hbwales, shall we close this ? |
Closing, presumed resolved. |
The
roi
command includes unwanted amounts when given a period and dates on postings.For example with
test.journal
as:I get:
Note the Cashflow of
300
, & PnL-100
, I would expect200
and0
respectively?Taking the dates off the postings gives the expected result:
(Version used is
hledger 1.32.1-g39fc78a64-20231207, windows-x86_64
)The text was updated successfully, but these errors were encountered: