def get_factor_effect(security, start_date, end_date, period, factor, group_num=5):
    """获取因子分层回测效果
    以因子值升序分组股票, 以period为周期，获取每组股票收益情况
    :param security 一支指数代码
    :param start_date 开始日期
    :param end_date 结束日期
    :param period 周期，xD, xW, xM > 几日, 几周, 几月
    :param factor 因子名称
    :param group_num 分组数；default 5
    :return dataframe
    """
    security = convert_security(security)
    start_date = to_date_str(start_date)
    end_date = to_date_str(end_date)
    assert group_num > 0, "group_num must be a positive numbe"
    assert isinstance(security, six.string_types), "security must be a inde code"
    assert period[-1] in ["D", "W", "M"], "period must be end with one of (\"D\", \"W\", \"M\")"
    return JQDataClient.instance().get_factor_effect(**locals())
获取因子分层回测效果
以因子值升序分组股票, 以period为周期，获取每组股票收益情况
:param security 一支指数代码
:param start_date 开始日期
:param end_date 结束日期
:param period 周期，xD, xW, xM > 几日, 几周, 几月
:param factor 因子名称
:param group_num 分组数；default 5
:return dataframe
jqdatasdk/api.py