10-07-2016 09:19 AM
I am trying to caculate a weighted average interest rate. I have monthly loan origination data for multiple products, multiple rate types, and several years of history. Variable names: product, Rate_Type, Origination_year, Origination_month, interest rate, origninal_unpaid_balance. I am having trouble writing a program that can handle all the changing parts. The final product needs to have a weighted interest rate for each month(weighted on balance), for each product and rate type.