25 Reputation

1 years, 195 days

How to solve a simple PMT problem...

Maple

Hello,

I'm considering a question for undergraduates like this:

An investor is looking at a \$150,000 home. If 20% must be put down and the balance is financed at 9% over the next 30 years, what is the monthly mortgage payment?

On a basic financial calculator, say TI BA the solution is simply:

In the Finance package there is a strangely named function

levelcoupon(face, rate, couponrate, maturity)

 that actually calculates the PV, that is the bond price in a basic setup with no dates (all CF are at the end) which is what I need, and another of the same class - yieldtomaturity, but I didn't find a function that returns the payment (coupon).  Any suggestions are highly appreciated. Thanks!

How to multiply all elements of a vector...

Maple

For a vector of floats like this:

v := < 4,3,2>;

How do I get the 24 (=4*3*2)?

Thanks.

Why Finance:-LatticePrice gives wrong pr...

Maple

I embed Maple code in Mobius for test questions. A simple 2-step CRR tree gives significantly different answer from the calculated by hand or by R's fOptions. Here is the piece of Mobius/Maple:

\$ct = maple("
with(Finance):
S0:=50; X:=50; Ty:=6./12; r:=0.07; sig:=0.3156; n:=1;
dt := Ty/n;
u  := exp(sig*sqrt(dt));
d  := 1/u;
pu := (exp(r*dt) - d)/(u - d);
pd := 1 - pu;
BT := BinomialTree(Ty,n,S0,u,pu,d,pd);
cT := ST -> max(ST - \$X,0);
Ec := EuropeanOption(cT, \$Ty):
LatticePrice(Ec,BT,\$r);
");

The answer is: 6.545478168.  Exactly the same with BlackScholesBinomialTree

The correct answer should be 6.32

In this case the solution by hand is simply e^(-0.07*05)*0.5236*\$12.50

R confirms 6.32:

CRRBinomialTreeOption(TypeFlag = "ce", S=S, X=X, Time=T, r=r, b=b, sigma=sig, n=n)@price

The error decreases with the increase of number of steps. All quantities before LatticePrice are calculated corectly. Any idea of what the reason might be?

Thanks.

 Page 1 of 1
﻿