View Full Version : Lease calculations

conor.higgins

05-26-2010, 05:01 AM

Hi,

I know this may be slightly off topic but I need some help with a project I am currently doing. So I am designing an iPhone app for lease calculations but I cant seem to find any formulas for it at all. Can anyone help me? I'd imagine for business people this is fairly straightforward.

Conor

Business Attorney

05-26-2010, 08:57 AM

What do you mean by lease calculations? The "buy or lease" decision?

conor.higgins

05-26-2010, 09:15 AM

Hi David, sorry I probably should have made myself a little more clear.

The project I am working on offers the user the chance to find out how much they will have to pay monthly as well as other details and follows this kind of structure:

Lease Payment Calculator (http://tcalc.timevalue.com/all-financial-calculators/lease-calculators/lease-payment-calculator.aspx)

And while I have the interface and the code working perfectly I am missing out on various information like how exactly advanced payments affect the monthly payment amount. There must be a strict formula somewhere for this process.

I also have to replicate the following if you know of the correct procedure to do so:

Lease Affordability Calculator (http://tcalc.timevalue.com/all-financial-calculators/lease-calculators/lease-affordability-calculator.aspx)

Lease Rate Calculator (http://tcalc.timevalue.com/all-financial-calculators/lease-calculators/lease-rate-calculator.aspx)

Lease Residual Calculator (http://tcalc.timevalue.com/all-financial-calculators/lease-calculators/lease-residual-calculator.aspx)

Thank you,

Conor

ArcSine

05-26-2010, 05:28 PM

The attached PDF has a closed-form solution that can handle the basic variables as the calculator function at your first link, the tcalc.timevalue site. The formula allows the user to fiddle with advance payments, and residuals.

Now the fine print (of course ;) ) -- You'll definately wanna put this formula through its paces, vetting its results against those obtained from the website using identical fact-sets. I had to knock this out pretty quickly, in a nearly back-of-the envelope fashion in between phone calls. I did of course make a few test runs around the track, getting identical results against the website, but you'll want to give it a much more thorough examination.

As you're writing the code, note especially the difference in the exponents. In the numerator you're using n, which is the actual number of months in the lease term; whereas in the denominator you need (n - a), where you reduce n by the number of advance payments. For example, a 36-month lease that calls for 2 advance payments would have 36 as the exponent in the numerator, but 34 in the denominator.

To be honest, I was a little disturbed by that fact. My thought is that the residual amount should be discounted by the effective term of the lease, which is n - a. But my original formula, using that thinking, kept producing slightly different results vs. the website, which led me to notice that their calc was apparently discounting the residual by n. I (reluctantly) made that fine-tuning, and that put my results into perfect lock-step with the website's.

Nevertheless, if you find any other lease-calculator sites that seem to produce results that are a bit different, that issue might be the smoking gun. If that happens, try using (n - a) in the numerator and see what falls out.

Best of luck with your new venture! Sounds like an interesting app.

conor.higgins

05-28-2010, 05:33 AM

Thanks a million. Sorry for the late response by the way. I haven't had the chance to even go near the computer for a few days. Just implemented your formula and it works a treat. I don't want to be pushy but do you know what the formulas might be for the other ones or how I would rework that formula to get the other values out? So let's say I wanted to get the rate value how could I alter that formula?

I'm pretty much coding blind on this project because I know so little about the business world.

Thanks again,

Conor

ArcSine

05-28-2010, 11:52 AM

Glad to help. Solving for the monthly amount, for the original lease amount, and for the residual, are all just algebraic re-arrangements of each other (with a simplification or two thrown in just for grins). I've reworked the original attachment to include all 3 formulas...see PDF attached.

Solving for the implied interest rate embedded in a lease deal will be a bit more problematic. The familiar present-value-of-an-annuity formula, which is at the heart of these lease calculations, is a type of polynomial, with the degree of the poly in this case being equal to the number of discounting periods (i.e., monthly payments). Thus a 3-year lease with monthly payments has a PV equation given by a 36th degree poly.

Finding the interest rate amounts to finding the 'roots' of the poly. Evariste Galois proved that closed-form solutions do not exist for extracting the roots of any polys of degree 5 or higher. C'est la vie.

In practice, interest- or discount-rate determinations usually involve one form of trial-and-error or another. Fortunately, a weapon such as Excel's Goal Seek utility, or its IRR function, can blaze through the t & e iterations in a wink.

There's also a strategy involving derivatives called Newton's Method, which can really put some horsepower into a trial-and-error procedure. Check out Wiki's discussion at Newton's method - Wikipedia, the free encyclopedia (http://en.wikipedia.org/wiki/Newton's_method)

Not sure, but I think the author of that Wiki piece might mention some programming issues to be considered in implementing Newton.

You might also want to check out Loan or Investment Formulas (http://oakroadsystems.com/math/loan.htm)

In the Contents section, "Finding Other..." click on Interest Rate for a discussion that you might find helpful. He discusses Newton's method, and then a bit further down he mentions an approach called reversion of series. There might be some stuff there that leads off into something useful.

Gotta split, but best of luck with it, and have an excellent weekend. Cheers!

Powered by vBulletin® Version 4.2.2 Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.