def METHOD_NAME(data, instrument_code):
    dailyreturns = get_daily_returns_for_risk(data, instrument_code)
    volconfig = copy(vol_config(data))
    # volconfig contains 'func' and some other arguments
    # we turn func which could be a string into a function, and then
    # call it with the other ags
    volfunction = resolve_function(volconfig.pop("func"))
    vol = volfunction(dailyreturns, **volconfig)
    return vol