def bollinger_band(df, base, upper_target, lower_target, period):
    """
    Function to compute Bollinger Bands (BB)
    This is a lagging indicator

    df - the data frame
    base - on which the indicator has to be calculated eg Close
    upper_target - column name to store upper BB value
    lower_target - column name to store lower BB value
    period - period of the bb
    """
    df['{}MA'.format(period)] = df[base].rolling(window=period).mean()
    df['{}STD'.format(period)] = df[base].rolling(window=period).std()
    df[upper_target] = df['{}MA'.format(period)] + (df['{}STD'.format(period)] * 2)
    df[lower_target] = df['{}MA'.format(period)] - (df['{}STD'.format(period)] * 2)

    df = df.drop(['{}MA'.format(period), '{}STD'.format(period)], axis=1)
    return df