-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
price = 3090000
loan = 2625000
cost = 556000
saveRT = cost
saveBT = 0
intL = 0.03687
intT = 0
priceR = 0.01/12
infR = 0.01/12
saveR = 0.005/12
payL = 13406.10
inc = 30000
rent = 9500
rentT = 0
exp = 4000
expT = 0
mns = 0
maxm = 500
while (loan > 0 && mns < maxm) {
intT += loan * intL / 12 * 0.75
loan -= payL - loan * intL / 12
expT += exp * (1+infR)**mns
saveBT += saveBT * saveR
saveBT += (inc - exp) * (1+infR)**mns - payL
saveRT += saveRT * saveR
saveRT += (inc - rent) * (1+infR) **mns
rentT += rent * (1+infR) **mns
mns++
}
price = price * (1+priceR)**mns
buys = price - intT - expT - cost - loan + saveBT
rents = saveRT - price
res = {loan, intT, expT, saveRT, mns, rentT, price, buys, rents}Metadata
Metadata
Assignees
Labels
No labels