Main Page | Packages | Class Tree | Index | Help

xp.util

class FinancialFunctions

Object
  |
  +--xp.util.FinancialFunctions


class FinancialFunctions
extends Object

Comments on points, First payment up front, and Last payment up front These entities affect the calculations as follows: Calculation of FV, payment amount, or number of payments is independent of these three Calculation of PV: The number of payments is reduced by 1 for each of the two 'up front' payments. Next, the PV is calculated and then reduced by the amount of the points and 1 payment amount for each of the 'up front' payments. Calculation of I: These amounts are deducted from the PV and the number of payments is reduced by 1 for each of the 'up front' payments. Next, the interest rate is calculated.



Field Summary

public static
cAnnual


public static
cBiWeekly


public static
cDaily
constants for payment frequency

public static
cMonthly


public static
cQuarterly


public static
cWeekly


Method Summary

public static
AnnualI ( i: Number, PmtFreq: String ): Number


public static
getAmt ( pv: Number, fv: Number, i: Number, n: Number ): Number


public static
getEffectiveRate ( pv, n, a, points, FirstPmtAtBegin, LastPmtAtBegin )


public static
getFV ( pv: Number, i: Number, n: Number, a: Number ): Number


public static
getI ( fv: Number, pv: Number, n: Number, a: Number, PmtFreq: String ): Number


public static
getN ( pv: Number, fv: Number, i: Number, a: Number ): Number


public static
getPV ( fv: Number, i: Number, n: Number, a: Number ): Number


public static
payment ( pv: Number, i: Number, n: Number ): Number


public static
PeriodI ( i: Number, PmtFreq: String ): Number


public static
RoundToDigits ( nbr, dig )
returns nbr rounded to dig digits; dig > 0 gives dig decimal places; dig < 0 rounds to the left of the decimal point

public static
slope ( fv: Number, estI: Number, n: Number, a: Number ): Number




Field Documentation

cAnnual

public static var cAnnual

cBiWeekly

public static var cBiWeekly

cDaily

public static var cDaily
constants for payment frequency

cMonthly

public static var cMonthly

cQuarterly

public static var cQuarterly

cWeekly

public static var cWeekly

Method Documentation

AnnualI

public static function AnnualI(i: Number,
 PmtFreq: String): Number

getAmt

public static function getAmt(pv: Number,
 fv: Number,
 i: Number,
 n: Number): Number

getEffectiveRate

public static function getEffectiveRate(pv,
 n,
 a,
 points,
 FirstPmtAtBegin,
 LastPmtAtBegin)

getFV

public static function getFV(pv: Number,
 i: Number,
 n: Number,
 a: Number): Number

getI

public static function getI(fv: Number,
 pv: Number,
 n: Number,
 a: Number,
 PmtFreq: String): Number

getN

public static function getN(pv: Number,
 fv: Number,
 i: Number,
 a: Number): Number

getPV

public static function getPV(fv: Number,
 i: Number,
 n: Number,
 a: Number): Number

payment

public static function payment(pv: Number,
 i: Number,
 n: Number): Number
Calculates loan repayments Formula: PAY = pv x i / (1 – (1 + i)–n) This formula means that the payment (PAY) is equal to the present value of the loan (pv) multiplied by the interest rate (i) divided by 1 minus 1 plus the interest rate raised at the power of the number of periods (n) To convert to monthly payments use PeriodI(i,"monthly") and years*12

Parameters:
pv
present value or principal amount
i
interest rate
n
number of periods
Returns:
Repayment Installement

PeriodI

public static function PeriodI(i: Number,
 PmtFreq: String): Number

RoundToDigits

public static function RoundToDigits(nbr,
 dig)
returns nbr rounded to dig digits; dig > 0 gives dig decimal places; dig < 0 rounds to the left of the decimal point

slope

public static function slope(fv: Number,
 estI: Number,
 n: Number,
 a: Number): Number

The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc