MinMax Fn


MinMax Fn is a
direct subtype of Real To Real Function
aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
with functions MinMax Fn Functions, keys MinMax Fn keys and example object MinMaxFn

TYPE INCLUSION RELATIONSHIPS

Real To Real Function

MinMax Fn

</defs>

AVAILABLE FUNCTIONS

Create

</defs>

AVAILABLE CREATE FUNCTION KEYS

Increments

MinMax Type

Post Applied Weights

Post Cap

Post Floor

Post Increment

Ref Values

</defs>

TYPICAL OBJECTS OF TYPE MinMax Fn

MinMaxFn

</defs>

This type represents - in its basic form, but see also variant forms below - a function ƒ that maps u real variable numbers x₁ , x₂ , ... , xᵤ to either their minimum or maximum.

For simplicity, it is assumed in the description here the regular case whereby all input variables x₁ , x₂ , ... , xᵤ are processed in the given order by the function, but it is possible to process only a selected subset of this variables and/or under a different order through the use of the optional key
Input Variables

For example, in the minimum case the formula looks like:
ƒ( x₁ , x₂ , ... , xᵤ ) = min{ x₁ , x₂ , ... , xᵤ }
The number of input variables u can be variable, which means this function - in its basic form discussed here - has
Domain_Dim = -1

In its basic form, the chart of the output of the function MinMax Fn against the minimum/maximum value is a straight line, as the line A in the diagram below, where the horizontal axis holds the values from 0 to 10 for the minimum/maximum value.
It is possible though to set up the function's parameters in such a way that more interesting charts arise, such as the the line B that resembles the payoff of a call option and the line C that resembles the payoff of a put option.
These function parameters are represented by the following optional keys:
Ref Values
Post Applied Weights
Post Increment
Post Cap
Post Floor



In detail:

1) Calculating the min/max value of the Growth Factors rather than the original numbers:
The minimum or maximum may refer to the growth factors x₁/x⁰₁ , x₂/x⁰₂ , ... , xᵤ/x⁰ᵤ rather than the original input numbers x₁ , x₂ , ... , xᵤ
This is possible by specifying the initial reference values x⁰₁ , x⁰₂ , ... , x⁰ᵤ through the key
Ref Values
In the minimum case the formula becomes:
ƒ( x₁ , x₂ , ... , xᵤ ) = min{ x₁/x⁰₁ , x₂/x⁰₂ , ... , xᵤ/x⁰ᵤ }
It is also possible to specify fixed increments c₁ , c₂ , ... , cᵤ through the key
Increments
In the minimum case the formula becomes:
x₁/x⁰₁ + c₁ , x₂/x⁰₂ + c₂ , ... , xᵤ/x⁰ᵤ + cᵤ

A practical application of this variant is when x₁ , x₂ , ... , xᵤ represent market prices of u stocks at some particular time and the final payoff depends on the least performer stock.
Then the key
Ref Values could be set to hold the reference initial stock prices x⁰₁ , x⁰₂ , ... , x⁰ᵤ
Then the growth factors become x₁/x⁰₁ , x₂/x⁰₂ , ... , xᵤ/x⁰ᵤ which represent the stock performances in that time interval, a fact that means that the function returns the minimum with regard to the performance rather than the spot stock price.

2) Applying weights after having calculated an interim min/max value:
Under this variant, after the minimum or maximum m of the values x₁ , x₂ , ... , xᵤ (or x₁/x⁰₁ , x₂/x⁰₂ , ... , xᵤ/x⁰ᵤ if the key Ref Values applies) has been found, the function returns the product ̅wᵢm rather than m, where:
̅w₁ , ̅w₂ , ... , ̅wᵤ are fixed weights defined through the key
Post Applied Weights and
i is the index that corresponds to the found extremum m, i.e. the smallest integer i for which it holds that xᵢ = m (or xᵢ/x⁰ᵢ = m if the key Ref Values applies).
If there are more than one such elements that equate to m so that there exist several candidate indices, i is chosen as the smallest of all candidate indices.

3) Adding an increment to the interim min/max value:
An increment may be optionally added to the function's interim min/max result by adding the optional key
Post Increment

4) Imposing an upper or lower bound on the interim min/max value:
An upper (cap) or lower (floor) bound may be optionally imposed on the function's interim min/max result by adding the optional key
Post Cap or Post Floor respectively.