Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Interest rate function

Posted on 2000-05-16
3
Medium Priority
?
158 Views
Last Modified: 2010-04-04
has anybody got an example of using the interestrate function found in Math.pas.
The other financial functions work fine but when using the interestrate function my answer is different to what I would expect.
Thanks in advance
0
Comment
Question by:eldraco
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Expert Comment

by:sburck
ID: 2816361
From the Delphi bug list:


  Reported by Karl Thompson
  InterestPayment gives wrong results; InterestRate causes Exceptions.
  Karl has provided sample code with which the bugs can be reproduced.
  Jean-Claude Valitchek has looked into these bugs and found that:

       function InterestPayment() calls function PaymentParts() where var T3 goes from negative to zero then positive for a calculation from the first to the last period, which is wrong...!

       function InterestRate():
       As described in the unit (not in the HELP!), First and last payments must be non-zero and of OPPOSITE SIGNS. When this is applied, the function works.

Hope this helps.

0
 
LVL 15

Accepted Solution

by:
simonet earned 200 total points
ID: 2843525
>From the Delphi bug list:

There are no bugs in the InterestRate function in Delphi. People who reported it in the bug list have never done accounting or financial calcs using paper and pencil... or even an HP-48G.

The InterestRate function returns the value exactly as expected, and they match the results of the Financial solver of my HP-48GX exactly. The problem most people have is interpreting the results.

If you do what the InterestRate function does on the paper, using the conventional formulas, you'll also find opposite signs for PV and FV or PMT.

For more info on how to use the InterestRate function, please see:

http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=10356437 
      - or -
http://www.experts-exchange.com/Q.10356437 (non-cookie login)

(it's a 5 pts question, but this function has been extensively discussed and the expect results have been found using the InterestRate function and some financial background).

>my answer is different to what I would expect.


You are probably expecting an interest rate in %/year.

The InterestRate function returns the rate in the time basis of the payment you entered. So, supposed you passed 60 as the number of payments, and you do consecutive monthly payments, then, that is 60 months, and the function will return the Interest rate in months. In order to have the yearly interest rate, multiply it by 12 (and then by 100 to have it in %).

This has all been explained in the thread I mentioned.

Yours,

Alex
0
 

Author Comment

by:eldraco
ID: 2843578
Answer accepted
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question