Systemicalpha

ArcTangent

systemic:core-arctanMathfunction1 cr

Inputs

NameTypeDescription
DatafloatarrayThe input data series for the arctangent calculation.

Outputs

NameTypeDescription
ArcTanfloatarrayThe arctangent of each input value, expressed in **radians**.

The Arctangent (arctan) module computes the inverse tangent of each value in a data series, returning the angle in radians whose tangent equals that value.

y=arctan⁡(x)wheretan⁡(y)=xy = \arctan(x) \quad \text{where} \quad \tan(y) = x

Mathematical Foundation

Domain and Range

PropertyValue
Domainx∈(−∞,+∞)x \in (-\infty, +\infty) — all real numbers
Rangey∈(−π2,π2)y \in \left(-\frac{\pi}{2}, \frac{\pi}{2}\right) radians (-90° to 90°)

Key Advantage: Unlike arcsine and arccosine, arctangent accepts any real number as input. This makes it ideal for processing unbounded data series without worrying about invalid inputs.

Properties

  • arctan⁡(0)=0\arctan(0) = 0
  • arctan⁡(1)=π4\arctan(1) = \frac{\pi}{4} (45°)
  • arctan⁡(−1)=−π4\arctan(-1) = -\frac{\pi}{4} (-45°)
  • tan⁡(arctan⁡(x))=x\tan(\arctan(x)) = x for all xx
  • As x→+∞x \to +\infty, arctan⁡(x)→π2\arctan(x) \to \frac{\pi}{2}
  • As x→−∞x \to -\infty, arctan⁡(x)→−π2\arctan(x) \to -\frac{\pi}{2}

Key Values

Input xxOutput (radians)Output (degrees)
101.47184.3°
10.78545°
0.50.46426.6°
000°
-0.5-0.464-26.6°
-1-0.785-45°
-10-1.471-84.3°

Behavior in Systemic

The Arctangent module applies the arctan function element-wise to every value in the input series.

Handling Any Input

Unlike arcsine and arccosine, arctangent is defined for all real numbers. Any numeric input produces a valid angle — even infinite values map cleanly to ±π2\pm\frac{\pi}{2}. This makes arctangent particularly robust for processing raw, unbounded data.

Missing Data

If a value is missing (null) at some position in the input series — a data gap or a closed-market day — the output is null at that same position. The module never substitutes a fabricated number for missing data; every non-missing input still produces its real angle.

Because arctangent has no invalid inputs, a null output always means the input was missing at that position — never a math error.

In live execution, the module returns exactly one datapoint: the newest value, which is null when the newest input is missing.


Creative Applications

Data Normalization (Squashing)

Arctangent is an excellent squashing function that compresses any unbounded range into a bounded interval (−π2,π2)\left(-\frac{\pi}{2}, \frac{\pi}{2}\right):

  • Large positive values → approach +π2+\frac{\pi}{2}
  • Large negative values → approach −π2-\frac{\pi}{2}
  • Values near zero → approximately linear response

This property is invaluable for:

  • Outlier compression — reducing the impact of extreme values
  • Signal normalization — converting unbounded indicators into bounded ranges
  • Rate-of-change smoothing — compressing large price moves

Momentum Analysis

Apply arctangent to rate-of-change or momentum indicators to create a bounded momentum oscillator. Extreme momentum readings (both positive and negative) get compressed, making the signal easier to interpret and compare across different time periods or assets.

flowchart LR
    Price[Price Data] --> ROC[Rate of Change]
    ROC --> ARCTAN((Arctan))
    ARCTAN --> Bounded["Bounded Momentum<br/>(-π/2 to +π/2)"]

Converting Radians to Degrees

The output is in radians. To convert to degrees, multiply by 180π\frac{180}{\pi}:

degrees=radians×180π≈radians×57.2958\text{degrees} = \text{radians} \times \frac{180}{\pi} \approx \text{radians} \times 57.2958

Use a Multiply module with a constant of approximately 57.2958 to convert.

Further Reading

Rendering diagrams...
© 2026 WanoLabs. All rights reservedAlpha build v0.1.5