Results 1 to 9 of 9

Thread: This is probably so easy it is frightening...

  1. #1
    Jethro
    Guest

    This is probably so easy it is frightening...

    ....that l don't know the answer.

    Ok some one borrows a principle of 10,000 at 10% compound interest. Their first payment is 500, hence the balance after the first payment would be 10,000 + (0.10 * 12) - 500.

    OK so far so easy. The problem l am having is expressing the formula in a procedure, so that l can show payments and remaining principle over 1 year, 2 years etc.

    Some one stop me from hitting my head against my desk.

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    10000*1.1^years-sumof(n=1 to years-1,500*1.1^n)
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3
    jim mcnamara
    Guest
    Kedaman: 23 hours of daylight brings you to the forum nice and early... I had the same problem on a trip far North.

    Jethro: This is called amortization. Search on
    Planetsourcecode for 'amortize'

  4. #4
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    I had to do this in an assignment for one of my modules a few months ago.. didn't know it had a name. That sum is a simple geometric series, so it can be simplified. I'll see if I can dig up the equations I came up with.
    Harry.

    "From one thing, know ten thousand things."

  5. #5
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Okay, this is my version:

    R = 1 + i/12

    P = ((1-R)RnC0) / (1-Rn)


    Where P is the monthly payment, i is the annual interest rate, C0 is the starting capital, n is the number of months after which there is no remaining capital.

    This is for compounding monthly. If you want a different compound rate, you can change it around pretty easily.
    Harry.

    "From one thing, know ten thousand things."

  6. #6
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151

    More data needed.

    This problem is poorly defined and there seems to be some confusion about terminology.

    Apologies in advance for any typo’s in the following.

    First, compound interest refers to interest on interest. The typical situations involving compound interest are savings accounts when there are no withdrawals and loans on which no payments are made. In these situations, the interest due is periodically added to the principal amount. Then, for each period, the interest percentage is applied to the total of the principal plus any previous interest amounts added to the principal. Assuming there are no payments on a loan or withdrawals/deposits from/to a saving account, the formula for compound interest is the following.

    Amount = Principal * (1 + YearlyRate / 1200)^n

    Where n is the number of months. This assumes a yearly interest rate applied monthly, which is common practice.

    For your loan, it is customary to specify interest using a yearly rate, which is applied monthly. It is possible, but rare for the interest to be specified other than as a yearly rate, and it is unusual for the interest period not to be a month (calculated as 1/12 of a year, even though no month happens to be exactly 1/12 of a year).

    I assume that you are talking about a normal commercial loan or mortgage with 10% annual interest calculated monthly and a monthly payment of $500.00. Based on those assumptions, the calculations for each month are as follows.
    • InterestPayment = Principal * 10 / 1200, rounded to the nearest penny.
    • PrincipalPayment = 500 - InterestPayment
    • NewBalance = Principal - PrincipalPayment, which becomes the principal on which interest is calculated next month.
    A schedule for the first few months would be as follows.
    Code:
    Principal    InterestPayment   PrincipalPayment
     10,000.00        83.33             416.67
      9,583.33        79.86             420.14
      9,163.19        76.36             423.64
      8.739.55        72.83             427.17
    The concepts implied by the above can be applied to do calculations using different rates, rules, et cetera.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  7. #7
    jim mcnamara
    Guest
    Guv - unless GAAP in your locale is different from the US you have it wrong. (GAAP = Generally Accepted Accounting Principles). Not your math, your assumptions. By the way, most guys who are decent at match mess this one up.

    I'll log into work and present an accepted version of this here later.
    Generally, the majority of early payments go to interest, little to principle.

    (it's VAX BASIC, but you will have no trouble reading it.)

  8. #8
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151

    GAAP seems right to me.

    Jim McNamara: A $500.00 payment per month on a $10,000.00 loan at 10% would pay the loan off in 22 months, which is the reason for the low interest and high principal payments. $96.50 would be the normal payment on $10,000.00 for 20 years at 10%, which would result in the interest versus principal ratio you are thinking about ($83.33 for interest and $13.17 for principal).

    I do not think my assumptions are contrary to GAAP. It is the size of the payment specified by Jethro which is high for a mortgage payment on $10,000.00, but perhaps not out of line for a small commercial loan to cover some unexpected business expense.

    I will be surprised if your VAX program comes up with anything much different from the above.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  9. #9
    Jethro
    Guest

    Hey thanks guys.

    Yeah Guv has pointed out the complexity involved in the calc. Interest can accrue on interest.

    e.g

    10,000 @ 10%

    after first month

    11,000 @ 10%

    after second month

    12,100 @ 10%

    etc etc etc. Each payment ids predominatly only a cover of the interest accrued from the previous month, and a slight reduction in principle. This changes over the course of the loan.

    No it is not Amortisation it is soley a loan repayment schedule.

    Thanks Harry that helped.

    Am still hitting my head on the desk over this one cause it looks so easy....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width