Parameter Basics





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

Key TAGs | Excel Index | API Index


http://www.QuantTools.com



This includes the function syntax in 4 languages, VB, Excel (Spreadsheet usage), C++ and .NET.
Detailed parameter description, parameter datatype as well as sample data.


Parameter datatypes


Within the "Parameter datatypes" section, a table will be presented with 3 columns.

The first column represents the name of the parameters. The second column specifies whether the argument type. Finally the last column specifies whether the parameter is a function 'string-key' value.

When a CapeTools function create an object (which are later used by other functions), they actually create objects in memory and return a 'string-key' value which acts as a handle to this created object.

This 'string-key' can then be passed to other functions which can then refer to the stored object. Thus any parameter within the table that specifies a value of TRUE for the 'IsKey' column, requires access to the object pointed to by the 'string-key' and not the value of the 'string-key' string itself.

Example Inputs


Within the "Example Inputs" section, an example of the type of input parameters that can be entered for each parameter is presented. The table presented can be thought of as a Key/Value range and the excel examples we have constructed actually compose a range in a similar way.

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.

Within the sample table, some sample data may have an equals symbol '=' at the beginning of the sample value. This simply indicates here that the actual value entered is the output of a previously called CapeTools library function.

Within Excel, you can name the cell of a called CapeTools function (which returns a 'string-key' value), and simply use the equals symbol to refer to that cell by name. Our Excel examples follow this format.

There may also be presented example values for setting range variables. You can consider range variables as a matrix of cells, where a cell can hold either a string or numeric value.

For the API functions, you can either construct a string containing this range data and use the SetFromString() function within the CTRangeData classes to convert the string range into it's internal data format (not very efficient) or you can set the values for each of the CTRangeData cell points individually.

API utility range functions


Within our examples we used the SetFromString() function to populate CTRangeData/Variant objects simply because it helps us to lay out the data for easy viewing. We do not recommend this method for fast inputting of data because it is not very efficient. The fastest way to populate data is to use the many setter functions present within the CTRangeData class.

The following methods are available for retrieving and populating cells within a range (Not applicable for VB6 (uses Variant matrix) and Excel (Spreadsheet range)) :
If one has entered a string value within a cell, but you want to convert this string value into a double, integer, short or boolean value (assuming that the value can be converted correctly), conversion functions exist for this. In fact this is true for all types (integer to string). The following functions can be used through methods of the CTRangeData class.
You can create a CTRangeData object from a vector of basic data types. The 'bTranspose' parameter is a boolean type parameter and when set to 'false' will create a row vector, when 'true' a column vector.
Again the SetFromString() function is slower than setting individual cell values (from a parsing point of view), but makes good code readability.

You can also execute the ToMatrixString() function to convert a CTRangeData object into a string representation. This is great for viewing the contents of ranges without writing looping code.


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