Next: 4.8 Date and Time Up: 4. Built-in Functions Previous: 4.6 Digital Logic Functions   Contents   Index

# 4.7 Financial Functions

Financial Functions perform common financial calculations, such as calculating the future value of an annuity at a given interest rate, straight-line depreciation, double-declining depreciation, or the payment term for a given investment. The financial functions in SpreadScript cover annuities, cash flows, assets. bonds, and Treasury Bills.

Financial functions are most useful for solving cash flow calculations where you know all but one variable. For example, if you know the present value of an investment, interest rate, and periodic payment, you can use the FV function to calculate the future value of the investment. If you know the future value and other variables, but need to know the present value, you can use the PV function.

Many financial functions require specifying a Day Count Basis. A Day Count Basis indicates the way in which the days in a month and the days in a year are to be counted. Most of the financial functions in securities involve 4 different Day Count Basis: 30/360, actual/actual, actual/360 and actual/365.

30/360 Day Count Basis assumes 30-day months and 360-day years (12 months x 30 days). SpreadScript also follows the ``End-of-Month'' rule which assumes that a security pays interest on the last day of the month and will always make its interest on the last day of the month. Special rules are followed when calculating the days between two dates on 30/360 Day Count Basis.

For example, let Start_Date = D1/M1/Y1, End_Date = D2/M2/Y2.

1. If D1=31, SpreadScript uses 30 for D1.
2. If D2=31, SpreadScript uses 31, unless D1=30 or D1=31. In this case, SpreadScript uses 30.
3. If D1 is the last day of Feburary (D1=28 or 29 in a leap year), SpreadScript uses 30 for D1.
4. If D2 is the last day of Feburary (D2=28 or 29 in a leap year) and D1 is also the last day of Feburary, SpreadScript uses 30 for D2.

The special arguments used by SpreadScript financial functions are defined in Table 4.1 Financial functions use the arguments defined in Table

Table 4.1: Arguments used in Financial Functions
 interest rate The interest rate to be used in the calculations. The rate may be specified as annual, monthly or quarterly, but it must agree with the increment you use for periods. By default the interest rate is an annual rate. present value The present value of an investment, representing the amount already received from or committed to an investment. period The number of periods over which the loan, investment or depreciation is to be calculated. The periods may be defined in months, quarters or years, but must agree with the increment used to define interest rate. future value The future value of an investment, given a certain present value, interest rate, and number of periods. cost The original cost of a depreciable capital asset. salvage value The remaining value of a capital asset after the depreciation period has expired. allowable life The allowable life of a depreciable item. yield The interest rate that will make the present value of the expected future cash flows equal to the price of the financial instrument. price The present value of the expected future cash flows where the discount rate is equal to the yield of the financial instrument. coupon rate The annual coupon rate of a security. frequency The number of coupon payments in a year. basis The day count basis to be used in calculation.

Functions related fixed income securities usually require special dates as arguments: issue date, settlement date, first coupon date, last coupon date, maturity date of a security. When specified, the following constraints should be followed:

issue `>` settlement `>` maturity
issue `>` first coupon `>` maturity
issue `>` last coupon `>` maturity

Next: 4.8 Date and Time Up: 4. Built-in Functions Previous: 4.6 Digital Logic Functions   Contents   Index