feature_sectional_corr

czsc.feature_sectional_corr(df, factor, target='n1b', method='pearson', **kwargs)[source]

计算因子特征截面相关性(IC)

:param df:数据,DateFrame格式 :param factor:因子列名,一般采用F#开头的列 :param target:目标列名,一般为n1b :param method:{‘pearson’, ‘kendall’, ‘spearman’} or callable

  • pearson : standard correlation coefficient

  • kendall : Kendall Tau correlation coefficient

  • spearman : Spearman rank correlation

  • callable: callable with input two 1d ndarrays and returning a float

Return:df,res:

前者是每日相关系数结果,后者是每日相关系数的统计结果