Given an option book (created via option book functions within the
CapeTools Storage,
CapeTools Stock Option Portfolio or
CapeTools Futures Option Portfolio category of functions), will create a sub option book according to the users criteria.
The 'Criteria' parameter defines the query and is composed of three columns.
The first is the column name, the second is the lowest value to select, and the third is the highest value to select.
Thus if you wanted to select all deals that composed of between 1 and 100 contracts you can specify a three column range with the values {Units, 1, 100}. To select all 'EUR' trades you can use {Ccy, 'EUR', 'EUR'} You can add additional rows to this criteria (the rows will be And-ed).
The columns of the criteria depend heavily on the type of portfolio passed to the 'PortfolioKey' parameter.
The column names take on the parameter names of the function used to created the portfolio (excluding the 'TradeKey' and 'Reload' parameters).
This function creates an object and returns a string-key value to represent this created object.
The TAG value of the string-key returned (second part of the key) is : "SUBBK"
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.
Copyright (c) 2003-2007 CapeTools - All Rights Reserved.