(x)
return torch.log(x + 1)
Turn log returns into simple returns.

    r_log = ln(r_simple + 1).

    Parameters
    ----------
    x : torch.Tensor
        Tensor of any shape where each entry represents a logarithmic return.

    Returns
    -------
    torch.Tensor
        Simple returns.
Turn log returns into simple returns.
Turn log returns into simple returns .
def simple2log(x):
    """Turn log returns into simple returns.

    r_log = ln(r_simple + 1).

    Parameters
    ----------
    x : torch.Tensor
        Tensor of any shape where each entry represents a logarithmic return.

    Returns
    -------
    torch.Tensor
        Simple returns.

    """
    return torch.log(x + 1)
def simple2log ( x ) : return torch . log ( x + 1 )