Wrox Programmer Forums
|
Pro Visual Basic 2005 For advanced Visual Basic coders working in version 2005. Beginning-level questions will be redirected to other forums, including Beginning VB 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro Visual Basic 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 27th, 2008, 04:36 PM
Registered User
 
Join Date: Feb 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default amortization calculation

hi
i'm currently working on an amortization program. the schedule and calculation works fine for one interest rate but when i have to use different interest rates for one calculation i'm at lost as to what to do. i tried using the different rates on each value and add it together but that unsatisfactory any suggestions

Owen, Programmer
 
Old February 27th, 2008, 06:36 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Well, one suggestion is to press your shift key into service. That makes you r post a lot easier to read...

Can you explain in a little more detail what the situation is? I'm not clear on that... When you said, “[I] have to use different interest rates for one calculation,” I thought you had the interest rate built into the code, and didn't know how to make it more dynamic.

But then you said, “[I] tried using the different rates on each value...” and I become unclear. More than one rate on each value? A series of value/rate pairs?
 
Old February 28th, 2008, 10:16 AM
Registered User
 
Join Date: Feb 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm currently working on an amortization schedule program. The programme works ok when i enter the value and one interest rate. The programme is reading the rate from an ini file. The problem is when a person takes a loan that attracts different interest rates. The calculation is
1. If the person borrows $5000 then the interest rate is 5.5%
2. Less than $10000 the interest rate for the 1st 5000 is 5.5 and the remainder the rate is 6.5%
3. less than $15000 the rate for 3rd 5000 is 7.5%
4. greater than 15000 the rate is calculated as before and everything over $15000 attracts a rate of 8.5 %

If a loan attracts different interest rates i would calculate each separate and add them together but the value i'm getting isn't satisfactory any other suggestions on how to do this.
i'm using the PMT function to calculate the monthly payment.

Owen, Programmer
 
Old February 28th, 2008, 06:25 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Well, you are absolutely right that you would perform a separate calculation for each rate, and for the portion of the principal that that particular rate applies to. So if these are APRs, then you would have, for one payment toward 16,750:
Code:
Interest = (5,000 × (0.055 / 12))
         + (5,000 × (0.065 / 12))
         + (5,000 × (0.075 / 12))
         + (1,750 × (0.085 / 12))
         or 93.65. If you want to calculate future payment, and so on, you might have to write a function yourself that slogs through all this. The amortization formulae are not designed for something this complex. All of them work with one principal, not a variety of them at differing departure points.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculation in access ashik112 Access 1 February 26th, 2007 08:38 AM
Time Calculation surendran MySQL 1 June 24th, 2006 01:38 PM
Calculation dillemma.... cuzintone SQL Language 0 April 7th, 2005 03:59 PM
Time calculation rdfernandez Access VBA 6 March 24th, 2005 11:51 AM
Calculation Grantm Access 3 February 16th, 2004 10:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.