Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
kavicsgym
Creator
Creator

Integrate Newton formula calculation algorithm into QV script

Hi, I am doing a SIB for the National Bank, to calculate the avarage interest rate for loans over months, separately for Performing and Non-performing Loans.

The source of data is from the banking sector (it is anonymus) and covers the first 8 months of 2014. (Millions of rows.)

I have to add a complicated calculation to calculate the Monthly Interest rates per record, based on ’Remining capital’, ’ Monthly installment’ and Remaining months, which is the difference between ’End of contract’ and (Current)’Period’.

The calculation is attached in Excel, and is based on Newton formula: A first value is determined and then iterations are done (re-calculations to get a more precise value for the interest rate) , while the difference between the newly calcualted value and the last one is less than abs(0.001).

If the first calculated interest rate values in not a real number, than 10%/12 has to be used to determine the first monthly interest rate. ANY ADVICE on how to integrate this Iterative calculation with a  while convergence into QV script??????

I attach full description and formula.

cheers, Enikö

0 Replies