| View previous topic :: View next topic |
| Author |
Message |
arcray Valued Contributor


Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Fri Jan 10, 2003 7:28 am Post subject: How to work out the Annual Percentage Rate (APR)? |
|
|
I think it is a European thing, but APR is required by law to be quoted on all paperwork relating to loans, finance deals etc., here in the UK.
So that if I sell an item for 1000 (call this %X) uk pounds and offer the customer the opportunity to pay over 10 (call this %Y) months at a flat interest rate of 10% (call this %Z), which works out at a monthly payment of 110 ukpounds a month for 10 months...
However I then have to work out the real rate of interest which is normally about double %Z.
Has anyone done this in VDS? I can do it in Excel, but I'd like to work it out in VDS as well, so that I can quote the APR always even if the term (%Y), flat rate (%Z) and principle (%X) varies when required.
Thanks in advance _________________ Andrew GRAY
If you don't know I am looking for work, I won't get the job.
andrewrcgray.com |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Jan 10, 2003 9:40 am Post subject: |
|
|
How about postin' the formula you use in Excel...
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
arcray Valued Contributor


Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Fri Jan 10, 2003 10:37 am Post subject: |
|
|
It is more a complete spreadsheet than just one formula. In maths terms it looks something like this:-
%A=(1+(%X/100))^1/%Y
then where %W is equal to the monthly payment,
"((%Ax%X)^10)-((%Wx%A)^9)-((%Wx%A)^8)-((%Wx%A)^7)-((%Wx%A)^6)-((%Wx%A)^5)-((%Wx%A)^4)-((%Wx%A)^3))-((%Wx%A)^2)-(%Wx%A)-%Z=0"
needs to be solved for %A. Let's say the answer is 1.029
then
resubstitute for %A such:-
(1+(%X/100))=%A^10=1.029^10=1.330925505
so the APR is 33%!
Hence my question whether anyone had already coded it into VDS?! _________________ Andrew GRAY
If you don't know I am looking for work, I won't get the job.
andrewrcgray.com |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Jan 10, 2003 10:59 am Post subject: |
|
|
Well, if the amount is 1000 and the interest is 10% with a
10 month payout... the APR is 12 percent.
| Code: |
OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,"APR",-1,0,120,105
DIALOG ADD,STYLE,S1,MS Sans Serif,9,B
DIALOG ADD,TEXT,T1,5,5,,,"Interest rate (%)",,S1
DIALOG ADD,TEXT,T2,45,5,,,"Total months",,S1
DIALOG ADD,EDIT,E1,20,5,110,20,,,S1
DIALOG ADD,EDIT,E2,60,5,110,20,,,S1
DIALOG ADD,STATUS,Stat,,S1
DIALOG SHOW
:EVLOOP
REPEAT
WAIT ".01"
if @dlgtext(E1)
if @dlgtext(E2)
%%interest = @dlgtext(E1)
%%months = @dlgtext(E2)
%%factor = @fdiv(12, %%months)
%%apr = @fmul(%%interest, %%factor)
DIALOG SET, Stat, @format(%%apr, .2)" APR"
end
end
%e = @event()
UNTIL %e
goto %e
:CLOSE
EXIT
|
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
arcray Valued Contributor


Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Fri Jan 10, 2003 12:48 pm Post subject: |
|
|
In European law that is not quite the case, because after 1 month you only owe (1100-110) In other words just 990, but you are still paying interest on the full amount. Whereas you ought only to be paying interest on what is left owing.
The APR is meant to account for this by giving you the true interest rate paid on the diminishing principle. In other words the true interest rate is far higher; at least double the nominal flat rate. _________________ Andrew GRAY
If you don't know I am looking for work, I won't get the job.
andrewrcgray.com |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Fri Jan 10, 2003 1:40 pm Post subject: |
|
|
Hi arcray,
i'd like to see if i can help (being a maths teacher) but i need to understand exactly what it is that you are after. Can you give an example with a monthly account of payments...
For example, using the example you gave of 1000 over 10 months at 10%,
month 1 - interest is... and the amount owing is...
month 2 - interest is... and the amount owing is...
I need exact info as i could use compound interest or simple interest or interest on the full amount over the 10 months...
I can't promise to find the answer for you but i'll have a better chance if i understand very clearly what you are after.
Serge _________________
|
|
| Back to top |
|
 |
arcray Valued Contributor


Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Fri Jan 10, 2003 4:00 pm Post subject: |
|
|
Hello Serge. Call me Andy.
OK!
Say you borrow 1000 over 10 months at an interest rate of 10% payable monthly. From the discussion above it would seem that people are happy with adding the interest at the beginning of the term and then paying back 10 installments of 110 paying a total of 100 in interest!
However if it were really a 10% interest rate then 1/12 (or 0.833%) of this should be charged against the outstanding principle at the end of every month. i.e. The Before column is what you owe at the end of each month. The after column is what you owe after you have paid your monthly installment and it is this that you should be charged interest on in the 2nd month and so on...
You'll have to excuse the columns not quite lining up. This BB does not have a Table style, but I did try!
| Code: | Monthly Payment 104.64
Month Principle Interest Before After
1 1000.00 8.33 1008.33 903.69
2 903.69 7.53 911.22 806.58
3 806.58 6.72 813.31 708.67
4 708.67 5.91 714.57 609.93
5 609.93 5.08 615.01 510.37
6 510.37 4.25 514.63 409.99
7 409.99 3.42 413.40 308.76
8 308.76 2.57 311.34 206.70
9 206.70 1.72 208.42 103.78
10 103.78 0.86 104.64 0.00
Interest due:- 46.40 |
So a true Rate of APR of 10% would have meant you would have been charged 46.40 for the loan and not a whole 100.00. Indeed 100.00 is to 46.40 what 21.55% is to 10%
So if you pay back 110 a month you are paying a true rate (APR) of 21.55%
See http://www.maths-help.co.uk/Knowldge/Num/Apr/Question.htm for a good explanation of what APR is and how to do the maths formulally. I have to do it using a spreadsheet and I was trying to write an application that would accept three basic inputs:-
Principle
Flat Rate
No of Months to repay
and work out the APR automatically? I was sure someone here had already done the code, but perhaps not?!
Cheers _________________ Andrew GRAY
If you don't know I am looking for work, I won't get the job.
andrewrcgray.com |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Jan 10, 2003 7:18 pm Post subject: |
|
|
Sorry arcray,
I thought we were converting straight across - shoulda known
better than to answer anything complicated at 5:00 AM...
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Fri Jan 10, 2003 11:33 pm Post subject: |
|
|
thanks for that andy - give me a few days to go through it and i'll see what i can do
Serge _________________
|
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Mon Jan 13, 2003 1:02 am Post subject: |
|
|
Hi Arcray,
vds does not have the maths capabilities to deal with working out the apr as per the formulae mentioned at the web site you gave the link to.
there is a dll that seems to contain the maths necessary - the dll adds maths functions to vds and it costs about US$16
are you interested in purchasing that dll or is it not worth that sort of money?
by the way, the dll is called icemath.dll and can be downloaded from http://www.vdsworld.com/index.php?page=download&fileid=58
if you are interested in going the icemath way, let me know and i'll see what i can do about getting the code working for you
Serge _________________
|
|
| Back to top |
|
 |
arcray Valued Contributor


Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Wed Jan 15, 2003 6:01 am Post subject: |
|
|
If we can get it to work, I would be happy to use the icemath.dll! _________________ Andrew GRAY
If you don't know I am looking for work, I won't get the job.
andrewrcgray.com |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Jan 15, 2003 6:19 am Post subject: |
|
|
From what I've read, I think it can be done with an algorithm
loop in straight VDS. It's gonna hafta increment and check
itself for the correct rate on each month's declining balance
though. You can also do the exponentials in a loop.
I just haven't figured out exactly which values to check, the
algebraic symbols are greek to me (pun intended)...
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Wed Jan 15, 2003 10:14 pm Post subject: |
|
|
I agree with Mac on this. Andy if you can give us the definition of each numeric value then I am user we can figure this out for you. Basicly from the Math web-site that you posted where would you place the variables in the formula? We just need to speak on the same terms here. Actually how are you coming up with the Interest for the first month in the table that you posted
| Quote: | Monthly Payment 104.64
Month Principle Interest Before After
1 1000.00 8.33 1008.33 903.69
2 903.69 7.53 911.22 806.58
3 806.58 6.72 813.31 708.67
4 708.67 5.91 714.57 609.93
5 609.93 5.08 615.01 510.37
6 510.37 4.25 514.63 409.99
7 409.99 3.42 413.40 308.76
8 308.76 2.57 311.34 206.70
9 206.70 1.72 208.42 103.78
10 103.78 0.86 104.64 0.00
Interest due:- 46.40 |
What calculation did you do to give you that figure... Also why you say
| Quote: | | %A=(1+(%X/100))^1/%Y |
Is the ^ being used for the Exponent or are you XOr the values on either side of the calculation? I think you are trying to express the Exponent or the Power of the calculation on the left right?
Also what does the %X and %Y represent? I think %Y is the month right? So what is %X? Also what is the number 100 for and the 1's??? If we knew what these values are in relationship to your table then we can make VDS do these calculations for you without the need for an external DLL.... _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Thu Jan 16, 2003 12:51 am Post subject: |
|
|
My understanding of vds functions is that it does not allow you to do things like: | Quote: | | 10 to the power of 1/12 | which is why i suggested icemath that seems to offer that function. Am i mistaken?
The exponential function in vds is, i think, to work out things like | Quote: | | e to the power of 2.4 | I just checked and that is indeed what it does!
That is the only problem i can foresee, the rest is like you suggested an iterative/algorythm loop.
Serge _________________
|
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Jan 16, 2003 1:11 am Post subject: |
|
|
ok - what would 10 to the power of 1/12 be?
10 x 10 x 1/12?
Never used fractional exponentials before...
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|