Skip to content

Vector Arithmetic Exp

EXP calculates the exponential of each element in the input array.

Method

tm.ta.exp(source)

Inputs

ParameterArgument typeDescriptionDefault Value
sourcepd.SeriesInput data series-

Outputs

OutputType
expnp.ndarray

Example usage

strategy.py
import tradomate as tm
@tm.strategy()
def my_strategy(config: tm.TradomateConfig, data: tm.TradomateData):
# Trying out Vector Arithmetic Exp
exp = tm.ta.exp(data.close)
# Get the last value and print
last_value = exp.iloc[-1]
tm.log(f"Last value of Vector Arithmetic Exp is {last_value}")
# Plot the values of exp
tm.plot(exp, title="Vector Arithmetic Exp", overlay=False)