-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
TWR aggregation looks wrong #2298
Comments
To give you a quick feedback: thank you for your report, this is a bug, I see where it is, expect a fix soon. |
Should be fixed by #2300 |
Thank you for the quick reaction and fix! I can confirm that the numbers with #2300 look much better. Unfortunately the proposed fix also makes my yearly ROI report 7-8x slower. That's better than wrong data, but somewhat painful. |
I do see slowdown, but not as drastic as you. Trying my dataset:
This is ... weird. I'll try and see why it is so slow, change certainly does not look like something that should have a pronounced effect |
Tried it just now, I don't see a significant change in performance, it's still pretty slow. Trying with a subset of my roi query and some debug output:
vs. new:
The 15 EUR lookups are cashflow (in EUR) transactions I think, and they're the same. It should need the "IE00B4L5Y983 to CHF" chain only at period boundaries and cashflow events, too? |
and ond dates you have P directives too (which was not happening earlier) |
Yeah... that explains the dramatic difference in runtime, since I have a large automatically created list of prices. But that's not actually necessary, is it? To compute TWR it's sufficient to compute prices at period boundaries and cashflow events. E.g. in the initial example on this bug, inserting a lot of fine grained P directives would not change the result at all. |
Just to double-check, in the example above is "old" a v1.40, or v1.41.99 without #2300? |
"old" is actually 1.32.3 from Debian. |
How many P directives have you @TPolzer ? I'm thinking we might need to mention that in general docs. |
I'm storing daily FX rates for three currencies and weekly rates for a handful of investments. I should probably reduce the latter to monthly rates. My current auto generated price list has ~21k entries. I understand that general parsing etc scales linearly, but I was under the impression (so far I think correctly) that most analysis cost should be unaffected by the number of P statements. |
It's good to know the number. If you're seeing no slowdowns in most features, with 20k prices, that's good - perhaps it's something suboptimal in roi then. |
I think you are both right, but I'll need a bit of time to think about it
…On Thu, 12 Dec 2024, 23:33 Simon Michael, ***@***.***> wrote:
It's good to know the number. If you're seeing no slowdowns in most
features, with 20k prices, that's good - perhaps it's something suboptimal
in roi then.
—
Reply to this email directly, view it on GitHub
<#2298 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA42KSJBDD2DQD6N3GTJTD2FIMNHAVCNFSM6AAAAABTMDNEPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBQGIYTKNZZGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I was trying to plot cumulative TWR values from hledger over time (side note: is there a machine readable version of
roi
?), but couldn't make sense of the numbers. In the end I've come to the conclusion that something isn't right.Here's an example ledger that demonstrates the problem:
Following https://hledger.org/roi.html#using-commodities-and-prices I get this report:
My hand calculations for TWR would be:
Total
row of the report says.hledger roi -Y
is consistent with theTotal
above, not with the expected TWR.The text was updated successfully, but these errors were encountered: