def simple_moving_average(prices):
    """This function computes the simple moving average for a set of prices
    given a time window.

    Inputs:
    -------
    prices (pandas Dataframe|Series): dataframe with the information of the
        prices of the analyzed assets.

    Outputs:
    --------
    sma (pandas Dataframe): dataframe of the SMA of the assets' prices in
        the prices dataframe.
    """
    # Compute the SMA of the assets:
    mean = prices.mean()
    sma = prices[-1]/mean-1

    return sma