Skip to main content

TANH

Type: tanh • Category: indicators

Description

Vector Trigonometric Tanh

Parameters

NameTypeDescriptionRequiredDefault
dataExpstringInput datano
realstringData column to apply the calculation to (e.g., closing price)no

Help

TANH

Vector Trigonometric Tanh

Description

The TANH worker is an indicator used in financial analysis to calculate the hyperbolic tangent of a given data series. This worker applies the TANH function to a specified data column, typically used for technical analysis in financial markets.

What does this worker do?

The TANH worker takes an input data series (dataExp) and applies the hyperbolic tangent function to a specified column (real). The hyperbolic tangent function, TANH(x), is defined as:

TANH(x) = 2 / (1 + EXP(-2x)) - 1

or equivalently,

TANH(x) = (EXP(x) - EXP(-x)) / (EXP(x) + EXP(-x))

This function maps any real-valued number to a value between -1 and 1.

How to Interpret the Results

The result of the TANH worker is a new data series where each value is the hyperbolic tangent of the corresponding value in the specified column of the input data. The values of the TANH function range from -1 to 1.

  • Values close to 1 indicate that the input values are large and positive.
  • Values close to -1 indicate that the input values are large and negative.
  • Values around 0 indicate that the input values are close to 0.

The TANH function is often used in financial analysis to:

  • Normalize data: The TANH function can be used to normalize data to a common range, usually between -1 and 1, which can help in comparing different data series.
  • Identify trends: The TANH function can be used to identify trends in data by applying it to moving averages or other trend-following indicators.

Usage

To use the TANH worker, follow these steps:

  • Provide the input data (dataExp).
  • Specify the data column to apply the calculation to (real).

Example Usage

An example of using the TANH worker is shown in the following GIFs:

Full Example

Full Example

Short Example

Short Example

Parameters

  • dataExp: Input data
  • real: Data column to apply the calculation to (e.g., closing price)

Additional Information

The TANH function is a mathematical function that is commonly used in various fields, including finance, signal processing, and machine learning. It is a continuously differentiable function, which makes it useful for modeling and analysis.

In finance, the TANH function can be used to create indicators that help identify trends, mean reversion, and volatility. It can also be used as a component in more complex indicators and trading strategies.

By applying the TANH function to financial data, analysts can gain insights into the behavior of the market and make more informed investment decisions.