Mortgage
Mortgage
Mortgage
is a module that reads simulates mortage with emphasis on additional costs.
Synopsis
use Mortgage;
my $bank = Mortgage.new(bank=>"BANK",interest_rate => rate-monthly(324), mortage => 1290.93, mortages => 360, loan-left=> 297000);
$bank.add(Mortgage::AnnualCostConst.new(from=>1, to=>1, value=>$bank2.loan-left * basis-point(164))); # paid only once
$bank.calc; # all the stuff goes here
say $bank;
Precision
Type used for calculation is based on data put by user. So if FatRat
is
provided it gets infinite precision. If Rat is provided, that is most common
perl6 type for non-integer, probalby rakudo will implicitly change it to Num
.
Don't worry for most mortages there is no difference.
Rounding
For now it uses arithmetic rounding. In future it should use bank rounding.