Amortise





http://www.QuantTools.com
CapeTools Utils function list

Welcome | Documentation format | QuantTools Groups | QuantTools Categories | Licence

Key TAGs | Excel Index | API Index



Produces an Amortised schedule.

Returns a 6 column range consisting of the following columns : Interest, Principal, Balance, CumPrincipal, CumInterest and Total.

You specify an interest rate for depreciation.

You can indicate an ending notional and whether you would like to repeat notional amounts (ie - useful for the cases where you are comparing notional amounts for two legs that have been built on two different frequencies, Semi-Annual and Quarterly.

You probably want the Quarterly notional amounts to be repeated twice in order to match the notional amounts of the leg build using the semi-annual frequency).

This function requires the input of a Schedule object key, which must have been produced via a call to one of the following functions : MakeSchedule() or MakeSchedule2(). These functions would have returned a string 'KEY' which is to be passed to the 'ScheduleKey' parameter of this function.



Note: Within Excel, the function is named - CT.UTIL.Amortise




High level graphic of Amortise() function with parameters. Blue square node is the actual function with the parameters ordered.



Parameter Description


  1. Notional parameter

    Initial notional amount. Amortisation function will control the generation of notional for following cash flows.
  2. FinalNot parameter

    Final Notional is the value at the end of the depreciation . Normally zero (0).
  3. ScheduleKey parameter

    Schedule Key to an already generated schedule object.
  4. dRate parameter

    The rate of decline.
  5. AmortFreq parameter

    Frequency of each cashflow 1=Yearly, 2=Every 6 months, 4=Every 3 Months and 12=Every Month.
  6. AmortCompounding parameter

    Number of compounding periods within a cashflow (Normally equal to 1).
  7. nRepeatNot parameter

    The number of times you would like to repeat the Notional amounts computed (normally 1).


Extended information

Function Syntax

VB Syntax


Variant CTUtils.Amortise( _
Double Notional, _
Double FinalNot, _
String ScheduleKey, _
Double dRate, _
Long AmortFreq, _
Long AmortCompounding, _
Long nRepeatNot)


Excel Spreadsheet Syntax


=CT.UTIL.Amortise(
Excel Numeric Cell Notional,
Excel Numeric Cell FinalNot,
Excel String Cell ScheduleKey,
Excel Numeric Cell dRate,
Excel Numeric Cell AmortFreq,
Excel Numeric Cell AmortCompounding,
Excel Numeric Cell nRepeatNot)


C++ Syntax


static CTRangeDataCPP Amortise(
double Notional,
double FinalNot,
std::string ScheduleKey,
double dRate,
long AmortFreq,
long AmortCompounding,
long nRepeatNot);


DotNET Syntax


CTRangeData CTUtilsSA.Amortise(
System.Double Notional,
System.Double FinalNot,
System.String ScheduleKey,
System.Double dRate,
System.Int32 AmortFreq,
System.Int32 AmortCompounding,
System.Int32 nRepeatNot);

Parameter data types

ArgNameArgTypeIsKey
NotionalDoubleFALSE
FinalNotDoubleFALSE
ScheduleKeyStringTRUE
dRateDoubleFALSE
AmortFreqLongFALSE
AmortCompoundingLongFALSE
nRepeatNotLongFALSE


Example Inputs

The first column represents the name of the parameters. The second column specifies whether the parameters are optional or not. Finally the last column provides some sample input data.
Function call input string-keys are always in the format : "NAME.EXTTAG.TICKER" The "EXTTAG.TICKER" part is determined from the output of other, capetools, object creation functions.


ArgNameIsOptional (Excel only)Example
NotionalFALSE5000000
FinalNotFALSE1000000
ScheduleKeyFALSEScheduleKeyNAME.EXTTAG.TICKER (from a function call)
dRateFALSE0.05
AmortFreqFALSE12
AmortCompoundingFALSE1
nRepeatNotFALSE1


Example function usage


The C# example below contains all the sub-function calls leading up to this function call. As a result, the example can contain a lot of code.

The VB.NET, J#, C++.NET, Java, Excel VBA, Visual Basic 6 (via COM) and C++ examples below contain function code stubs for the calls leading up to this function call. However, the function call for this function is displayed.
You can easily reproduce the stub functions code from the C# example.


If you are accessing this functrion via the MiniXL libraries, this function is present within the CT.QL.Utils20 MiniXL Excel Addin.

Within our Excel Example Addin Generator, we have used the following QuantTools sub-functions in order to prepare the arguments needed to call the Amortise() function. If you are executing this function via the MiniXL libraries, the module addin name, (in brackets, to the right of the sub-functions listed below), indicates the MiniXL library in which the sub-function is held. You will need to load this library into your Excel session (along with any other libraries that the sub-function call within the addin requires (ie - CT.QT.Utils20 addin in almost all cases) in order for the example to compute successfully.

These are the financial QuantTools sub-function calls that are used within the examples :





The objects generated by these sub-functions are inter-connected in the following way :




The following four examples demostrate calling this function within a Microsoft .NET environment

The following four examples demostrate calling this function within a non .NET environment

The following is a sample output from executing the Amortise() function call


Example
InterestPrincipalBalanceCumPrincipalCumInterestTotal
005e+006000
20833.32027414.79726e+00620274120833.3223574
19988.62035864.59367e+00640632740821.9447149
19140.32044344.38924e+00661076159962.2670723
18288.52052864.18395e+00681604778250.7894297
17433.12061413.97781e+0061.02219e+00695683.91.11787e+006
16574.22070003.77081e+0061.22919e+0061122581.34145e+006
15711.72078633.56295e+0061.43705e+0061279701.56502e+006
14845.62087293.35422e+0061.64578e+0061428151.78859e+006
13975.92095983.14462e+0061.85538e+0061567912.01217e+006
13102.62104722.93415e+0062.06585e+0061698942.23574e+006
12225.62113492.7228e+0062.2772e+0061821202.45932e+006
113452122292.51057e+0062.48943e+0061934652.68289e+006
10460.72131142.29746e+0062.70254e+0062039252.90647e+006
9572.752140022.08346e+0062.91654e+0062134983.13004e+006
8681.072148931.86856e+0063.13144e+0062221793.35361e+006
7785.682157891.65278e+0063.34722e+0062299653.57719e+006
6886.572166881.43609e+0063.56391e+0062368513.80076e+006
5983.72175911.2185e+0063.7815e+0062428354.02434e+006
5077.072184971e+0064e+0062479124.24791e+006



Copyright (c) 2003-2007 CapeTools - All Rights Reserved.