Question
# Loan Rate Calculator # The annuity payment formula is given by: # A = P * (i + i / ( (1 + i)
# Loan Rate Calculator
# The annuity payment formula is given by:
# A = P * (i + i / ( (1 + i) ^ n - 1) )
# where A = periodic payment amount, P = amount of principle net of initial payments (subtract down-payments)
# i = periodic interest rate, n = total number of payments
# Part 1. Write a function that takes as input - amount of principle (p), down-payment (dp), interest rate (i),
# number of years in loan (y) - and return the monthly payment for the loan. annutity_payment <- function(p, dp, i, y) { annutity <- return(annutity) }
# Part 2. Using your annutity_payment function write a function that calculates the total amount payed. total_payed <- function(p, dp, i, y){ total <- return(total) }
# Part 3. Now using your functions evaluate which of these loans result in you paying the least amount:
# a - Principal = 200,000, Down Payment = 20,500, APR = 4.5%, Length of Loan = 30 years.
# b - Principal = 200,000, Down Payment = 30,000, APR = 5.0%, Length of Loan = 15 years.
# c - Principal = 200,000, Down Payment = 30,000, APR = 4.5%, Length of Loan = 30 years.
# d - Principal = 200,000, Down Payment = 50,000, APR = 5.0%, Length of Loan = 15 years.
# e - Principal = 200,000, Down Payment = 50,000, APR = 6.0%, Length of Loan = 15 years.
# f - Principal = 200,000, Down Payment = 20,500, APR = 5.0%, Length of Loan = 30 years.
# Part 4. Why might someone take a less than optimal option?
# Part 5. Now suppose instead of a fixed rate mortgage you are looking to get an adjustable rate mortgage (ARM).
# The starting rate is guaranteed at 3% APR for the first five years but then will increase by 1.5% every 60 months
# The principal amount is 200,000 and your down payment is 20,000. The total length of the loan is 15 years.
# # What will the total cost of your mortgage be?
# # HINT: You may want to write a function that computes the balance paid after X months using this formula.
# Balance Paid = (12 * monthly payment / annual interest rate)((1 + annual interest rate/12) ^ number of months paid - 1)
(((THIS NEEDS TO BE SOLVED BY R STUDIO)))
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started