alphalens报错,求助如何解决
AssertionError Traceback (most recent call last)
Cell In[18], line 2
1 # 特征表现分析
----> 2 dataset.show_feature_performance("rsv_5")
File d:\VeighNaStation\Lib\site-packages\vnpy\alpha\dataset\template.py:237, in AlphaDataset.show_feature_performance(self, name)
234 price_df = price_df.pivot(index="datetime", columns="vt_symbol", values="close")
236 # Merge data
--> 237 clean_data: pd.DataFrame = get_clean_factor_and_forward_returns(feature_s, price_df, quantiles=10)
239 # Perform analysis
240 create_full_tear_sheet(clean_data)
File D:\VeighNaStation\alphalens-master\alphalens\utils.py:835, in get_clean_factor_and_forward_returns(factor, prices, groupby, binning_by_group, quantiles, bins, periods, filter_zscore, groupby_labels, max_loss, zero_aware, cumulative_returns)
678 """
679 Formats the factor data, pricing data, and group mappings into a DataFrame
680 that contains aligned MultiIndex indices of timestamp and asset. The
(...) 825 For use when forward returns are already available.
826 """
827 forward_returns = compute_forward_returns(
828 factor,
829 prices,
(...) 832 cumulative_returns,
833 )
--> 835 factor_data = get_clean_factor(factor, forward_returns, groupby=groupby,
...
2584 yield recode_for_categories(
2585 self.codes[i], self.levels[i], new_levels[i], copy=copy
2586 )
AssertionError: Length of new_levels (3) must be <= self.nlevels (2)
