Multiply
systemic:core-mulMathInputs
| Name | Type | Description |
|---|---|---|
| First Value | Number series | The first series or constant to multiply. |
| Second Value | Number series | The second series or constant to multiply. |
Outputs
| Name | Type | Description |
|---|---|---|
| Product | Number series | First Value multiplied by Second Value, bar by bar. |
Cost
7
credits per run
1,000
bars
0.199 + 0.00608·n credits for n bars, rounded up. The marks are each plan's limit of bars.
Multiplies two numeric series bar by bar. Useful 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 (empty) on a bar — a data gap or a closed-market day — the product on that bar is empty. 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 | empty | empty |
| empty | 0.5 | empty |
| 0 | 999 | 0 |
A zero is a real value, not missing data: multiplying by 0 gives 0.
Input Alignment
Systemic aligns the inputs by time before the multiplication:
| Scenario | What Happens |
|---|---|
| Different lengths | The result covers the dates that both series share |
| Different periods | The series with the longer period repeats its last value until its next bar |
| One constant | The constant is used on every bar |
Practical Example: Position Value Calculation
Multiplying a quantity by a price gives the value of a position:
| Shares | Price | Position Value |
|---|---|---|
| 100 | 150.00 | 15,000 |
| 50 | 200.00 | 10,000 |
| 200 | 75.00 | 15,000 |
Connect a series that sets the quantity to one input and a price series to the other to follow the position value over time.
Related Modules
- DIV — Division for ratio calculations
- ADD / SUB — Combine or offset values
- POW — Exponentiation for compound growth