def add_period_cols(df):
    """
    add to given `df` columns with month, day of week
    and day of month based on index dates
        
    Parameters
    ------------------------------------------------
    `df`: pd.DataFrame
        
    Returns
    -------
    pd.Dataframe
    """
    
    df_new = df.copy()
    df_new['month'] = df_new.index.month
    df_new['day_of_week'] = df_new.index.dayofweek
    df_new['day_of_month'] = df_new.index.day
    return df_new