Systemicbeta

ArcTangent

systemic:core-arctanMath

Inputs

NameTypeDescription
DataNumber seriesThe numeric series to take the arctangent of.

Outputs

NameTypeDescription
ArcTanNumber seriesThe arctangent of each input value, in **radians**.

Cost

7
credits per run
1,000
bars

0.198 + 0.00585·n credits for n bars, rounded up. The marks are each plan's limit of bars.

The Arctangent (arctan) module computes the inverse tangent of each value in a series. It returns 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. You can use it on unbounded 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 to every value in the input series, bar by bar.

Handling Any Input

Unlike arcsine and arccosine, arctangent is defined for all real numbers. Any numeric input gives a valid angle. Even infinite values map to ±π2\pm\frac{\pi}{2}. This makes arctangent a safe choice for raw, unbounded data.

Missing Data

If an input value is missing (empty) on a bar — a data gap or a day when the market was closed — the output is empty on that bar. The module never substitutes a number for missing data. Every other input still gives its real angle.

Arctangent has no invalid inputs, so an empty output always means the input was missing on that bar, never a math error.


Creative Applications

Data Normalization (Squashing)

Arctangent is a squashing function: it compresses any unbounded range into the 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 is useful 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 readings, positive and negative, are compressed. This makes the signal easier to read and to compare across 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 reservedBeta v0.1.5