For the avoidance of doubt, the way the directive works is in fact solving for an 'r' and in the vast majority of cases this is monthly or weekly.
This statement is rubbish, it is not how the directive formula works. What you are required to solve for is the 'Annual Percentage Rate' (hint, the period is in the title), where the sum of drawdowns equal the sum of financial and non-financial cashflows i.e. fees/charges, each discounted at the APR. The basis for measuring time intervals used in discounting each cashflow is detailed in the directive.
What should be apparent to you is the formula makes no assumptions as to the lender's interest rate, the interest compounding frequency (which may vary with the repayment frequency), the day calculation basis used, and so on. The only information required to perform the calculation are the value of cashflows and when they occur so the time intervals can be determined, be it days, weeks, months or years. That's all.
The beauty of the formula is it requires no advanced understanding of financial arithmetic to
check the APR, just about anyone can do it. Finding the APR solution in the first place is a different matter altogether so I won't bore you with the details, suffice to say it involves iteration so you ought to
research the
Bisection Method or the more efficient
Newton's Method if you want to learn more.
Here's an APR proof based on one of your earlier examples of a €1000 loan repayable by 12 equal monthly repayments of €88.85 and an APR of 12.7%.
I've rearranged the EU directive algebraic formula to show that the net present value (NPV) of all cashflows is equal to 0, confirming the APR of 12.7% is correct (actually there is a slight discrepancy of 8c due to the loss of precision once the APR is rounded to 1 decimal place). Note the use of cashflow sign convention i.e. drawdowns are negative, repayment or payment of charges are positive.
NPV = (-1000.00 * (1+0.127)^-(0/12))
+ (88.85 * (1+0.127)^-(1/12))
+ (88.85 * (1+0.127)^-(2/12))
+ (88.85 * (1+0.127)^-(3/12))
+ (88.85 * (1+0.127)^-(4/12))
+ (88.85 * (1+0.127)^-(5/12))
+ (88.85 * (1+0.127)^-(6/12))
+ (88.85 * (1+0.127)^-(7/12))
+ (88.85 * (1+0.127)^-(8/12))
+ (88.85 * (1+0.127)^-(9/12))
+ (88.85 * (1+0.127)^-(10/12))
+ (88.85 * (1+0.127)^-(11/12))
+ (88.85 * (1+0.127)^-(12/12))
NPV = -1000.00 + 87.97 + 87.10 + 86.23 + 85.38 + 84.53 + 83.69 + 82.86 + 82.04 + 81.23 + 80.42 + 79.63 + 78.84
NPV = -0.08
I can already hear you asking why is any of this important if I get the same result using my own approach? Well it boils down to contract enforceability. If there are errors in the quoted APR a court may rule that a contract is unenforceable depending on the scale of error. From what I can ascertain the Irish legislation is silent on allowed tolerances, but in the UK where the same directive has been adopted an APR should not be understated by more then 0.1% or overstated by more than 1%. If it does the contract is non-complaint and hence unenforceable without a court order. The consequences to a lender of non-compliance can be severe.
As I said earlier, your approach can provide a good approximation, but that's all it is.
As this thread has gone way off topic this will be my last post on the APR issue.