Re: RFC: new module Finance::MortgageCalculator
Dmitri Tikhonov writes: I intend to write a new module, Finance::MortgageCalculator, with the express purpose of calculating mortgages. Does anyone foresee any problem with the name? Which country's mortgage markets are you familiar with? Do you have confidence that whatever calculations you are doing will be appropriate in other countries? Something like Finance::Mortgages::ZZ may be more appropriate, where ZZ is your country code. Smylers
Re: RFC: new module Finance::MortgageCalculator
On Wed, 1 Nov 2006, Smylers wrote: Dmitri Tikhonov writes: I intend to write a new module, Finance::MortgageCalculator, with the express purpose of calculating mortgages. Does anyone foresee any problem with the name? Which country's mortgage markets are you familiar with? Do you have confidence that whatever calculations you are doing will be appropriate in other countries? What are the differences likely to be encountered in other countries? Isn't a basic mortgage calculation based on principle times interest, and then determining monthly payments? There could be other aspects to calculate, depending on the scope of the module. Something like Finance::Mortgages::ZZ may be more appropriate, where ZZ is your country code. I'd go with the suggestion of Finance::Mortgage or (..Mortages). but I don't see an obvious need for a country code. If mortgage markets and calculations are widely different between countries, couldn't one module be flexible enough to handle variances in the formula. Christopher Josephes [EMAIL PROTECTED]
Re: RFC: new module Finance::MortgageCalculator
Chris writes: On Wed, 1 Nov 2006, Smylers wrote: Dmitri Tikhonov writes: I intend to write a new module, Finance::MortgageCalculator, with the express purpose of calculating mortgages. Does anyone foresee any problem with the name? Which country's mortgage markets are you familiar with? Do you have confidence that whatever calculations you are doing will be appropriate in other countries? What are the differences likely to be encountered in other countries? I don't know what countries other than the UK do, so I wouldn't know what the differences from elsewhere are. But I have friends and work colleagues who've moved here from other countries and asked about how mortgages work in this country, and found them different. And I do know that in the UK you have to take the mortgage provider into account: different providers have different way of converting headline interest rates into monthly payments. Exactly how they do this (and how they are permitted to do it) has had several changes over the past decade or so (and probably before). At least many of those changes are prompted by the financial regulators, who outlaw certain practices or insist on things being done in particur ways. I would be surprised if each country's regulators were imposing exactly the same restrictions simultaneously. Isn't a basic mortgage calculation based on principle times interest, and then determining monthly payments? Ah, if the module is just doing a basic interest calculation, then yes, that's just a simple matter of mathematics. But in that case I reckon Finance::LoanCalculator or Finance::InterestCalculator would be a better name, because it isn't including any of the aspects which make a mortgage distinct from any other sort of loan. Smylers
Re: RFC: new module Finance::MortgageCalculator
Mortgages may compound differently -- monthly (the most common in the USA), biweekly, or semi-annually (Canadian). The common thing between them is that there's still a fixed number of payments. I will make the interface support all of these methods. The following web site has some formulas and derivations: http://www.hughchou.org/calc/formula.html I guess I could do Finance::MortgageCalculator and Finance::MortgageCalculator::US (which would be an empty subclass) and then people could inherit from Finance::MortageCalculator and create their own country-specific calculators. (I'd still like the word Calculator being present in the name. When I look at module named Finance::Mortgage I think to myself -- mortgage *what*?) - Dmitri.
Re: RFC: new module Finance::MortgageCalculator
Dmitri Tikhonov writes: Mortgages may compound differently -- monthly (the most common in the USA), biweekly, or semi-annually (Canadian). Or indeed daily: http://www.nationwide.co.uk/mortgage/homebuyers/intro.htm The common thing between them is that there's still a fixed number of payments. Sure. But that still sounds like it's common to all loans, not just mortgages. In the UK mortgages many also have a discounted rate for the first few years. I had one which had a discount of 1.2% points for 2 years followed by a premium of 0.8% points for 3 years (so paying out less during the first couple of years after buying a home, but making up for it in years 3-5, by which time you've hopefully got a payrise). And there are interest-only mortgages, where in theory you only pay the interest each month, leaving the main part of the debt exactly the same size, and then also pay into an entirely separate fund to build up some capital to pay off the debt at the mortgage expiry. In practice of course folks mainly seem to get the money to pay it off by suing their financial advisors for persuading them to sign such risky deals in the first place. There have been studies which showed how in the UK it is basically impossible to compare credit card rates, because every supplier has a different way of doing their calculations (and not really making public what they are). It wouldn't surprise me to find something similar going on with mortgages -- certainly I have been in the position of having a choice between two mortgages and the one with the lower rate had the higher monthly payment. I will make the interface support all of these methods. Great. The following web site has some formulas and derivations: http://www.hughchou.org/calc/formula.html That page mentions amortization, and despite its title I still don't see anything which makes it apply only to mortgages and not to other sorts of loans. Using Loan or Amortize would seem more sensible to me -- then somebody wanting to look at, say, amortized student loan payments might still think of using the module, whereas she could be put off by having mortgage in the name. I guess I could do Finance::MortgageCalculator and Finance::MortgageCalculator::US (which would be an empty subclass) and then people could inherit from Finance::MortageCalculator and create their own country-specific calculators. Only do that if it makes sense! You asked if anybody could see any problems, and I suggested being specific to a particular country as being a potential one. If your module isn't actually USA-specific then don't bother. My only concern was not to have a module which is only applicable in a particular country not having that as part of its name. (Note that having the ::US module as an empty subclass doesn't really solve this: you still have the problem of a module with a generic name not applying outside the USA.) (I'd still like the word Calculator being present in the name. When I look at module named Finance::Mortgage I think to myself -- mortgage *what*?) Finanace::Mortgages obviously deals with mortgages; what else could it do but calculate them? Calculator is a little like Process or Do or Library or so on: given that without any help from the name we already know this is a Perl library that does something, it doesn't really add anything. Smylers
Re: RFC: new module Finance::MortgageCalculator
* at 31/10 22:08 -0500 Dmitri Tikhonov said: Fellow authors, I intend to write a new module, Finance::MortgageCalculator, with the express purpose of calculating mortgages. Does anyone foresee any problem with the name? I searched CPAN for a while but have not found a module that does something like this. Out of interest what will it add to the functionality of Finance::Loan? cheers Struan
Re: RFC: new module Finance::MortgageCalculator
On Wed, 1 Nov 2006, Smylers wrote: In the UK mortgages many also have a discounted rate for the first few years. I had one which had a discount of 1.2% points for 2 years followed by a premium of 0.8% points for 3 years (so paying out less during the first couple of years after buying a home, but making up for it in years 3-5, by which time you've hopefully got a payrise). Is this discount completely unique to the UK? The US has adjustable rate mortages which affect the rate based on economic conditions. It looks like the module has a good start, and maybe improve down the road; but throwing in geo-centric sub modules might add on a layer of complexity down the road. What if six different countries have the exact same mortgage model. What if one country has no regulation, or if they change their finance laws every few years. And there are interest-only mortgages, where in theory you only pay the interest each month, leaving the main part of the debt exactly the same size, and then also pay into an entirely separate fund to build up some capital to pay off the debt at the mortgage expiry. In practice of course folks mainly seem to get the money to pay it off by suing their financial advisors for persuading them to sign such risky deals in the first place. There have been studies which showed how in the UK it is basically impossible to compare credit card rates, because every supplier has a different way of doing their calculations (and not really making public what they are). It wouldn't surprise me to find something similar going on with mortgages -- certainly I have been in the position of having a choice between two mortgages and the one with the lower rate had the higher monthly payment. Again, interest only mortgages are not unique to the UK, and there are about 3 different forumas for calculating credit card interest in the US Christopher Josephes [EMAIL PROTECTED]