Create Amortization_function.R

Hi Adam,

Please review the amortization function. 

Thanks,

Nan
This is really inefficient.