Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to make Finantial functions in PL/SQL

Re: How to make Finantial functions in PL/SQL

From: Greg Teets <teetshd_at_ucbeh.san.uc.edu>
Date: 1997/09/14
Message-ID: <341b2d12.99536617@news.ececs.uc.edu>#1/1

Hi,

I'm going to rephrase your question into an example just to make sure I'm understanding your question

The interest caluclations are available in any Finance or most Accounting texts.

Mr. Jones expects to retire one year from today and expects to live 10 years after retiring. He has $125,000 to buy an annuity. The annuity will assume earnings of 6% per year. How much would his annual payment from the annuity be if his first payment is in one year?

The formula is Payment = PV divided by the Interest Factor

where the interest factor is (1 - 1 / (1 + r)to the 10th power / rate)

The tenth power is because there are 10 compounding periods.

I will use the PL/SQL power function to accomplish this.

select 125000 / ((1 - (1 / power(1.06, 10))) /.06) from dual;

I ran this command and got a payment of $16983.50. You can verify this by setting up an amortization schedule for the 10 years. At the end, Mr. Jones will be not only out of money but dead, if he predicted correctly.

Year   Balance           Interest         Payment        Balance
      1  125,000.00     7,500.00      16,983.50      116,516.50
      2  116,516.50

      3
      4
      5
      6
      7
      8
      9
    10        
    11               .00   

You can also check it with
select 16983.50 * ((1 - (1 / power(1.06, 10))) /.06) from dual;

This will return the present value of the payments or $125000.

Mr. Jones would probably prefer a life annuity which would give him payments for life for his money. That formula would need to include a life-expectancy factor and the payments would be lower.

Greg Teets
Cincinnati, Ohio

On Mon, 8 Sep 1997 15:40:22 -0300, Angela Maria dos Santos <amsantos_at_intra.singer.com.br> wrote:

>
>I need to make a math function, to give the periodic payment for an
>annuity based on constant payments and a constant interest rate.
>I have a rate per period, the total number of payment periods in an
>annuity and the total amount that a series of future payments is worth
>now, like the PMT function.
>Please, if anyone know how I can take this function in PL/SQL, take me
>an answer.
>Thank you.
>
>
>
>Angela Maria dos Santos
>
Received on Sun Sep 14 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US