calculate amortization-R

 How to calculate amortization R

https://www.mathclasstutor.online

Loan= loan amount
n= the number of payments/periods
pmt= value of level payments
i= nominal interest rate convertible ic times per year
ic= interest conversion frequency per year
pf= the payment frequency- number of payments per year
t= the specified period for which the payment amount, interest paid, principal paid, and loan balance are solved for
library("FinancialMath", lib.loc="~/R/win-library/3.6")

> amort.period(Loan=100,n=5,i=.01,t=3)

           Amortization
Loan          100.00000
PMT            20.60398
Eff Rate        0.01000
Years           5.00000
At Time 3:      3.00000
Int Paid        0.60596
Princ Paid     19.99802
Balance        40.59798
> amort.period(n=5,pmt=30,i=.01,t=3,pf=12)

           Amortization

Loan         149.627429
PMT           30.000000
Eff Rate       0.010000
i^(12)         0.009954
Periods        5.000000
Years          0.416667
At Time 3:     3.000000
Int Paid       0.074535
Princ Paid    29.925465
Balance       59.925424
> amort.period(Loan=100,pmt=24,ic=1,i=.01,t=3)
           Amortization
Loan         100.000000
PMT           24.000000
Eff Rate       0.010000
Years          4.277206
At Time 3:     3.000000
Int Paid       0.537700
Princ Paid    23.462300
Balance       30.307700

Calculate Level Annuity

> annuity.level(pv=NA,fv=101.85,n=10,pmt=8,i=NA,ic=1,pf=1,imm=TRUE)
         Level Annuity
PV          61.0029569
FV         101.8500000
PMT          8.0000000
Eff Rate     0.0525943
Years       10.0000000
> annuity.level(pv=80,fv=NA,n=15,pf=2,pmt=NA,i=.01,imm=FALSE)
         Level Annuity
PV        80.000000000
FV        86.198615501
PMT        5.521069443
Eff Rate   0.010000000
i^(2)      0.009975124
Periods   15.000000000
Years      7.500000000

Calculate Arithmatic annuity

> annuity.arith(pv=NA,fv=NA,n=20,p=100,q=4,i=.03,ic=1,pf=2,imm=TRUE)
         Arithmetic Annuity
PV             2.338128e+03
FV             3.142248e+03
P              1.000000e+02
Q              4.000000e+00
Eff Rate       3.000000e-02
i^(2)          2.977831e-02
Periods        2.000000e+01
Years          1.000000e+01
annuity.arith(pv=NA,fv=3000,n=20,p=100,q=NA,i=.05,ic=3,pf=2,imm=FALSE)
         Arithmetic Annuity
PV             1.827106e+03
FV             3.000000e+03
P              1.000000e+02
Q              1.664438e+00
Eff Rate       5.083796e-02
i^(3)          5.000000e-02
i^(2)          5.020776e-02
Periods        2.000000e+01
Years          1.000000e+01
annuity.geo(pv=NA,fv=100,n=10,p=9,k=.02,i=NA,ic=2,pf=.5,plot=TRUE)

         Geometric Annuity

PV            9.669279e+01
FV            1.000000e+02
P             9.000000e+00
K             2.000000e-02
Eff Rate      1.682984e-03
i^(2)         1.682276e-03
i^(0.5)       1.684400e-03
Periods       1.000000e+01
Years         2.000000e+01
Geometric Annuity

 perpetuity.geo(pv=1000,p=5,k=NA,i=.04,ic=1,pf=1,imm=FALSE)

         Geometric Perpetuity

PV                   1.00e+03
P                    5.00e+00
K                    3.48e-02
Eff Rate             4.00e-02

Post a Comment

0 Comments