Hi guys,
I am looking to automate a manual and tedious calculation.
I have a database of loans and deposits each and I want to net off the loan and deposit amounts provided the following conditions are met.
1. Loan and deposit are in the same currency
2. The interest rate of a loan and deposit are no more than 0.15% different.
3. Provided the above conditions are satisfied then compare their maturity
a) If loan and deposit mature within the next 30 days then net them off if they mature on exactly the same date
b) If loan and deposit mature between 1 month and 1 year then their maturity should be within 7 days for hetting to take place.
c) If loan and deposit mature after one year then they should have maturities within 30 days of each other to net them off.
It would require some looping as a loan will need to be checked against each deposit in the dataset until either the entire loan is netted off or all deposits have been compared.
Any help would be much appreciated.
Thanks,
PS
I am looking to automate a manual and tedious calculation.
I have a database of loans and deposits each and I want to net off the loan and deposit amounts provided the following conditions are met.
1. Loan and deposit are in the same currency
2. The interest rate of a loan and deposit are no more than 0.15% different.
3. Provided the above conditions are satisfied then compare their maturity
a) If loan and deposit mature within the next 30 days then net them off if they mature on exactly the same date
b) If loan and deposit mature between 1 month and 1 year then their maturity should be within 7 days for hetting to take place.
c) If loan and deposit mature after one year then they should have maturities within 30 days of each other to net them off.
It would require some looping as a loan will need to be checked against each deposit in the dataset until either the entire loan is netted off or all deposits have been compared.
Any help would be much appreciated.
Thanks,
PS