Run
Function Run within Task with keys Task Run keysruns the Deriscope Functions specified in the calling object according to the prescribed instructions.
It returns an object of type KeySet consisting of NKey-Value pairs, where N is the number of functions, which also equals the number of rows (under the titles) in the table defined in Functions
Each Key is named after the corresponding function.
If more than one functions share the same name, the keys are distinguished by having a numerical suffix added to them.
The Value attached to each key is generally an array, where each row holds the output of a single run of the corresponding function.
For example, if the function is the Yield running on a portfolio of 100 bonds, the array will consist of 100 rows and 1 column and contain the bond yields.
If the function happened to return 2 numbers, the array would consist of 100 rows and 2 columns.
In the more complex case where the function returns either an array or an object, it is possible to include in its output only a subset of selected values and throw away the rest.
This can be achieved with the help of the column titled #OutputSubset of the table defined in Functions
In certain cases it may make sense to generate and report only an object that holds the collection of the values returned by all the runs of a particular function.
This is clearly the case when the function is the Create of some particular Tradable type and the objective is to create an object of type Portfolio that will hold the created tradables, rather than an array of the corresponding tradable objects.
This can be achieved by setting TRUE in the column titled #GroupResult
It is also possible to define a function in one of the rows in such a way, so that it acts on the objects produced by some other function defined at a higher row.
This can be achieved by setting the number of that higher row in the column titled #Target
