quantopian / alphalens

Performance analysis of predictive (alpha) stock factors
http://quantopian.github.io/alphalens
Apache License 2.0
3.2k stars 1.12k forks source link

create_factor_tear_sheet function not available on tears.py? #308

Closed Konsang closed 6 years ago

Konsang commented 6 years ago

I am trying to create a factor tear sheet but an error throws up every time. I checked tears.py and couldn't find create_factor_tear_sheet. Has this function been renamed or is there any other alternative to create a factor based tear sheet with two quantiles?

luca-s commented 6 years ago

The API changed some time ago.

OLD API

alphalens.tears.create_factor_tear_sheet(alphas['my_factor'], pricing)  

NEW API

factor_data = alphalens.utils.get_clean_factor_and_forward_returns(alphas['my_factor'], pricing)  
alphalens.tears.create_full_tear_sheet(factor_data)  

Have a look at the examples, they are up to date and very useful.

Konsang commented 6 years ago

Thank you for your prompt response.