Systemicalpha

AND

systemic:core-andLogicfunction1 cr

Inputs

NameTypeDescription
First FlagbooleanarrayThe first boolean series for conjunction.
Second FlagbooleanarrayThe second boolean series for conjunction.

Outputs

NameTypeDescription
ANDbooleanarrayThe element-wise logical AND result.
Outputi=Ai∧Bi\text{Output}_i = A_i \land B_i

The AND module performs element-wise logical conjunction on two boolean series. The output is true only when both inputs are true.

ABA AND B
falsefalsefalse
falsetruefalse
truefalsefalse
truetruetrue

Missing Data

A flag can be missing (null) — a data gap, or a closed-market slot such as a weekend on a stock series. AND never invents a value for such a slot:

ABA AND B
falsemissingfalse
missingfalsefalse
truemissingnull
missingtruenull
missingmissingnull

A false on either side settles the answer — the output is false no matter what the missing flag would have been. In every other case the result depends on the missing value, so the output is null at that position; the series keeps its full length and alignment.

AND has no invalid inputs, so a null output always means "undeterminable here", never a math error.

In live execution the module returns exactly one datapoint (the newest slot), which is null when that slot is undeterminable.


Numeric Interpretation

⚠️ Important: When inputs are numeric rather than boolean, the AND module converts values before evaluating:

ValueInterpreted As
0false
0.0false
1true
-5true
0.001true

Rule: Zero is false. Any non-zero value is true. This applies to both inputs independently.


Input Alignment

When inputs have different lengths or frequencies, Systemic automatically aligns them:

ScenarioBehavior
Different lengthsShorter series is padded by repeating its last value
Different frequenciesLower-frequency series is upsampled to match

Example: A daily signal combined with an hourly signal → the daily value is held constant across all hours of that day.


Practical Example

Multi-condition entry: Enter a trade only when RSI indicates oversold and price is above the 200-day moving average. Both conditions must be true simultaneously for the signal to fire—reducing false entries compared to using either condition alone.


  • OR — True when either input is true
  • NOT — Inverts a boolean series
  • EQ — Tests equality between values
© 2026 WanoLabs. All rights reservedAlpha build v0.1.5