Trigger Fn Input
Key Trigger Fn Input in Contingent Claim refers to an optional 1D-array of text labels defining the origin and sequence of the numerical variables expected as input by the function Trigger Fn at any given observation time tᵢ when that function is evaluated in the course of a simulation.
In any simulation context, the time evolution of a fixed number of market variables is simulated and at each observation time the corresponding simulated numerical values are known and can be used as input to any function.
If the entry here is omitted, the input numerical variables equal by default the simulated values as of tᵢ of the market variables in the order in which they are defined in the Underlyings entry in the Structured Product object.
Note the text labels are case sensitive and all blank characters - except any leading or trailing blank characters - are important.
The text labels are valid only if they fulfil one of the following criteria:
1) The text label is of the form VariableN, where N is a positive integer, for example Variable1 , Variable2 etc.
Note, there must be no space between Variable and the integer at the end.
For example, during the simulation of the share prices of 3 stocks named A , B and C, there will be 3 numerical variables at each observation time that denote the corresponding stock prices generated through the simulation at that time.
So the first numerical variable will be the share price of the stock A, the second numerical variable will be the share price of the stock B and the third numerical variable will be the share price of the stock C.
The text VariableN indicates the Nᵗʰ variable of these N variables.
In particular, the text AllVariables indicates al the N variables in their canonical order.
It is also allowed - although hardly sensible - that there exist multiple entries of one or more of the labels, which would mean that the corresponding variables are represented in the input sequence of variables several times.
For illustration, below are a few examples:
Example case a: The entry here consists of the sequence of labels Variable1 , Variable2 , Variable3.
Then the function Trigger Fn expects as input 3 numbers that are interpreted as the simulated share prices of the stocks A , B and C respectively.
Example case b: The entry here consists of the sequence of labels Variable3 , Variable1 , Variable2.
Then the function Trigger Fn expects as input 3 numbers that are interpreted as the simulated share prices of the stocks C , A and B respectively.
Example case c: The entry here consists of the sequence of labels Variable1 , Variable2.
Then the function Trigger Fn expects as input only 2 numbers that are interpreted as the simulated share prices of the stocks A and B respectively.
Example case d: The entry here consists of just the label Variable2.
Then the function Trigger Fn expects as input only 1 number that is interpreted as the simulated share price of the stock B.
2) The text label matches one of text labels associated with the key On Pmt Account or the key Off Pmt Account of any Contingent Claim object that is part of the Payoff Policy of the involved Structured Product object.
In any simulation context, apart from the market variables referenced by the Structured Product, also the values generated by the functions On Pmt Fn and Off Pmt Fn of all involved Contingent Claims are available and can be passed as input - if needed - to any function.
Consider for example the simulation of the share prices of the 3 stocks named A , B and C, as described above.
Further assume the existence of some On Pmt Fn in some Contingent Claim that generates the number of times that the simulated price of the stock B has crossed a certain barrier and assume the corresponding On Pmt Account contains the text label CrossingsOfB
For illustration, below are a few examples:
Example case a: The entry here consists of just the label CrossingsOfB.
Then the function Trigger Fn expects as input only 1 number that is interpreted as the number of crossings of the share price of stock B observed during the simulation up until the observation time.
Example case b: The entry here consists of the sequence of labels Variable2 , CrossingsOfB.
Then the function Trigger Fn expects as input only 2 numbers that are interpreted as the simulated share price of stock B followed by the number of crossings of the share price of stock B.
