CapeTools Utils
http://www.QuantTools.com
In total there are 47 functions present within the CapeTools Utils category of functions.
General Description
Functions to read in XML documents (currently we do not support the usage of namespaces within the documents and the documents cannot be validated against a Schema) and to apply generic XPath query to retrieve XML nodes.
Functions to interpolate one-dimensional and two-dimensional ranges using a variety of interpolation methods.
Most barrier options pricing formulas assumes continuous monitoring of the barrier. We provide a function to convert continuous barriers to discrete barriers.
Functions to integrate (Segment, Trapezoid, Mid Point Trapezoid, Simpson and Kronrod integration methodologies) generic user defined functions of one variable.
Functions to manipulate interest rates from one frequency or compounding to another and to compute discount factors (compound factors) given these rates.
Functions to generate amortised schedules based on straight-line depreciation, sum-of-years digits depreciation, general-declining balance depreciation and fixed-declining balance depreciation methods.
Function list.
- AdjustBarrier - All barrier options pricing formulas assumes continuous monitoring of the barrier.
- Amortise - Produces an Amortised schedule.
- Amortise2 - Produces an Amortised schedule.
- AmortiseDB - Produces an Amortised schedule based on the fixed-declining balance calculation.
- AmortiseDB2 - Produces an Amortised schedule based on the fixed-declining balance calculation.
- AmortiseDDBExact - Produces an Amortised schedule based on the general-declining balance calculation (same as the AmortiseDDB() function), but in this case we solve for the value of the 'factor' parameter to force the cashflow after the last period to have a balance value equal to 'FinalNot'.
- AmortiseDDBExact2 - Produces an Amortised schedule based on the general-declining balance calculation (same as the AmortiseDDB() function), but in this case we solve for the value of the 'factor' parameter to force the cashflow after the last period to have a balance value equal to 'FinalNot'.
- AmortiseGeneralDB - Produces an Amortised schedule based on the general-declining balance calculation : [ Depreciation for PeriodN = (({Notional}-{FinalNot}) - Total depreciation from prior periods) * ({Factor} divided by {NumOfPeriods}) ].
- AmortiseGeneralDB2 - Produces an Amortised schedule based on the general-declining balance calculation [ Depreciation for PeriodN = (({Notional}-{FinalNot}) - Total depreciation from prior periods) * ({Factor} divided by {NumOfPeriods}) ].
- AmortiseLinear - Computes a straight line depreciation based on a depreciation rate : [ Depreciation for each Period = ({Notional}-{FinalNot})*{Rate}, where Rate is precalculated as : Rate = (1.0 divided by (NumOfPeriods divided by RepeatNotional)) ].
- AmortiseSLN - Produces an Amortised schedule based on the straight-line depreciation calculation : [ Depreciation for each period = ((Notional - FinalNot) / NumOfPeriods) ].
- AmortiseSLN2 - Produces an Amortised schedule based on the straight-line depreciation calculation : [ Depreciation for each period = ((Notional - FinalNot) / NumOfPeriods) ].
- AmortiseSYD - Produces an Amortised schedule based on the sum-of-years' digits depreciation calculation : [ SYD for PeriodN = ((Notional - FinalNot)*(NumOfPeriods-PeriodN+1)*2) divided by (NumOfPeriods)*(NumOfPeriods+1) ].
- AmortiseSYD2 - Produces an Amortised schedule based on the sum-of-years' digits depreciation calculation : [ SYD for PeriodN = ((Notional - FinalNot)*(NumOfPeriods-PeriodN+1)*2) divided by (NumOfPeriods)*(NumOfPeriods+1) ].
- CleanXLRange - Replaces the 'NA' padding within an Excel range with a user defined string.
- CompoundFactor - Calculates the Compound Factor between two dates given an InterestRate() object.
- CompoundFactor_T - Calculates the Compound Factor given a time period and an InterestRate() object.
- ConvertRate - Converts an interest rate value from one compounding and frequency to another compounding and frequency.
- CreateAmortObj - Creates an amortisation object to be used within the amortisation fixed and floating rate leg objects.
- CustomFunction - Creates a custom function object with one variable and up to 15 constant arguments.
- EquivalentRate - Calculates the Equivalent Rate between two dates given an InterestRate() object.
- EquivalentRate2 - Calculates the Equivalent Rate between two dates given an InterestRate() object.
- EquivalentRate_T - Calculates the Equivalent Rate given a time period and an InterestRate() object.
- EvaluateFunction - Evaluates a custom function.
- InterestRate - Creates an interest rate object.
- InterpForCubic1st - Given a cubic interpolation object, will return the first derivative for the given point.
- InterpForCubic2nd - Given a cubic interpolation object, will return the second derivative for the given point.
- InterpForValue1D - Given an one dimensional interpolation object created via the InterpObject1D() or InterpLLSObject1D() function call, interpolates for the Y value.
- InterpForValue2D - Given X and Y point values and a two dimensional interpolation object created via the InterpObject2D() function call, interpolates for the Z value.
- InterpLLSError - Given Least Squares Regression (LLS) interpolation object created via the InterpLLSObject1D() function call, returns the Least Squares Regression error.
- InterpLLSObject1D - Creates an one dimensional Linear Least Squares Regression (LLS) interpolation object.
- InterpLLSWeights - Given Least Squares Regression (LLS) interpolation object created via the InterpLLSObject1D() function call, returns the Least Squares Regression weights.
- InterpObject1D - Creates an one dimensional interpolation object.
- InterpObject2D - Creates a two dimensional interpolation object.
- InterpObjectCubic1D - Creates an one dimensional cubic-spline interpolation object.
- Interpolate1D - Given a X point value, performs a one dimensional interpolation for the Y value given an XArray and YArray of data.
- Interpolate2D - Given X and Y point values, performs a two dimensional interpolation for the Z value given a Z matrix of data and a XArray and YArray of data headers.
- KronrodIntegral - Integrates a CustomFunction object using the KronrodIntegral (Gauss-Kronrod) method.
- MPTrapezoidIntegral - Integrates a CustomFunction object using the Mid Point TrapezoidIntegral method.
- ReadXML - Reads a XML file into memory.
- SegmentIntegral - Integrates a CustomFunction object using the SegmentIntegral method.
- SimpleDCF - Calculates the DiscountFactor between two dates given an InterestRate() object.
- SimpleDCF_T - Calculates the DiscountFactor given a time period and an InterestRate() object.
- SimpsonIntegral - Integrates a CustomFunction object using the SimpsonIntegral method.
- TrapezoidIntegral - Integrates a CustomFunction object using the TrapezoidIntegral method.
- ValueDateObj - Creates a centralized valuation date object.
- XMLGenericQuery - Queries a generic XML document, with the given XPath query.
Copyright (c) 2003-2007 CapeTools - All Rights Reserved.