Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This answer must be completed in R programming language #Set number of time steps and initialize variable max.step=120 x=numeric(max.step) #creates an array with max.step entries

This answer must be completed in R programming language

image text in transcribed

#Set number of time steps and initialize variable max.step=120 x=numeric(max.step) #creates an array with max.step entries

#Set parameter for compound interest problem r=0.05 #interest rate

#Set intial condition x[1]=1000 for (t in 1:(max.step-1) ) { x[t+1]=x[t]*(1+r/12) }

#Generate plot of solution months=1:max.step #create array of months plot(months,x,type="l") #plot solution (type="l" makes a line plot)

Problem 1: Modify the program discrete.R to compute the balance of a loan over a 5 year (60 months). Assume that interest is compounded monthly and payments are monthly. Problem 2: Use the code you just created to compute the payment required to pay off a $30,000 loan with 6% interest in 5 years. This process will require trial and error. Your payment only needs to be accurate to nearest whole dollar amount. You can use trial and error. Problem 1: Modify the program discrete.R to compute the balance of a loan over a 5 year (60 months). Assume that interest is compounded monthly and payments are monthly. Problem 2: Use the code you just created to compute the payment required to pay off a $30,000 loan with 6% interest in 5 years. This process will require trial and error. Your payment only needs to be accurate to nearest whole dollar amount. You can use trial and error

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions

Question

Why would CPAs prefer to avoid estimates in financial reporting?

Answered: 1 week ago

Question

6. Explain what causes unsafe acts.

Answered: 1 week ago

Question

2. The model is credible to the trainees.

Answered: 1 week ago