Is it expected that Fees transaction after sale breaks TTWROR/IRR calculations?

I was getting confused about why I’m getting 100% TTWROR and NaN IRR for my transactions and after creating a simpler reproduction, it seems that this is caused by the Fees transaction on a security after sale.

I made a “Test” deposit account in USD and a corresponding “Test” security account. Created an “AMD” security and then created the following transactions:

(for reference, “lis” is November, “gru” is December, “kwi” is April)

Looking at “Reports → Securities” (set to default period - a year), it’s looking normal for now:

After this, I added a 0,01 USD “SEC Fee”, which my broker charges me a day after the sale:

Now, looking at the “Reports → Securities” starts looking strange:

Here’s a link to the portfolio file at the end of the above:

reproduction.xml (362.3 KB)

Is this an expected behaviour? I assume this has to do with the fact that the fees are associated with shares I own when the fee was charged (so 0 in the example above), but I’m not sure whether it’s expected and whether it’s something you’d consider fixing/improving in the future. I was hoping to keep my transaction times in PP consistent with transaction times at my broker whenever possible, but this makes that a little bit harder.

The same seems to only partially be a problem with dividends (which can also be paid out after sale, as long as you owned on the ex-dividend date), as you can specify the number of shares the dividend refers to. A dividend payout after sale does not affect TTWROR, but it does at least affect IRR.