def moving_averages(df, start_step, window_size=None):
    """Compute averages of every feature over moving time windows.

    Args:
        df (Dataframe): Input features as a dataframe
        start_step (Integer): Starting time step of rolling mean
        window_size (Integer): Windows size of rolling mean

    Returns:
        fea (Dataframe): Dataframe consisting of the moving averages
    """
    if window_size is None:
        # Use a large window to compute average over all historical data
        window_size = df.shape[0]
    fea = (
        df.shift(start_step)
        .rolling(min_periods=1, center=False, window=window_size)
        .mean()
    )
    fea.columns = fea.columns + "_mean"
    return fea