math modeling and R code

profileMesaLs4
Sample2-Project.pdf

Chrysalis Science Consulting �

How much can I afford?

Choosing What’s Right for You

Presented by: Chrysalis Science Consulting

For use by: SSquared Bank & Co.

(SS Banks)

Mortgage Resources

Chrysalis Science Consulting Allison Langley ChrysalisScience.com 5500 Campanile Drive San Diego, CA 92182-0828 [email protected] (858)414-8041

March 3, 2017

Chrysalis Science Consulting �

Executive Summary

Objectives This report showcases examples of resources to aid home-buyers in

understanding the mortgage process and the large effect of a slight change

on their cash flow. This clear display of information will ease many of the

concerns that home buyers share when searching for a loan.

Goals The duration of this report will focus on the benefits SS Banks partnering

with Chrysalis Science Consulting. The advantages that SS Banks will

gain on the home-mortgage market are illustrated to the reader with

examples of resources that SS Banks will have the ability to use and, as a

result, so greatly increase their customer retention rate.

Conclusions Partnering with Chrysalis Science Consulting will significantly raise

customer satisfaction with SS Banks’ transparency. This report will show

how potential customers will find confidence in knowing how the mortgage

works and will easily understand how SS Banks’ low interest rates yield

such a huge advantage over choosing competing banks.

� Page � of �2 14

Chrysalis Science Consulting �

Introduction

Problem Identification and Modeling the Mortgage Chrysalis Science Consulting will work with SS Banks to secure the highest

possible number of potential borrowers. This will be primarily achieved with

easily understood displays of information, charts, and breakdowns of the

total cost associated with mortgages. Many borrowers don’t realize the

differences and advantages of various mortgages. This report will give

examples of tools that may be offered when partnering with Chrysalis

Science Consulting to ease the mortgage process and aid customer

understanding of how their cash flow is affected depending on the type of

loan chosen. We will assume a principal of $200,000 and begin analysis of

a 30-year term loan at an annual interest rate of 3.375%. This will then be

compared and contrasted with a 15-year term at the identical rate. We will

conclude with sensitivity analysis and include a 20-year term to show the

resulting affect on total interest paid and overall cashflow, as well as the

huge effect that a slight change in interest rate poses. These resources will

all hep to ensure that more individuals choose SS Banks over competing

banks.

� Page � of �3 14

Chrysalis Science Consulting �

Mortgage Abstraction In order to begin analysis on a 30-Year mortgage we must first define the

variables that will be in use:

Principal = (P)

• The total amount of money borrowed from the bank

Total number of payments you will make = (n)

• The loan will be paid off in monthly payments

• We are first considering a 30-year mortgage, meaning that after a 30

year period, the loan and interest will be completely paid off

• In this case, 12 payments each year, for 30 years: n = 360 months

Your monthly payment = (x)

• The amount of money you will spend each month until the loan is

paid off

Principal remaining at the end of the kth month = (Pk)

• At the end of the 30 month period (a total of 360 months), k=360

• Because the loan will be paid off after 360 months, when k=360, Pk

(the principal remaining) will equal zero

Monthly interest rate = (r)

� Page � of �4 14

Chrysalis Science Consulting �

• Mortgage is paid every month, meaning that interest is also paid

every month

• The interest rate of a mortgage is the annual rate

• To calculate the monthly interest rate, the mortgage rate is simply

divided by 12

r = 3.375% ÷ 12 months

• r = 0.28125% = 0.0028125

Monthly payoff of principal = (Qk)

• Each month’s payment is divided between paying off the principal

and paying interest on the remaining principal

• At the beginning of the term, the percentage of the monthly fee that

pays off the principal will be smaller than the percentage delegated to

the interest

• As the loan matures, the percentage paying off the principal will

grow, and the interest will begin to decrease, until the loan has been

completely paid off

Monthly payment of interest = (Ik)

• This is the portion of a given month’s payment that is collected as

interest on the remaining principal

� Page � of �5 14

Chrysalis Science Consulting �

• When the term begins, a higher portion of the monthly payment will

go towards inters, but as the loan matures and more payments are

made, this percentage will decrease and the majority of the

payments will begin to go towards the principal

The establishment of these variables allows us to now model the mortgage

with a set of equations. Creating equations that represent the life of the

mortgage will help us to clearly answer questions that customers may have

regarding their monthly payments, principal, interest, and overall cashflow.

Data and Method

Equations of the Mortgage Model Calculation of the Monthly Payment

• The monthly payment (x) is determined by the original loan amount

(P), monthly interest rate (r), and the total number of payments (n)

• Each monthly payment will be identical to this amount, every month,

until the entire loan is paid off

Principal Remaining Each Month

� Page � of �6 14

Chrysalis Science Consulting �

• Using this equation, we may calculate the remaining principal after

the kth month

Payment Towards Principal and Interest

• This equation clearly illustrates that the monthly payment is

composed of both an interest payment (Ik) and a payment towards

the remaining principal (Qk).

Solutions of the Model Our first model to share with the customer will be of a fixed rate, 30-year

term loan of $200,000, at SS Banks’ annual interest rate of 3.375%.

The Variables: 


Principal (P) = $200,000

Number of months (n) = 360

Monthly interest rate = 0.0028125

Referring to the equations previously defined, customers are able to

confidently work in parallel with SS Banks, to calculate different aspects of

their mortgage. Customers can now easily calculate a monthly payment of

$884.19. Each month, this number will remain the same. A portion of your

payment goes towards paying off the principal, and a portion goes towards

� Page � of �7 14

+Q I

Chrysalis Science Consulting �

paying the bank interest on the loan. It is this allocation that begins to

change over time. The very first payment has interest on a total of

$200,000 dollars, meaning that $562.50 goes towards interest and $321.69

of the principal is actually paid off. Using the equations above, we can see

that, the next month, $199,678.31 is now owed to the bank. Interest is only

paid on the remaining principal. So as this amount goes down, the interest

also goes down, and a larger percentage of the $884.19 monthly payment

begins to go towards the principal. The graph below displays the total

interest paid over the life of a 30-year loan.

� Page � of �8 1430−yr

30−Year Term Loan

A m

ou nt

($ )

0 50

00 0

10 00

00 15

00 00

20 00

00 25

00 00

30 00

00 Principal Borrowed

Interest Paid

Total Dollar Amount Spent

Chrysalis Science Consulting �

Alterations in Term Length Remaining with the same type of mortgage (fixed-rate,

at 3.375%), we can now alter the term length and

observe the resulting effect on interest and overall cashflow. Utilizing the

same equations, we calculate the monthly payment of a 15-year term to be

$1,417.52. While this is significantly higher than the monthly patent of the

30-year term loan, the amount of interest is also greatly reduced. The

figure below easily displays this difference in total interest paid when

considering a 15-year loan over a 30-year loan.

� Page � of �9 1430−yr 15−yr

Interest on 30−Year and 15−Year Terms

A m

ou nt

($ )

0 50

00 0

10 00

00 15

00 00

20 00

00

Principal Borrowed

Total Interest Paid

Chrysalis Science Consulting �

If the buyer can afford the higher monthly payment, then the shorter 15-

year term may be preferred. Because the loan is paid off in half of the time,

the interest does not grow to be as large as the previously considered loan.

However, if the borrower will be challenged to make such high monthly

payments, the 30-year term may be a better option. The 30-year term

increases the monthly cashflow of the borrower. This means that if the

customer is in need of the extra money each month, the 30-year loan will

pose a relatively small burden. If the borrower is capable of paying the

higher payments of a 15-year loan, they may still prefer to choose a 30-

year term to allow for further

investment. The additional

cashflow may be used to invest in

other opportunities, and make

additional money before being

spent on the loan. Choosing a

20-year loan may be an additional

option that the home-buyer would

like to consider. To the right is a

graph depicting differences

between these three options.

� Page � of �10 14

30−yr 20−Yr 15−yr

Interest on 30, 20, and 15−Year Terms

A m

ou nt

($ )

0 50

00 0

10 00

00 15

00 00

20 00

00

Principal Borrowed

Total Interest Paid

Chrysalis Science Consulting �

The lower monthly rate of $1,147.11 may be more achievable than the rate

associated with a 15-year loan. The 20-year term cuts the total interest but

still allows for additional cashflow each month, allowing more the customer

to have more financial flexibility than under the 15-year loan, and a lower

interest payment than when paying for a 30-year loan.

Slight Changes in Interest Rate; Huge Changes in Payment

Now that the borrower more fully understands the differences associated

with options in term length, it is important to illustrate how the interest rate

so greatly affects their total payment. It may be hard for borrowers to

understand the large impact that an interest rate has because the changes

to the rate are so slight (less than 1%). By looking at the total interested

paid, we may much more easily see this large impact.

Interest Rate Monthly Payment Total Interest Paid 3.375% $884.19 $118,309.27

3.5% $898.09 $123,312.18 3.625% $912.10 $128,356.94 4.125% $969.30 $148,947.81

4.5% $1,013.37 $164,813.42

� Page � of �11 14

Chrysalis Science Consulting �

Conclusion These resources will help to raise clients’ confidence and understanding of

mortgages and how to choose the packages that best fits their financial

needs. Additional information, such as the affect of payments in addition to

the monthly payment may also be included. SS Banks may want to have

additional equations and further derivations such as this:

One caveat this method is that some potential customers may shy away

from the mathematical equations. For those less inclined to mathematics,

reliance on visuals such as graphs and charts may be more welcoming. It

is optimal to have additional visuals available, as well as detailed equation

sheets, so that the bank representative may alter their pitch based on the

needs of the customer. Details on other aspects of the loan, such as risk

analysis, may further entice customers to continue forward with SS Banks

for their mortgage. Chrysalis Science Consulting will work with you to

create all of the needed materials to successfully retain the potential

customers who visit your offices regarding a mortgage loan.

� Page � of �12 14

Chrysalis Science Consulting �

References

"Chase Bank - Credit Card, Mortgage, Auto, Banking Services." JPMorgan

Chase and Co. N.p., 2017. Web. 01 Mar. 2017. <https://

www.chase.com/>.

Shen, Samuel S.P. INTRODUCTION TOMODERNMATHEMATICAL

MODELING WITH R. N.p.: Wiley-Interscience, 2017. Print.

Appendix Sample Code for RStudio

####General Mortgage Calculator####

annualRate<-0.03375

#Principal

p<-200000

nYrs<-30

#Months

n<-nYrs*(12)

� Page � of �13 14

Chrysalis Science Consulting �

#rate

r<-annualRate/(12)

#monthly payment

x<-((p*((1+r)^n)*r)/(((1+r)^n)-1))

x

####Interest Payment Month for 1####

interest1<-p*r

interest1

� Page � of �14 14