Previous Page | Next Page

Functions and CALL Routines

FINANCE Function



Computes financial calculations such as depreciation, maturation, accrued interest, net present value, periodic savings, and internal rates of return.
Category: Financial

Syntax
Arguments
Details
ACCRINT
ACCRINTM
AMORDEGRC
AMORLINC
COUPDAYBS
COUPDAYS
COUPDAYSNC
COUPNCD
COUPNUM
COUPPCD
CUMIPMT
CUMPRINC
DB
DDB
DISC
DOLLARDE
DOLLARFR
DURATION
EFFECT
FV
FVSCHEDULE
INTRATE
IPMT
IRR
MDURATION
MIRR
NOMINAL
NPER
NPV
ODDFPRICE
ODDFYIELD
ODDLPRICE
ODDLYIELD
PMT
PPMT
PRICE
PRICEDISC
PRICEMAT
PV
RATE
RECEIVED
SLN
SYD
TBILLEQ
TBILLPRICE
TBILLYIELD
VDB
XIRR
XNPV
YIELD
YIELDDISC
YIELDMAT
Examples
Example 1: Computing Accrued Interest: ACCRINT
Example 2: Computing Accrued Interest: ACCRINTM
Example 3: Computing Depreciation: AMORDEGRC
Example 4: Computing Description: AMORLINC
Example 5: Computing Description: COUPDAYBS
Example 6: Computing Description: COUPDAYS
Example 7: Computing Description: COUPDAYSNC
Example 8: Computing Description: COUPNCD
Example 9: Computing Description: COUPNUM
Example 10: Computing Description: COUPPCD
Example 11: Computing Description: CUMIPMT
Example 12: Computing Description: CUMPRINC
Example 13: Computing Description: DB
Example 14: Computing Description: DDB
Example 15: Computing Description: DISC
Example 16: Computing Description: DOLLARDE
Example 17: Computing Description: DOLLARFR
Example 18: Computing Description: DURATION
Example 19: Computing Description: EFFECT
Example 20: Computing Description: FV
Example 21: Computing Description: FVSCHEDULE
Example 22: Computing Description: INTRATE
Example 23: Computing Description: IPMT
Example 24: Computing Description: IRR
Example 25: Computing Description: MDURATION
Example 26: Computing Description: MIRR
Example 27: Computing Description: NOMINAL
Example 28: Computing Description: NPER
Example 29: Computing Description: NPV
Example 30: Computing Description: ODDFPRICE
Example 31: Computing Description: ODDFYIELD
Example 32: Computing Description: ODDLPRICE
Example 33: Computing Description: ODDLYIELD
Example 34: Computing Description: PMT
Example 35: Computing Description: PPMT
Example 36: Computing Description: PRICE
Example 37: Computing Description: PRICEDISC
Example 38: Computing Description: PRICEMAT
Example 39: Computing Description: PV
Example 40: Computing Description: RATE
Example 41: Computing Description: RECEIVED
Example 42: Computing Description: SLN
Example 43: Computing Description: SYD
Example 44: Computing Description: TBILLEQ
Example 45: Computing Description: TBILLPRICE
Example 46: Computing Description: TBILLYIELD
Example 47: Computing Description: VDB
Example 48: Computing Description: XIRR
Example 49: Computing Description: XNPV
Example 50: Computing Description: YIELD
Example 51: Computing Description: YIELDDISC
Example 52: Computing Description: YIELDMAT

Syntax

FINANCE(string-identifier, parm1, parm2,...)


Arguments

string-identifier

specifies a character constant, variable, or expression. Valid values for string-identifier are listed in the following table.

string-identifier
Description
ACCRINT
computes the accrued interest for a security that pays periodic interest.
ACCRINTM
computes the accrued interest for a security that pays interest at maturity.
AMORDEGRC
computes the depreciation for each accounting period by using a depreciation coefficient.
AMORLINC
computes the depreciation for each accounting period.
COUPDAYBS
computes the number of days from the beginning of the coupon period to the settlement date.
COUPDAYS
computes the number of days in the coupon period that contains the settlement date.
COUPDAYSNC
computes the number of days from the settlement date to the next coupon date.
COUPNCD
computes the next coupon date after the settlement date.
COUPNUM
computes the number of coupons that are payable between the settlement date and the maturity date.
COUPPCD
computes the previous coupon date before the settlement date.
CUMIPMT
computes the cumulative interest that is paid between two periods.
CUMPRINC
computes the cumulative principal that is paid on a loan between two periods.
DB
computes the depreciation of an asset for a specified period by using the fixed-declining balance method.
DDB
computes the depreciation of an asset for a specified period by using the double-declining balance method or some other method that you specify.
DISC
computes the discount rate for a security.
DOLLARDE
converts a dollar price, expressed as a fraction, to a dollar price, expressed as a decimal number.
DOLLARFR
converts a dollar price, expressed as a decimal number, to a dollar price, expressed as a fraction.
DURATION
computes the annual duration of a security with periodic interest payments.
EFFECT
computes the effective annual interest rate.
FV
computes the future value of an investment.
FVSCHEDULE
computes the future value of an initial principal after applying a series of compound interest rates.
INTRATE
computes the interest rate for a fully invested security.
IPMT
computes the interest payment for an investment for a given period.
IRR
computes the internal rate of return for a series of cash flows.
MDURATION
computes the Macaulay modified duration for a security with an assumed face value of $100.
MIRR
computes the internal rate of return where positive and negative cash flows are financed at different rates.
NOMINAL
computes the annual nominal interest rate.
NPER
computes the number of periods for an investment.
NPV
computes the net present value of an investment based on a series of periodic cash flows and a discount rate.
ODDFPRICE
computes the price per $100 face value of a security with an odd first period.
ODDFYIELD
computes the yield of a security with an odd first period.
ODDLPRICE
computes the price per $100 face value of a security with an odd last period.
ODDLYIELD
computes the yield of a security with an odd last period.
PMT
computes the periodic payment for an annuity.
PPMT
computes the payment on the principal for an investment for a given period.
PRICE
computes the price per $100 face value of a security that pays periodic interest.
PRICEDISC
computes the price per $100 face value of a discounted security.
PRICEMAT
computes the price per $100 face value of a security that pays interest at maturity.
PV
computes the present value of an investment.
RATE
computes the interest rate per period of an annuity.
RECEIVED
computes the amount received at maturity for a fully invested security.
SLN
computes the straight-line depreciation of an asset for one period.
SYD
computes the sum-of-years digits depreciation of an asset for a specified period.
TBILLEQ
computes the bond-equivalent yield for a treasury bill.
TBILLPRICE
computes the price per $100 face value for a treasury bill.
TBILLYIELD
computes the yield for a treasury bill.
VDB
computes the depreciation of an asset for a specified or partial period by using a declining balance method.
XIRR
computes the internal rate of return for a schedule of cash flows that is not necessarily periodic.
XNPV
computes the net present value for a schedule of cash flows that is not necessarily periodic.
YIELD
computes the yield on a security that pays periodic interest.
YIELDDISC
computes the annual yield for a discounted security (for example, a treasury bill).
YIELDMAT
computes the annual yield of a security that pays interest at maturity.

parm

specifies a parameter that is associated with each string-identifier. The following parameters are available:

basis

is an optional parameter that specifies a character or numeric value that indicates the type of day count basis to use.

Numeric Value String Value Day Count Method
0 "30/360" US (NASD) 30/360
1 "ACTUAL" Actual/actual
2 "ACT/360" Actual/360
3 "ACT/365" Actual/365
4 "EU30/360" European 30/360

interest-rates

specifies rates that are provided as numeric values and not as percentages.

dates

specifies that all dates in the financial functions are SAS dates.

sign-of-cash-values

for all the arguments, specifies that the cash you pay out, such as deposits to savings or other withdrawals, is represented by negative numbers. It also specifies that the cash you receive, such as dividend checks and other deposits, is represented by positive numbers.


Details


ACCRINT

Computes the accrued interest for a security that pays periodic interest.


Syntax

FINANCE('ACCRINT', issue, first-interest, settlement, rate, par, frequency, <basis>);

where

issue

specifies the issue date of the security.

first-interest

specifies the first interest date of the security.

settlement

specifies the settlement date.

rate

specifies the interest rate.

par

specifies the par value of the security. If you omit par, SAS uses the value $1000.

frequency

specifies the number of coupon payments per year. For annual payments, frequency = 1; for semiannual payments, frequency = 2; for quarterly payments, frequency = 4.

basis

specifies the optional day count value.

Featured in:

Computing Accrued Interest: ACCRINT


ACCRINTM

Computes the accrued interest for a security that pays interest at maturity.


Syntax

FINANCE('ACCRINTM', issue, settlement, rate, par, <basis>);

where

issue

specifies the issue date of the security.

settlement

specifies the settlement date.

rate

specifies the interest rate.

par

specifies the par value of the security. If you omit par, SAS uses the value $1000.

basis

specifies the optional day count value.

Featured in:

Computing Accrued Interest: ACCRINTM


AMORDEGRC

Computes the depreciation for each accounting period by using a depreciation coefficient.


Syntax

FINANCE('AMORDEGRC', cost, date-purchased, first-period, salvage, period, rate, <basis>);

where

cost

specifies the initial cost of the asset.

date-purchased

specifies the date of the purchase of the asset.

first-period

specifies the date of the end of the first period.

salvage

specifies the value at the end of the depreciation (also called the salvage value of the asset).

period

specifies the depreciation period.

rate

specifies the rate of depreciation.

basis

specifies the optional day count value.

Tip: When the first argument of the FINANCE function is AMORDEGRC and the value of basis is 2, the function returns a missing value.
Featured in:

Computing Depreciation: AMORDEGRC


AMORLINC

Computes the depreciation for each accounting period.


Syntax

FINANCE('AMORLINC', cost, date-purchased, first-period, salvage, period, rate, <basis>);

where

cost

specifies the initial cost of the asset.

date-purchased

specifies the date of the purchase of the asset.

first-period

specifies the date of the end of the first period.

salvage

specifies the value at the end of the depreciation (also called the salvage value of the asset).

period

specifies the depreciation period.

rate

specifies the rate of depreciation.

basis

specifies the optional day count value.

Tip: When the first argument of the FINANCE function is AMORLINC and the value of basis is 2, the function returns a missing value.
Featured in:

Computing Description: AMORLINC


COUPDAYBS

Computes the number of days from the beginning of the coupon period to the settlement date.


Syntax

FINANCE('COUPDAYBS', date-purchased, first-period, period, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

frequency

specifies the number of coupon payments per year. For annual payments, frequency = 1; for semiannual payments, frequency = 2; for quarterly payments, frequency = 4.

basis

specifies the optional day count value.

Featured in:

Computing Description: COUPDAYBS


COUPDAYS

Computes the number of days in the coupon period that contains the settlement date.

FINANCE('COUPDAYS', settlement, maturity, frequency, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

frequency

specifies the number of coupon payments per year. For annual payments, frequency = 1; for semiannual payments, frequency = 2; for quarterly payments, frequency = 4.

basis

specifies the optional day count value.

Featured in:

Computing Description: COUPDAYS


COUPDAYSNC

Computes the number of days from the settlement date to the next coupon date.

FINANCE('COUPDAYSNC', settlement, maturity, frequency, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

frequency

specifies the number of coupon payments per year. For annual payments, frequency = 1; for semiannual payments, frequency = 2; for quarterly payments, frequency = 4.

basis

specifies the optional day count value.

Featured in:

Computing Description: COUPDAYSNC


COUPNCD

Computes the next coupon date after the settlement date.


Syntax

FINANCE('COUPNCD', settlement, maturity, frequency, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

frequency

specifies the number of coupon payments per year. For annual payments, frequency = 1; for semiannual payments, frequency = 2; for quarterly payments, frequency = 4.

basis

specifies the optional day count value.

Featured in:

Computing Description: COUPNCD


COUPNUM

Computes the number of coupons that are payable between the settlement date and the maturity date.


Syntax

FINANCE('COUPNUM', settlement, maturity, frequency, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

frequency

specifies the number of coupon payments per year. For annual payments, frequency = 1; for semiannual payments, frequency = 2; for quarterly payments, frequency = 4.

basis

specifies the optional day count value.

Featured in:

Computing Description: COUPNUM


COUPPCD

Computes the previous coupon date before the settlement date.


Syntax

FINANCE('COUPPCD', settlement, maturity, frequency, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

frequency

specifies the number of coupon payments per year. For annual payments, frequency = 1; for semiannual payments, frequency = 2; for quarterly payments, frequency = 4.

basis

specifies the optional day count value.

Featured in:

Computing Description: COUPPCD


CUMIPMT

Computes the cumulative interest paid between two periods.


Syntax

FINANCE('CUMIPMT', rate, nper, pv, start-period, end-period, <type>);

where

rate

specifies the interest rate.

nper

specifies the total number of payment periods.

pv

specifies the present value or the lump-sum amount that a series of future payments is worth currently.

start-period

specifies the first period in the calculation. Payment periods are numbered beginning with 1.

end-period

specifies the last period in the calculation.

type

specifies the number 0 or 1 and indicates when payments are due. If type is omitted, it is assumed to be 0.

Featured in:

Computing Description: CUMIPMT


CUMPRINC

Computes the cumulative principal that is paid on a loan between two periods.


Syntax

FINANCE('CUMPRINC', rate, nper, pv, start-period, end-period, <type>);

where

rate

specifies the interest rate.

nper

specifies the total number of payment periods.

pv

specifies the present value or the lump-sum amount that a series of future payments is worth currently.

start-period

specifies the first period in the calculation. Payment periods are numbered beginning with 1.

end-period

specifies the last period in the calculation.

type

specifies the number 0 or 1 and indicates when payments are due. If type is omitted, it is assumed to be 0.

Featured in:

Computing Description: CUMPRINC


DB

Computes the depreciation of an asset for a specified period by using the fixed-declining balance method.


Syntax

FINANCE('DB', cost, salvage, life, period, <month>);

where

cost

specifies the initial cost of the asset.

salvage

specifies the value at the end of the depreciation (also called the salvage value of the asset).

life

specifies the number of periods over which the asset is depreciated (also called the useful life of the asset).

period

specifies the period for which you want to calculate the depreciation. Period must use the same time units as life.

month

specifies the number of months (month is an optional numeric argument). If month is omitted, it defaults to a value of 12.

Featured in:

Computing Description: DB


DDB

Computes the depreciation of an asset for a specified period by using the double-declining balance method or some other method that you specify.


Syntax

FINANCE('DDB', cost, salvage, life, period, <factor>);

where

cost

specifies the initial cost of the asset.

salvage

specifies the value at the end of the depreciation (also called the salvage value of the asset).

life

specifies the number of periods over which the asset is depreciated (also called the useful life of the asset).

period

specifies the period for which you want to calculate the depreciation. Period must use the same time units as life.

factor

specifies the rate at which the balance declines. If factor is omitted, it is assumed to be 2 (the double-declining balance method).

Featured in:

Computing Description: DDB


DISC

Computes the discount rate for a security.


Syntax

FINANCE('DISC', settlement, maturity, pr, redemption, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

pr

specifies the price of security per $100 face value.

redemption

specifies the amount to be received at maturity.

basis

specifies the optional day count value.

Featured in:

Computing Description: DISC


DOLLARDE

Converts a dollar price, expressed as a fraction, to a dollar price, expressed as a decimal number.


Syntax

FINANCE('DOLLARDE', fractionaldollar, fraction);

where

fractionaldollar

specifies the number expressed as a fraction.

fraction

specifies the integer to use in the denominator of a fraction.

Featured in:

Computing Description: DOLLARDE


DOLLARFR

Converts a dollar price, expressed as a decimal number, to a dollar price, expressed as a fraction.


Syntax

FINANCE('DOLLARFR', decimaldollar, fraction);

where

decimaldollar

specifies a decimal number.

fraction

specifies the integer to use in the denominator of a fraction.

Featured in:

Computing Description: DOLLARFR


DURATION

Computes the annual duration of a security with periodic interest payments.


Syntax

FINANCE('DURATION', settlement, maturity, coupon, yld, frequency, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

coupon

specifies the annual coupon rate of the security.

yld

specifies the annual yield of the security.

frequency

specifies the number of coupon payments per year. For annual payments, frequency = 1; for semiannual payments, frequency = 2; for quarterly payments, frequency = 4.

basis

specifies the optional day count value.

Featured in:

Computing Description: DURATION


EFFECT

Computes the effective annual interest rate.


Syntax

FINANCE('EFFECT', nominalrate, npery);

where

nominalrate

specifies the nominal interest rate.

npery

specifies the number of compounding periods per year.

Featured in:

Computing Description: EFFECT


FV

Computes the future value of an investment.


Syntax

FINANCE('FV', rate, nper, <pmt>, <pv>, <type>);

where

rate

specifies the interest rate.

nper

specifies the total number of payment periods.

pmt

specifies the payment that is made each period; the payment cannot change over the life of the annuity. Typically, pmt contains principal and interest but no fees and taxes. If pmt is omitted, you must include the pv argument.

pv

specifies the present value or the lump-sum amount that a series of future payments is worth currently. If pv is omitted, it is assumed to be 0 (zero), and you must include the pmt argument.

type

specifies the number 0 or 1 and indicates when payments are due. If type is omitted, it is assumed to be 0.

Featured in:

Computing Description: FV


FVSCHEDULE

Computes the future value of the initial principal after applying a series of compound interest rates.


Syntax

FINANCE('FVSCHEDULE', principal, schedule1, schedule2...);

where

principal

specifies the present value.

schedule

specifies the sequence of interest rates to apply.

Featured in:

Computing Description: FVSCHEDULE


INTRATE

Computes the interest rate for a fully invested security.


Syntax

FINANCE('INTRATE', settlement, maturity, investment, redemption, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

investment

specifies the amount that is invested in the security.

redemption

specifies the amount to be received at maturity.

basis

specifies the optional day count value.

Featured in:

Computing Description: INTRATE


IPMT

Computes the interest payment for an investment for a specified period.


Syntax

FINANCE('IPMT', rate, period, nper, pv, <fv>, <type>);

where

rate

specifies the interest rate.

period

specifies the period for which you want to calculate the depreciation. Period must use the same units as life.

nper

specifies the total number of payment periods.

pv

specifies the present value or the lump-sum amount that a series of future payments is worth currently. If pv is omitted, it is assumed to be 0 (zero), and you must include the fv argument.

fv

specifies the future value or a cash balance that you want to attain after the last payment is made. If fv is omitted, it is assumed to be 0 (for example, the future value of a loan is 0).

type

specifies the number 0 or 1 and indicates when payments are due. If type is omitted, it is assumed to be 0.

Featured in:

Computing Description: IPMT


IRR

Computes the internal rate of return for a series of cash flows.


Syntax

FINANCE('IRR', value1, value2, ..., value_n);

where

value

specifies a list of numeric arguments that contain numbers for which you want to calculate the internal rate of return.

Featured in:

Computing Description: IRR


MDURATION

Computes the Macaulay modified duration for a security with an assumed face value of $100.


Syntax

FINANCE('MDURATION', settlement, maturity, coupon, yld, frequency, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

coupon

specifies the annual coupon rate of the security.

yld

specifies the annual yield of the security.

frequency

specifies the number of coupon payments per year. For annual payments, frequency = 1; for semiannual payments, frequency = 2; for quarterly payments, frequency = 4.

basis

specifies the optional day count value.

Featured in:

Computing Description: MDURATION


MIRR

Computes the internal rate of return where positive and negative cash flows are financed at different rates.


Syntax

FINANCE('MIRR', value1, ..., value_n, financerate, reinvestrate);

where

values

specifies a list of numeric arguments that contain numbers. These numbers represent a series of payments (negative values) and income (positive values) that occur at regular periods. Values must contain at least one positive value and one negative value to calculate the modified internal rate of return.

financerate

specifies the interest rate that you pay on the money that is used in the cash flows.

reinvestrate

specifies the interest rate that you receive on the cash flows as you reinvest them.

Featured in:

Computing Description: MIRR


NOMINAL

Computes the annual nominal interest rates.


Syntax

FINANCE('NOMINAL', effectrate, npery);

where

effectrate

specifies the effective interest rate.

npery

specifies the number of compounding periods per year.

Featured in:

Computing Description: NOMINAL


NPER

Computes the number of periods for an investment.


Syntax

FINANCE('NPER', rate, pmt, pv, <fv>, <type>);

where

rate

specifies the interest rate.

pmt

specifies the payment that is made each period; the payment cannot change over the life of the annuity. Typically, pmt contains principal and interest but no other fees or taxes. If pmt is omitted, you must include the pv argument.

pv

specifies the present value or the lump-sum amount that a series of future payments is worth currently. If pv is omitted, it is assumed to be 0 (zero), and you must include the pmt argument.

fv

specifies the future value or a cash balance that you want to attain after the last payment is made. If fv is omitted, it is assumed to be 0 (for example, the future value of a loan is 0).

type

specifies the number 0 or 1 and indicates when payments are due. If type is omitted, it is assumed to be 0.

Featured in:

Computing Description: NPER


NPV

Computes the net present value of an investment based on a series of periodic cash flows and a discount rate.


Syntax

FINANCE('NPV', rate, value-1 <,...value-n> );

where

rate

specifies the interest rate.

value

represents the sequence of the cash flows.

Featured in:

Computing Description: NPV


ODDFPRICE

Computes the price of a security per $100 face value with an odd first period.


Syntax

FINANCE('ODDFPRICE', settlement, maturity, issue, first-coupon, rate, yld, redemption, frequency, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

issue

specifies the issue date of the security.

first-coupon

specifies the first coupon date of the security.

rate

specifies the interest rate.

yld

specifies the annual yield of the security.

redemption

specifies the amount to be received at maturity.

frequency

specifies the number of coupon payments per year. For annual payments, frequency = 1; for semiannual payments, frequency = 2; for quarterly payments, frequency = 4.

basis

specifies the optional day count value.

Featured in:

Computing Description: ODDFPRICE


ODDFYIELD

Computes the yield of a security with an odd first period.


Syntax

FINANCE('ODDFYIELD', settlement, maturity, issue, first-coupon, rate, pr, redemption, frequency, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

issue

specifies the issue date of the security.

first-coupon

specifies the first coupon date of the security.

rate

specifies the interest rate.

pr

specifies the price of the security per $100 face value.

redemption

specifies the amount to be received at maturity.

frequency

specifies the number of coupon payments per year. For annual payments, frequency = 1; for semiannual payments, frequency = 2; for quarterly payments, frequency = 4.

basis

specifies the optional day count value.

Featured in:

Computing Description: ODDFYIELD


ODDLPRICE

Computes the price of a security per $100 face value with an odd last period.


Syntax

FINANCE('ODDLPRICE', settlement, maturity, last_interest, rate, yld, redemption, frequency, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

last_interest

specifies the last coupon date of the security.

rate

specifies the interest rate.

yld

specifies the annual yield of the security.

redemption

specifies the amount to be received at maturity.

frequency

specifies the number of coupon payments per year. For annual payments, frequency = 1; for semiannual payments, frequency = 2; for quarterly payments, frequency = 4.

basis

specifies the optional day count value.

Featured in:

Computing Description: ODDLPRICE


ODDLYIELD

Computes the yield of a security with an odd last period.


Syntax

FINANCE('ODDLYIELD', settlement, maturity, last_interest, rate, pr, redemption, frequency, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

last_interest

specifies the last coupon date of the security.

rate

specifies the interest rate.

pr

specifies the price of the security per $100 face value.

redemption

specifies the amount to be received at maturity.

frequency

specifies the number of coupon payments per year. For annual payments, frequency = 1; for semiannual payments, frequency = 2; for quarterly payments, frequency = 4.

basis

specifies the optional day count value.

Featured in:

Computing Description: ODDLYIELD


PMT

Computes the periodic payment of an annuity.


Syntax

FINANCE('PMT', rate, nper, pv, <fv>, <type>);

where

rate

specifies the interest rate.

nper

specifies the number of payment periods.

pv

specifies the present value or the lump-sum amount that a series of future payments is worth currently. If pv is omitted, it is assumed to be 0 (zero), and you must include the fv argument.

fv

specifies the future value or a cash balance that you want to attain after the last payment is made. If fv is omitted, it is assumed to be 0 (for example, the future value of a loan is 0).

type

specifies the number 0 or 1 and indicates when payments are due. If type is omitted, it is assumed to be 0.

Featured in:

Computing Description: PMT


PPMT

Computes the payment on the principal for an investment for a specified period.


Syntax

FINANCE('PPMT', rate, per, nper, pv, <fv>, <type>);

where

rate

specifies the interest rate.

per

specifies the period.

Range: 1-nper
nper

specifies the number of payment periods.

pv

specifies the present value or the lump-sum amount that a series of future payments is worth currently. If pv is omitted, it is assumed to be 0 (zero), and you must include the fv argument.

fv

specifies the future value or a cash balance that you want to attain after the last payment is made. If fv is omitted, it is assumed to be 0 (for example, the future value of a loan is 0).

type

specifies the number 0 or 1 and indicates when payments are due. If type is omitted, it is assumed to be 0.

Featured in:

Computing Description: PPMT


PRICE

Computes the price of a security per $100 face value that pays periodic interest.


Syntax

FINANCE('PRICE', settlement, maturity, rate, yld, redemption, frequency, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

rate

specifies the interest rate.

yld

specifies the annual yield of the security.

redemption

specifies the amount to be received at maturity.

frequency

specifies the number of coupon payments per year. For annual payments, frequency = 1; for semiannual payments, frequency = 2; for quarterly payments, frequency = 4.

basis

specifies the optional day count value.

Featured in:

Computing Description: PRICE


PRICEDISC

Computes the price of a discounted security per $100 face value.


Syntax

FINANCE('PRICEDISC', settlement, maturity, discount, redemption, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

discount

specifies the discount rate of the security.

redemption

specifies the amount to be received at maturity.

basis

specifies the optional day count value.

Featured in:

Computing Description: PRICEDISC


PRICEMAT

Computes the price of a security per $100 face value that pays interest at maturity.


Syntax

FINANCE('PRICEMAT', settlement, maturity, issue, rate, yld, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

issue

specifies the issue date of the security.

rate

specifies the interest rate.

yld

specifies the annual yield of the security.

basis

specifies the optional day count value.

Featured in:

Computing Description: PRICEMAT


PV

Computes the present value of an investment.


Syntax

FINANCE('PV', rate, nper, pmt, <fv>, <type>);

where

rate

specifies the interest rate.

nper

specifies the total number of payment periods.

pmt

specifies the payment that is made each period; the payment cannot change over the life of the annuity. Typically, pmt contains principal and interest but no other fees or taxes.

fv

specifies the future value or a cash balance that you want to attain after the last payment is made. If fv is omitted, it is assumed to be 0 (for example, the future value of a loan is 0).

type

specifies the number 0 or 1 and indicates when payments are due. If type is omitted, it is assumed to be 0.

Featured in:

Computing Description: PV


RATE

Computes the interest rate per period of an annuity.


Syntax

FINANCE('RATE', nper, pmt, pv, <fv>, <type>);

where

nper

specifies the total number of payment periods.

pmt

specifies the payment that is made each period; the payment cannot change over the life of the annuity. Typically, pmt contains principal and interest but no other fees or taxes. If pmt is omitted, you must include the pv argument.

pv

specifies the present value or the lump-sum amount that a series of future payments is worth currently. If pv is omitted, it is assumed to be 0 (zero), and you must include the fv argument.

fv

specifies the future value or a cash balance you want to attain after the last payment is made. If fv is omitted, it is assumed to be 0 (for example, the future value of a loan is 0).

type

specifies the number 0 or 1 and indicates when payments are due. If type is omitted, it is assumed to be 0.

Featured in:

Computing Description: RATE


RECEIVED

Computes the amount that is received at maturity for a fully invested security.


Syntax

FINANCE('RECEIVED', settlement, maturity, investment, discount, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

investment

specifies the amount that is invested in the security.

discount

specifies the discount rate of the security.

basis

specifies the optional day count value.

Featured in:

Computing Description: RECEIVED


SLN

Computes the straight-line depreciation of an asset for one period.


Syntax

FINANCE('SLN', cost, salvage, life);

where

cost

specifies the initial cost of the asset.

salvage

specifies the value at the end of the depreciation (also called the salvage value of an asset).

life

specifies the number of periods over which the asset is depreciated (also called the useful life of the asset).

Featured in:

Computing Description: SLN


SYD

Computes the sum-of-years digits depreciation of an asset for a specified period.


Syntax

FINANCE('SYD', cost, salvage, life, period);

where

cost

specifies the initial cost of the asset.

salvage

specifies the value at the end of the depreciation (also called the salvage value of the asset).

life

specifies the number of periods over which the asset is depreciated (also called the useful life of the asset).

period

specifies a period in the same time units that are used for the argument life.

Featured in:

Computing Description: SYD


TBILLEQ

Computes the bond-equivalent yield for a treasury bill.


Syntax

FINANCE('TBILLEQ', settlement, maturity, discount);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

discount

specifies the discount rate of the security.

Featured in:

Computing Description: TBILLEQ


TBILLPRICE

Computes the price of a treasury bill per $100 face value.


Syntax

FINANCE('TBILLPRICE', settlement, maturity, discount);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

discount

specifies the discount rate of the security.

See
Featured in:

Computing Description: TBILLPRICE


TBILLYIELD

Computes the yield for a treasury bill.


Syntax

FINANCE('TBILLYIELD', settlement, maturity, pr);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

pr

specifies the price of the security per $100 face value.

Featured in:

Computing Description: TBILLYIELD


VDB

Computes the depreciation of an asset for a specified or partial period by using a declining balance method.


Syntax

FINANCE('VDB', cost, salvage, life, start-period, end-period, <factor>, <noswitch>);

where

cost

specifies the initial cost of the asset.

salvage

specifies the value at the end of the depreciation (also called the salvage value of the asset).

life

specifies the number of periods over which the asset is depreciated (also called the useful life of the asset).

start-period

specifies the first period in the calculation. Payment periods are numbered beginning with 1.

end-period

specifies the last period in the calculation.

factor

specifies the rate at which the balance declines. If factor is omitted, it is assumed to be 2 (the double-declining balance method).

noswitch

specifies a logical value that determines whether to switch to straight-line depreciation when the depreciation is greater than the declining balance calculation. If noswitch is omitted, it is assumed to be 1.

Featured in:

Computing Description: VDB


XIRR

Computes the internal rate of return for a schedule of cash flows that is not necessarily periodic.


Syntax

FINANCE('XIRR', values, dates, <guess>);

where

values

specifies a series of cash flows that corresponds to a schedule of payments in dates. The first payment is optional and corresponds to a cost or payment that occurs at the beginning of the investment. If the first value is a cost or payment, it must be a negative value. All succeeding payments are discounted based on a 365-day year. The series of values must contain at least one positive value and one negative value.

dates

specifies a schedule of payment dates that corresponds to the cash flow payments. The first payment date indicates the beginning of the schedule of payments. All other dates must be later than this date, but they can occur in any order.

guess

specifies an optional number that you guess is close to the result of XIRR.

Featured in:

Computing Description: XIRR


XNPV

Computes the net present value for a schedule of cash flows that is not necessarily periodic.


Syntax

FINANCE('XNPV', rate, values, dates);

where

rate

specifies the interest rate.

values

specifies a series of cash flows that corresponds to a schedule of payments in dates. The first payment is optional and corresponds to a cost or payment that occurs at the beginning of the investment. If the first value is a cost or payment, it must be a negative value. All succeeding payments are discounted based on a 365-day year. The series of values must contain at least one positive value and one negative value.

dates

specifies a schedule of payment dates that corresponds to the cash flow payments. The first payment date indicates the beginning of the schedule of payments. All other dates must be later than this date, but they can occur in any order.

Featured in:

Computing Description: XNPV


YIELD

Computes the yield on a security that pays periodic interest.


Syntax

FINANCE('YIELD', settlement, maturity, rate, pr, redemption, frequency, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

rate

specifies the interest rate.

pr

specifies the price of the security per $100 face value.

redemption

specifies the amount to be received at maturity.

frequency

specifies the number of coupon payments per year. For annual payments, frequency = 1; for semiannual payments, frequency = 2; for quarterly payments, frequency = 4.

basis

specifies the optional day count value.

Featured in:

Computing Description: YIELD


YIELDDISC

Computes the annual yield for a discounted security (for example, a treasury bill).


Syntax

FINANCE('YIELDDISC', settlement, maturity, rate, pr, redemption, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

rate

specifies the interest rate.

pr

specifies the price of the security per $100 face value.

redemption

specifies the amount to be received at maturity.

basis

specifies the optional day count value.

Featured in:

Computing Description: YIELDDISC


YIELDMAT

Computes the annual yield of a security that pays interest at maturity.


Syntax

FINANCE('YIELDMAT', settlement, maturity, issue, rate, pr, <basis>);

where

settlement

specifies the settlement date.

maturity

specifies the maturity date.

issue

specifies the issue date of the security.

rate

specifies the interest rate.

pr

specifies the price of the security per $100 face value.

basis

specifies the optional day count value.

Featured in:

Computing Description: YIELDMAT


Examples


Example 1: Computing Accrued Interest: ACCRINT

The following example computes the accrued interest for a security that pays periodic interest.

data _null_;
   issue = mdy(2,27,1996);
   firstinterest = mdy(8,31,1998);
   settlement = mdy(5,1,1998);
   rate = 0.1;
   par = 1000;
   frequency = 2;
   basis = 1;
   r = finance('accrint', issue, firstinterest,
               settlement, rate, par, frequency, basis);
   put r=;
run;
  

The value of r that is returned is 217.39728.


Example 2: Computing Accrued Interest: ACCRINTM

The following example computes the accrued interest for a security that pays interest at maturity.

data _null_;
   issue = mdy(2,28,1998);
   maturity = mdy(8,31,1998);
   rate = 0.1;
   par = 1000;
   basis = 0;
   r = finance('accrintm', issue, maturity, rate, par, basis);
   put r=;
run;

The value of r that is returned is 50.555555556.


Example 3: Computing Depreciation: AMORDEGRC

The following example computes the depreciation for each accounting period by using a depreciation coefficient.

data _null_;
   cost = 2400;
   datepurchased = mdy(8,19,2008);
   firstperiod = mdy(12,31,2008);
   salvage = 300;
   period = 1;
   rate = 0.15;
   basis = 1;
   r = finance('amordegrc', cost, datepurchased,
               firstperiod, salvage, period, rate, basis);
   put r=;
run;

The value of r that is returned is 776.


Example 4: Computing Description: AMORLINC

The following example computes the depreciation for each accounting period.

data _null_;
   cost = 2400;
   dp = mdy(9,30,1998);
   fp = mdy(12,31,1998);
   salvage = 245;
   period = 0;
   rate = 0.115;
   basis = 0;
   r = finance('amorlinc', cost, dp, fp, salvage,
                period, rate, basis);
   put r = ;
run;

The value of r that is returned is 69.


Example 5: Computing Description: COUPDAYBS

The following example computes the number of days from the beginning of the coupon period to the settlement date.

data _null_;
   settlement = mdy(12,30,1994);
   maturity = mdy(11,29,1997);
   frequency = 4;
   basis = 2;
   r = finance('coupdaybs', settlement, maturity, frequency, basis);
   put r = ;
run;

The value of r that is returned is 31.


Example 6: Computing Description: COUPDAYS

The following example computes the number of days in the coupon period that contains the settlement date.

data _null_;
   settlement = mdy(1,25,2007);
   maturity = mdy(11,15,2008);
   frequency = 2;
   basis = 1;
   r = finance('coupdays', settlement, maturity, frequency, basis);
   put r = ;
run;

The value of r that is returned is 181.


Example 7: Computing Description: COUPDAYSNC

The following example computes the number of days from the settlement date to the next coupon date.

data _null_;
   settlement = mdy(1,25,2007);
   maturity = mdy(11,15,2008);
   frequency = 2;
   basis = 1;
   r = finance('coupdaysnc', settlement, maturity, frequency, basis);
   put r = ;
run;

The value of r that is returned is 110.


Example 8: Computing Description: COUPNCD

The following example computes the next coupon date after the settlement date.

data _null_;
   settlement = mdy(1,25,2007);
   maturity = mdy(11,15,2008);
   frequency = 2;
   basis = 1;
   r = finance('coupncd', settlement, maturity, frequency, basis);
   put r = date7.;
run;

The value of r that is returned is 15MAY07.

Note:   r is a numeric SAS value and can be printed using the DATE7 format.  [cautionend]


Example 9: Computing Description: COUPNUM

The following example computes the number of coupons that are payable between the settlement date and the maturity date.

data _null_;
   settlement = mdy(1,25,2007);
   maturity = mdy(11,15,2008);
   frequency = 2;
   basis = 1;
   r = finance('coupnum', settlement, maturity, frequency, basis);
   put r = ;
run;

The value of r that is returned is 4.


Example 10: Computing Description: COUPPCD

The following example computes the previous coupon date before the settlement date.

data _null_;
   settlement = mdy(1,25,2007);
   maturity = mdy(11,15,2008);
   frequency = 2;
   basis = 1;
   r = finance('couppcd', settlement, maturity, frequency, basis);
   put  settlement;
   put  maturity;
   put r date7.;
run;

The value of r that is returned is 11/15/2006.


Example 11: Computing Description: CUMIPMT

The following example computes the cumulative interest that is paid between two periods.

data _null_;
   rate = 0.09;
   nper = 30;
   pv = 125000;
   startperiod = 13;
   endperiod = 24;
   type = 0;
   r = finance('cumipmt', rate, nper, pv,
               startperiod, endperiod, type);
   put r = ;
run;

The value of r that is returned is -94054.82033.


Example 12: Computing Description: CUMPRINC

The following example computes the cumulative principal that is paid on a loan between two periods.

data _null_;
   rate = 0.09;
   nper = 30;
   pv = 125000;
   startperiod = 13;
   endperiod = 24;
   type = 0;
   r = finance('cumprinc', rate, nper, pv,
               startperiod, endperiod, type);
   put r = ;
run;

The value of r that is returned is -51949.70676.


Example 13: Computing Description: DB

The following example computes the depreciation of an asset for a specified period by using the fixed-declining balance method.

data _null_;
   cost = 1000000;
   salvage = 100000;
   life = 6;
   period = 2;
   month = 7;
   r = finance('db', cost, salvage, life, period, month);
   put r = ;
 run;

The value of r that is returned is 259639.41667.


Example 14: Computing Description: DDB

The following example computes the depreciation of an asset for a specified period by using the double-declining balance method or some other method that you specify.

data _null_;
   cost = 2400;
   salvage = 300;
   life = 10*365;
   period = 1;
   factor = .;
   r = finance('ddb', cost, salvage, life, period, factor);
   put r = ;
run;

The value of r that is returned is 1.3150684932.


Example 15: Computing Description: DISC

The following example computes the discount rate for a security.

data _null_;
   settlement = mdy(1,25,2007);
   maturity = mdy(6,15,2007);
   pr = 97.975;
   redemption = 100;
   basis = 1;
   r = finance('disc', settlement, maturity, pr, redemption, basis);
   put r = ;
run;

The value of r that is returned is 0.052420213.


Example 16: Computing Description: DOLLARDE

The following example converts a dollar price, expressed as a fraction, to a dollar price, expressed as a decimal number.

data _null_;
   fractionaldollar = 1.125;
   fraction = 16;
   r = finance('dollarde', fractionaldollar, fraction);
   put r = ;
run;

The value of r that is returned is 1.78125.


Example 17: Computing Description: DOLLARFR

The following example converts a dollar price, expressed as a decimal number, to a dollar price, expressed as a fraction.

data _null_;
   decimaldollar = 1.125;
   fraction = 16;
   r = finance('dollarfr', decimaldollar, fraction);
   put r = ;
run;

The value of r that is returned is 1.02. In fraction form, the value of r is read as [equation].


Example 18: Computing Description: DURATION

The following example computes the annual duration of a security with periodic interest payments.

data _null_;
   settlement = mdy(1,1,2008);
   maturity = mdy(1,1,2016);
   couponrate = 0.08;
   yield = 0.09;
   frequency = 2;
   basis = 1;
   r = finance('duration', settlement,
          maturity, couponrate, yield, frequency, basis);
   put r = ;
run;

The value of r that is returned is 5.993775.


Example 19: Computing Description: EFFECT

The following example computes the effective annual interest rate.

data _null_;
   nominalrate = 0.0525;
   npery = 4;
   r = finance('effect', nominalrate, npery);
   put r = ;
run;

The value of r that is returned is 0.053543.


Example 20: Computing Description: FV

The following example computes the future value of an investment.

data _null_;
   rate = 0.06/12;
   nper = 10;
   pmt = -200;
   pv = -500;
   type = 1;
   r = finance('fv', rate, nper, pmt, pv, type);
   put r = ;
run;

The value of r that is returned is 2581.4033741.


Example 21: Computing Description: FVSCHEDULE

The following example computes the future value of the initial principal after applying a series of compound interest rates.

data _null_;
   principal = 1;
   r1 = 0.09;
   r2 = 0.11;
   r3 = 0.1;
   r = finance('fvschedule', principal, r1, r2, r3);
   put r = ;
run;

The value of r that is returned is 1.33089.


Example 22: Computing Description: INTRATE

The following example computes the interest rate for a fully invested security.

data _null_;
   settlement = mdy(2,15,2008);
   maturity = mdy(5,15,2008);
   investment = 1000000;
   redemption = 1014420;
   basis = 2;
   r = finance('intrate', settlement, maturity, 
        investment, redemption, basis);
   put r = ;
run;

The value of r that is returned is 0.05768


Example 23: Computing Description: IPMT

The following example computes the interest payment for an investment for a specified period.

data _null_;
   rate = 0.1/12;
   per = 2;
   nper = 3;
   pv = 100;
   fv = .;
   type = .;
   r = finance('ipmt', rate, per, nper, pv, fv, type);
   put r = ;
run;

The value of r that is returned is -0.557857564.


Example 24: Computing Description: IRR

The following example computes the internal rate of return for a series of cash flows.

data _null_;
   v1 = -70000;
   v2 = 12000;
   v3 = 15000;
   v4 = 18000;
   v5 = 21000;
   v6 = 26000;
   r = finance('irr', v1, v2, v3, v4, v5, v6);
   put r = ;
run;

The value of r that is returned is 0.086630948.


Example 25: Computing Description: MDURATION

The following example computes the Macaulay modified duration for a security with an assumed face value of $100.

data _null_;
   settlement = mdy(1,1,2008);
   maturity = mdy(1,1,2016);
   couponrate = 0.08;
   yield = 0.09;
   frequency = 2;
   basis = 1;
   r = finance('mduration', settlement, maturity, 
     couponrate, yield, frequency, basis);
   put r = ;
run;

The value of r that is returned is 5.7356698139.


Example 26: Computing Description: MIRR

The following example computes the internal rate of return where positive and negative cash flows are financed at different rates.

data _null_;
   v1 = -1000;
   v2 = 3000;
   v3 = 4000;
   v4 = 5000;
   financerate = 0.08;
   reinvestrate = 0.10;
   r = finance('mirr', v1, v2, v3, v4, financerate, reinvestrate);
   put r = ;
run;

The value of r that is returned is 1.3531420172.


Example 27: Computing Description: NOMINAL

The following example computes the annual nominal interest rate.

data _null_;
   effectrate = 0.08;
   npery = 4;
   r = finance('nominal', effectrate, npery);
   put r = ;
run;

The value of r that is returned is 0.0777061876.


Example 28: Computing Description: NPER

The following example computes the number of periods for an investment.

data _null_;
   rate = 0.08;
   pmt = 200;
   pv = 1000;
   fv = 0;
   type = 0;
   r = finance('nper', rate, pmt, pv, fv, type);
   put r = ;
run;

The value of r that is returned is -4.371981351.


Example 29: Computing Description: NPV

The following example computes the net present value of an investment based on a series of periodic cash flows and a discount rate.

data _null_;
   rate = 0.08;
   v1 = 200;
   v2 = 1000;
   v3 = 0.;
   r = finance('npv', rate, v1, v2, v3);
   put r = ;
run;

The value of r that is returned is 1042.5240055.


Example 30: Computing Description: ODDFPRICE

The following example computes the price of a security per $100 face value with an odd first period.

data _null_;
   settlement = mdy(1,15,93);
   maturity = mdy(1,1,98);
   issue = mdy(1,1,93);
   firstcoupon = mdy(7,1,94);
   rate = 0.07;
   yld = 0.06;
   redemption = 100;
   frequency = 2;
   basis = 0;
   r = finance('oddfprice',
    settlement, maturity, issue, firstcoupon, rate, yld, redemption,
    frequency, basis);
   put r = ;
run;

The value of r that is returned is 103.94103984.


Example 31: Computing Description: ODDFYIELD

The following example computes the interest of a yield with an odd first period.

data _null_;
   settlement = mdy(1,15,93);
   maturity = mdy(1,1,98);
   issue = mdy(1,1,93);
   firstcoupon = mdy(7,1,94);
   rate = 0.07;
   pr = 103.94103984;
   redemption = 100;
   frequency = 2;
   basis = 0;
   r = finance('oddfyield',
    settlement, maturity, issue, firstcoupon, rate, pr, redemption,
    frequency, basis);
   put r = ;
run;

The value of r that is returned is 0.06.


Example 32: Computing Description: ODDLPRICE

The following example computes the price of a security per $100 face value with an odd last period.

data _null_;
   settlement = mdy(2,7,2008);
   maturity = mdy(6,15,2008);
   lastinterest = mdy(10,15,2007);
   rate = 0.0375;
   yield = 0.0405;
   redemption = 100;
   frequency = 2;
   basis = 0;
   r = finance('oddlprice', settlement, maturity, lastinterest, 
   rate, yield, redemption, frequency, basis);
   put r = ;
run;

The value of r that is returned is 99.878286015.


Example 33: Computing Description: ODDLYIELD

The following example computes the yield of a security with an odd last period.

data _null_;
   settlement = mdy(2,7,2008);
   maturity = mdy(6,15,2008);
   lastinterest = mdy(10,15,2007);
   rate = 0.0375;
   pr = 99.878286015;
   redemption = 100;
   frequency = 2;
   basis = 0;
   r = finance('oddlyield', settlement, maturity, lastinterest, 
   rate, pr, redemption, frequency, basis);
   put r = ;
run;

The value of r that is returned is 0.0405.


Example 34: Computing Description: PMT

The following example computes the periodic payment for an annuity.

data _null_;
   rate = 0.08;
   nper = 5;
   pv = 91;
   fv = 3;
   type = 0;
   r = finance('pmt', rate, nper, pv, fv, type);
   put r = ;
run;

The value of r that is returned is -23.30290673.


Example 35: Computing Description: PPMT

The following example computes the payment on the principal for an investment for a specified period.

data _null_;
   rate = 0.08;
   per = 10;
   nper = 10;
   pv = 200000;
   fv = 0;
   type = 0;
   r = finance('ppmt', rate, per, nper, pv, fv, type);
   put r = ;
run;

The value of r that is returned is -27598.05346.


Example 36: Computing Description: PRICE

The following example computes the price of a security per $100 face value that pays periodic interest.

data _null_;
   settlement = mdy(2,15,2008);
   maturity = mdy(11,15,2017);
   rate = 0.0575;
   yield = 0.065;
   redemption = 100;
   frequency = 2;
   basis = 0;
   r = finance('price', settlement, maturity, rate, yield, redemption,
     frequency, basis);
   put r = ;
run;

The value of r that is returned is 94.634361621.


Example 37: Computing Description: PRICEDISC

The following example computes the price of a discounted security per $100 face value.

data _null_;
   settlement = mdy(2,15,2008);
   maturity = mdy(11,15,2017);
   discount = 0.0525;
   redemption = 100;
   basis = 0;
   r = finance('pricedisc', settlement, maturity, discount, redemption, basis);
   put r = ;
run;

The value of r that is returned is 48.8125.


Example 38: Computing Description: PRICEMAT

The following example computes the price of a security per $100 face value that pays interest at maturity.

data _null_;
   settlement = mdy(2,15,2008);
   maturity = mdy(4,13,2008);
   issue = mdy(11,11,2007);
   rate = 0.061;
   yield = 0.061;
   basis = 0;
   r = finance('pricemat', settlement, maturity, issue, rate, yield, basis);
   put r = ;
run;

The value of r that is returned is 99.98449888.


Example 39: Computing Description: PV

The following example computes the present value of an investment.

data _null_;
   rate = 0.05;
   nper = 10;
   pmt = 1000;
   fv = 200;
   type = 0;
   r = finance('pv', rate, nper, pmt, fv, type);
   put r = ;
run;

The value of r that is returned is -7844.51758.


Example 40: Computing Description: RATE

The following example computes the interest rate per period of an annuity.

data _null_;
   nper = 4;
   pmt = -2481;
   pv = 8000;
   r = finance('rate', nper, pmt, pv);
   put r = ;
run;

The value of r that is returned is 0.0921476841.


Example 41: Computing Description: RECEIVED

The following example computes the amount that is received at maturity for a fully invested security.

data _null_;
   settlement = mdy(2,15,2008);
   maturity = mdy(5,15,2008);
   investment = 1000000;
   discount = 0.0575;
   basis = 2;
   r = finance('received', settlement, maturity, investment, discount, basis);
   put r = ;
run;

The value of r that is returned is 1014584.6544.


Example 42: Computing Description: SLN

The following example computes the straight-line depreciation of an asset for one period.

data _null_;
   cost = 2000;
   salvage = 200;
   life = 11;
   r = finance('sln', cost, salvage, life);
   put r = ;
run;

The value of r that is returned is 163.63636364.


Example 43: Computing Description: SYD

The following example computes the sum-of-years digits depreciation of an asset for a specified period.

data _null_;
   cost = 2000;
   salvage = 200;
   life = 11;
   per = 1;
   r = finance('syd', cost, salvage, life, per);
   put r = ;
run;

The value of r that is returned is 300.


Example 44: Computing Description: TBILLEQ

The following example computes the bond-equivalent yield for a treasury bill.

data _null_;
   settlement = mdy(3,31,2008);
   maturity = mdy(6,1,2008);
   discount = 0.0914;
   r = finance('tbilleq', settlement, maturity, discount);
   put r = ;
run;

The value of r that is returned is 0.0941514936.


Example 45: Computing Description: TBILLPRICE

The following example computes the price of a treasury bill per $100 face value.

data _null_;
   settlement = mdy(3,31,2008);
   maturity = mdy(6,1,2008);
   discount = 0.09;
   r = finance('tbillprice', settlement, maturity, discount);
   put r = ;
run;

The value of r that is returned is 98.45.


Example 46: Computing Description: TBILLYIELD

The following example computes the yield for a treasury bill.

data _null_;
   settlement = mdy(3,31,2008);
   maturity = mdy(6,1,2008);
   pr = 98;
   r = finance('tbillyield', settlement, maturity, pr);
   put r = ;
run;

The value of r that is returned is 0.1184990125.


Example 47: Computing Description: VDB

The following example computes the depreciation of an asset for a specified or partial period by using a declining balance method.

data _null_;
   cost = 2400;
   salvage = 300;
   life = 10;
   startperiod = 0;
   endperiod = 1;
   factor = 1.5;
   r = finance('vdb', cost, salvage, life, startperiod, endperiod, factor);
   put r = ;
run;

The value of r that is returned is 360.


Example 48: Computing Description: XIRR

The following example computes the internal rate of return for a schedule of cash flows that is not necessarily periodic.

data _null_;
   v1 = -10000; d1 = mdy(1,1,2008);
   v2 = 2750; d2 = mdy(3,1,2008);
   v3 = 4250; d3 = mdy(10,30,2008);
   v4 = 3250; d4 = mdy(2,15,2009);
   v5 = 2750; d5 = mdy(4,1,2009);
   r = finance('xirr', v1, v2, v3, v4, v5, d1, d2, d3, d4, d5, 0.1);
   put r = ;
run;

The value of r that is returned is 0.3733625335.


Example 49: Computing Description: XNPV

The following example computes the net present value for a schedule of cash flows that is not necessarily periodic.

data _null_;
   r = 0.09;
   v1 = -10000; d1 = mdy(1,1,2008);
   v2 = 2750; d2 = mdy(3,1,2008);
   v3 = 4250; d3 = mdy(10,30,2008);
   v4 = 3250; d4 = mdy(2,15,2009);
   v5 = 2750; d5 = mdy(4,1,2009);
   r = finance('xnpv', r, v1, v2, v3, v4, v5, d1, d2, d3, d4, d5);
   put r = ;
run;

The value of r that is returned is 2086.647602.


Example 50: Computing Description: YIELD

The following example computes the yield on a security that pays periodic interest.

data _null_;
   settlement = mdy(2,15,2008);
   maturity = mdy(11,15,2016);
   rate = 0.0575;
   pr = 95.04287;
   redemption = 100;
   frequency = 2;
   basis = 0;
   r = finance('yield', settlement, maturity, rate, pr, redemption, frequency, basis);
   put r = ;
run;

The value of r that is returned is 0.0650000069.


Example 51: Computing Description: YIELDDISC

The following example computes the annual yield for a discounted security (for example, a treasury bill).

data _null_;
   settlement = mdy(2,15,2008);
   maturity = mdy(11,15,2016);
   pr = 95.04287;
   redemption = 100;
   basis = 0;
   r = finance('yielddisc', settlement, maturity, pr, redemption, basis);
   put r = ;
run;

The value of r that is returned is 0.0059607748.


Example 52: Computing Description: YIELDMAT

The following example computes the annual yield of a security that pays interest at maturity.

data _null_;
   settlement = mdy(3,15,2008);
   maturity = mdy(11,3,2008);
   issue = mdy(11,8,2007);
   rate = 0.0625;
   pr = 100.0123;
   basis = 0;
   r = finance('yieldmat', settlement, maturity, issue, rate, pr, basis);
   put r = ;
run;

The value of r that is returned is 0.0609543337.

Previous Page | Next Page | Top of Page