<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Finance::Amortization - Simple Amortization Schedules

SYNOPSIS
    use Finance::Amortization

    # make a new schedule

    $amortization = new Finance::Amortization(principal =&gt; 100000, rate =
    0.06/12, periods = 360);

    # get the balance after a the twelveth period

    $balance = $amortization-&gt;balance(12)

    # get the interest paid during the twelfth period

    $interest = $amortization-&gt;interest(12);

DESCRIPTION
    Finance::Amortization is a simple object oriented interface to an
    amortization table. Pass in the principal to be amortized, the number of
    payments to be made, and the interest rate per payment. It will
    calculate the rest on demand, and provides a few methods to ask for the
    state of the table after a given number of periods.

    Finance::Amortization is written in pure perl and does not depend on any
    other modules. It exports no functions; all access is via methods called
    on an amortization object. (Except for new(), of course.)

  new()
    $am = Finance::Amortization-&gt;new(principal = 0, rate = 0, periods = 0);

    Creates a new amortization object. Calling interface is hash style, and
    the fields principal, rate, and periods are available, all defaulting to
    zero.

    The rate is the interest rate *per period*. Thus for monthly payments
    with an annual interest rate, you will need to divide by 12.

  rate()
    $rate_per_period = $am-&gt;rate()

    returns the interest rate per period. Ignores any arguments.

  principal()
    $initial_value = $am-&gt;principal()

    returns the initial principal being amortized. Ignores any arguments.

  periods()
    $number_of_periods = $am-&gt;periods()

    returns the number of periods in which the principal is being amortized.
    Ignores any arguments.

  payment()
    $pmt = $am-&gt;payment()

    returns the payment per period. This method will cache the value the
    first time it is called.

  balance(n)
    $balance = $am-&gt;balance(12);

    Returns the balance of the amortization after the period given in the
    argument

  interest(n)
    $interest = $am-&gt;interest(12);

    Returns the interest paid in the period given in the argument

BUGS
    This module uses perl's floating point for financial calculations. This
    may introduce inaccuracies.

TODO
    Use Math::BigRat for the calculations.

    Provide amortizers for present value, future value, annuities, etc.

    Allow for caching calculated values.

    Provide output methods and converters to various table modules.
    HTML::Table, Text::Table, and Data::Table come to mind.

    Write test scripts.

    Better checking for errors and out of range input. Return undef in these
    cases.

AUTHOR
    Nathan Wagner &lt;nw@hydaspes.if.org&gt;

</pre></body></html>