Simulating loan repayment in search of an optimal repayment strategy.