Multiply
systemic:core-mulMathfunction1 crInputs
| Name | Type | Description |
|---|---|---|
| First Value | floatarray | The first numeric series for multiplication. |
| Second Value | floatarray | The second numeric series for multiplication. |
Outputs
| Name | Type | Description |
|---|---|---|
| Product | floatarray | The element-wise product of the two input series. |
Computes element-wise multiplication of two numeric series. Essential for scaling, weighting, and position sizing.
| First (A) | Second (B) | Product |
|---|---|---|
| 100 | 1.02 | 102 |
| 50 | 0.5 | 25 |
| -10 | 3 | -30 |
| 0 | 999 | 0 |
Missing Data
If either input is missing (null) at a position — a data gap or a closed-market day — the product at that position is null. The module never invents a value for missing data: a gap in your inputs stays a gap in the output.
| First (A) | Second (B) | Product |
|---|---|---|
| 100 | null | null |
| null | 0.5 | null |
| 0 | 999 | 0 |
A genuine zero is a real value, not missing data — multiplying by 0 still yields 0. Separate from missing data, a result can be mathematically undefined: multiplying zero by an infinite value has no answer, so that position is also null even though both inputs exist. Any other infinite result passes through unchanged.
In live execution the module returns exactly one datapoint — the newest position — which is null when it cannot be determined.
Precision Rounding
⚠️ Important: Results are rounded to 6 decimal places. For calculations requiring higher precision (e.g., very small cryptocurrency fractions), be aware of this limitation.
| Actual Result | Output |
|---|---|
| 0.123456789 | 0.123457 |
| 1.0000001 | 1.0 |
Input Alignment
Systemic automatically aligns inputs before multiplication:
| Scenario | What Happens |
|---|---|
| Different lengths | Shorter series padded by repeating last value |
| Different frequencies | Lower-frequency upsampled to match higher |
| One constant | Constant expanded to match series length |
Practical Example: Position Value Calculation
Multiplying quantity by price gives portfolio exposure:
| Shares | Price | Position Value |
|---|---|---|
| 100 | 150.00 | 15,000 |
| 50 | 200.00 | 10,000 |
| 200 | 75.00 | 15,000 |
Connect a signal determining quantity to one input and price data to the other for dynamic position tracking.
Related Modules
- DIV — Division for ratio calculations
- ADD / SUB — Combine or offset values
- POW — Exponentiation for compound growth