Skip to main content

get_returns

Compute log returns from a pandas Series of closing prices. Log returns are calculated as the difference of the natural logarithm of consecutive prices. Parameters: Returns:

get_returns_nb

Compute log returns using a Numba-compiled function. This function calculates log returns by taking the difference of the natural logarithm of consecutive prices. Parameters: Returns:

get_cumulative_returns

Compute cumulative log returns from a pandas Series of closing prices. Cumulative returns are obtained by computing the cumulative sum of log returns. Parameters: Returns:

get_cumulative_returns_nb

Compute cumulative log returns using a Numba-compiled function. This function calculates cumulative returns by computing the cumulative sum of log returns. Parameters: Returns: