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

Category: | Financial |

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

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

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

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

Arguments

settlement

specifies the settlement
date of the security. The security settlement date is the date after
the issue date when the security is traded to the buyer.

maturity

specifies the maturity
date of the security. The maturity date is the date the security expires.

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

Arguments

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).

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

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

salvage

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

life

Arguments

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.

Arguments

period

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

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.

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

Arguments

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.

Arguments

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.

FINANCE('ODDFPRICE', settlement, maturity, issue, first-coupon, rate, yld,

redemption, frequency, <basis> );

redemption, frequency, <basis> );

FINANCE('ODDFYIELD', settlement, maturity, issue, first-coupon, rate, pr,

redemption, frequency, <basis> );

redemption, frequency, <basis> );

FINANCE('ODDLPRICE', settlement, maturity, last_interest, rate, yld, redemption,

frequency, <basis> );

frequency, <basis> );

FINANCE('ODDLYIELD', settlement, maturity, last_interest, rate, pr, redemption,

frequency, <basis> );

frequency, <basis> );

Arguments
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.

pv

pv

Arguments

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.

Arguments
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.
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.

pmt

pv

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

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

salvage

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

life

start-period

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

Arguments

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.

values

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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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;

Copyright © SAS Institute Inc. All rights reserved.