• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sort of off topic, but please help?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sort of off topic, but please help?


  • Subject: Re: Sort of off topic, but please help?
  • From: email@hidden
  • Date: Thu, 24 Jan 2002 01:39:21 -0500

I think this is the formula for continuous interest:

P*(e^(t*r))

Nick

Well, let's see. I start with an initial principal. Let's call it P. I have an interest rate, r, and a time t. With simple interest, the amount I end up with is P + Prt or P(1+rt). However, you're dealing with compound interest, so it's going to be more complicated than that. Let's see how far we can get without knowing the formulas (formulae?)...

I'll do interest compounded annually first, because it's simpler. Again, we start out with P. After one year, I've got P(1+rt), and if t is in years, we can plug in 1 year for t in that equation, and our amount of cash at the end of year 1 will be P(1+r), which will be used as P for the interest for the next year. Therefore, plug it in to the simple interest equation and you get (P(1+r))(1+r) or P(1+r)^2 at the end of year 2. Plug that into the simple interest equation again, and you get P(1+r)^3 at the end of year 3. I'm seeing a pattern here - from this I think that we can safely deduce that the formula for interest compounded *annually* would be P(1+r)^t, as long as the value of t is in years. This equation looks familiar to me, although I have gathered quite a bit of interest since the last time I looked at that equation, so you may want to double-check it. :-)

Now, if it is compounded monthly, hmm... let's see.
Well, our rate r will still be an annual rate, so it would probably be best to keep t in years. 12 months in a year, so each period would be 1/12 of a year. Okay:
At the end of one month, we've got P(1+rt) = P(1+r(1/12)) = P(1+r/12) at the end of month 1. Plug this in for another month, and we get: P(1+r/12)
(1+rt) = P(1+r/12)(1+r(1/12)) = P(1+r/12)^2. Hmm, the same pattern emerges, although now our rate is divided by 12, and the exponent is the number of months instead of years. The number of months is, of course, 12t, if t is in years, so I think we can generalize this formula as P(1+r/
12)^(12t), right?

Looking at this again, we can generalize this to any number of times the interest is compounded per year, by assigning that number to n and making the formula read P(1+r/n)^(nt). I believe this is the formula for compound interest, but again you may want to double-check it against something.

The last type of interest is continuous interest. Let's see. I suppose that I would find the limit of the compound interest function as n approaches infinity. For some reason, I'm having a brain fart and I can't figure out how to solve this one symbolically at the moment. However, if you just plug in values and keep plugging in bigger and bigger values for n, you will notice the thing tend toward P*e(rt), so I would guess that that would be the formula for continuous interest.

With the interest formulas, you should hopefully be able to find whatever you want to find using algebra.

Hope that at least some of this helps...

Charles

On Wednesday, January 23, 2002, at 07:30 PM, email@hidden wrote:

I think I'm doing this so that it's compounded monthly... It's been so long since I've done this in math, and unfortunately, I don't have any math textbooks except my Calculus one... I should be writing programs that use Calculus... I'm much more familiar with it :-)

Thanks for your help!

On Tuesday, January 22, 2002, at 11:37 PM, Charles Srstka wrote:

It would depend on whether you're calculating simple interest, compound interest (in which case we'd need to know whether it's compounded annually, monthly, etc.), or continuous interest.

You should be able to find the formulas for calculating interest in any junior-high math textbook.

On Wednesday, January 23, 2002, at 12:36 AM, email@hidden wrote:

Hello all,
I'm trying to write my first official non-tutorial Cocoa program (a loan calculator for my dad) and this question is directed towards the business / math type of people.

Does anyone know of any way to calculate the interest rate of a loan, paid monthly, when you know the initial principle, the monthly payments made (interest + principle paid), and the number of years that the loan lasts (12 payment periods per year)?

It's not really essential, but I would like to know this and I didn't know where else to ask...

Thanks!
-Kevin
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/
cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Sort of off topic, but please help?
      • From: Charles Srstka <email@hidden>
References: 
 >Re: Sort of off topic, but please help? (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: Perl
  • Next by Date: Cocoa and Calculus
  • Previous by thread: Re: Sort of off topic, but please help?
  • Next by thread: Re: Sort of off topic, but please help?
  • Index(es):
    • Date
    • Thread