Divide
systemic:core-divMathfunction1 crInputs
| Name | Type | Description |
|---|---|---|
| First Value | floatarray | The value to be divided — the top of the fraction. |
| Second Value | floatarray | The divisor — the bottom of the fraction. |
Outputs
| Name | Type | Description |
|---|---|---|
| Quotient | floatarray | The element-wise quotient of the two input series (First ÷ Second). |
Computes element-wise division of two numeric series. Essential for ratios, normalization, and cross-asset analysis.
| First (A) | Second (B) | Quotient |
|---|---|---|
| 100 | 50 | 2.0 |
| 75 | 100 | 0.75 |
| -10 | 5 | -2.0 |
Division by Zero
Division by zero is mathematically undefined, so the quotient at that position is a null (missing) datapoint — never a fabricated number, and never an error that fails the rest of your series.
| First | Second | Result |
|---|---|---|
| 100 | 0 | null |
| 0 | 0 | null |
| -50 | 0 | null |
Only that position is affected; every other datapoint is computed normally. If you need a value at every point, filter or replace zeros in the divisor before connecting it to this module.
Missing Data
A missing (null) datapoint in either input — a data gap or a closed-market slot — produces a null at the same position in the quotient. The math is never faked with substitute values.
| First | Second | Result |
|---|---|---|
| null | 50 | null |
| 100 | null | null |
| 100 | 50 | 2.0 |
A null from a missing input means "no data exists here"; a null from a zero divisor means "the math is undefined for this data". Both appear as gaps in your charts.
In live execution the module returns exactly one datapoint — the newest — which is null when either input is missing or the divisor is zero at that moment.
Input Alignment
Systemic automatically aligns inputs before division:
| 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 |
Example: ETH (1h) ÷ BTC (15m) → ETH upsampled to 15m intervals first.
Practical Example: Relative Strength
Dividing an asset's price by a benchmark creates a relative strength indicator:
| Interpretation | Meaning |
|---|---|
| Ratio rising | Asset outperforming benchmark |
| Ratio falling | Asset underperforming benchmark |
| Ratio = 1.0 | Asset tracking benchmark exactly |
This is the foundation of pair trading, sector rotation, and performance attribution.
Related Modules
- MUL — Inverse operation
- SUB — Absolute difference (vs. ratio)
- POW — Exponentiation (e.g., for geometric returns)