LNRet - logarithmic returns

Modified on 2019/01/23 11:00 by Administrator — Categorized as: Community Indicators

LNRet: Indicator Documentation

Syntax

public LNRet(Bars bars, DataSeries ds, int period) public LNRet(Bars bars, DataSeries ds, int period, string description)

Parameter Description

barsA Bars object
dsData series
periodLookback period

Description

The LNRet function is used for computing logarithms of daily returns. Translated to C# from legacy version by Dr. Rene Koch.

logarithm of daily returns.

Z(t) := ln(Y(t)) - ln(Y(t - lookback))

or equivalently:

Z(t) := ln(Y(t) / Y(t - lookback))


Remarks

Logarithmic returns are the "base currency" in quantitative analysis. Unlike arithmetic returns:
Logarithmic returns are the base of most further calculations:


See also