Vector Log Natural
LN calculates the natural logarithm of each element in the input array.
Method
Section titled “Method”tm.ta.ln(source)Inputs
Section titled “Inputs”| Parameter | Argument type | Description | Default Value |
|---|---|---|---|
| source | pd.Series | Input data series | - |
Outputs
Section titled “Outputs”| Output | Type |
|---|---|
| ln | np.ndarray |
Example usage
Section titled “Example usage”import tradomate as tm
@tm.strategy()def my_strategy(config: tm.TradomateConfig, data: tm.TradomateData):
# Trying out Vector Log Natural ln = tm.ta.ln(data.close)
# Get the last value and print last_value = ln.iloc[-1] tm.log(f"Last value of Vector Log Natural is {last_value}")
# Plot the values of ln tm.plot(ln, title="Vector Log Natural", overlay=False)