Back to Community
Can Alaphalens analyze boolean factor?

hI,I create a factor which would be 0 or 1. I want to use Alaphalens to see how effective this factor is.
My code is like:

import alphalens

bins=[0,1]
factor_data = alphalens.utils.get_clean_factor_and_forward_returns(result['price_leo'],
pricing,
bins=bins,
periods=(1,5,10))

but I still get error : ValueError: Bin edges must be unique: array([ 0., 0., 0., 0., 0., 0.])

So I guess, I cannot analyze boolean factor?
Best

1 response

Already replied here