Divide
systemic:core-divMathInputs
| Name | Type | Description |
|---|---|---|
| First Value | Number series | The value to be divided — the top of the fraction. |
| Second Value | Number series | The divisor — the bottom of the fraction. |
Outputs
| Name | Type | Description |
|---|---|---|
| Quotient | Number series | The First Value divided by the Second Value, bar by bar. |
Cost
0.198 + 0.00615·n credits for n bars, rounded up. The marks are each plan's limit of bars.
Divides the first series by the second, bar by bar. Useful 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 undefined, so the quotient on that bar is empty (null). It is not replaced by a number, and it does not stop the rest of your series.
| First | Second | Result |
|---|---|---|
| 100 | 0 | empty |
| 0 | 0 | empty |
| -50 | 0 | empty |
Only that bar is affected; every other bar is computed normally. If you need a value on every bar, replace zeros in the divisor before connecting it to this module.
Missing Data
A missing value in either input — a data gap or a closed-market bar — gives an empty quotient on the same bar. Gaps are never filled with substitute values.
| First | Second | Result |
|---|---|---|
| empty | 50 | empty |
| 100 | empty | empty |
| 100 | 50 | 2.0 |
An empty value from a missing input means "no data exists here". An empty value from a zero divisor means "the result is undefined". Both appear as gaps in your charts.
Input Alignment
Systemic automatically aligns inputs before division:
| Scenario | What Happens |
|---|---|
| Different history lengths | The shorter series is not extended; bars without both values give an empty quotient |
| Different periods | The slower series is repeated on the faster bars |
| One constant | The constant is repeated on every bar of the series |
Example: ETH (1h) ÷ BTC (15m) → each ETH value is repeated on the 15m bars 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 flat | Asset moving in line with benchmark |
This is the basis of pair trading, sector rotation, and performance attribution.
Related Modules
- Multiply (MUL) — Inverse operation
- Subtract (SUB) — Difference (vs. ratio)
- Power (POW) — Exponentiation (e.g., for geometric returns)