Back to Community
Combine Common Factors to Make a Mega-Alpha, Alphalens

I combined some common factors to make a mega-alpha and then ran it through Alphalens. This looks like it should work.

Loading notebook preview...
Notebook previews are currently unavailable.
3 responses

Hey, have you tried running an out of sample test on a different time period? This type of analysis is pretty interesting, but I'm wondering if it's driven by a specific hypothesis or more experimenting with different combinations.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

I get an error when I run the code. Any suggestions?

SecurityViolationTraceback (most recent call last)
in ()
1 import alphalens
2
----> 3 alphalens.tears.create_factor_tear_sheet(factor=result['test_alpha'],
4 prices=pricing,
5 groupby=result['Sector'],

/build/src/qexec_repo/qexec/algo/safety.py in getattribute(self, attr) 149 mute_greylist=mute_greylist,
150 module=module,
--> 151 module_wrapper=self,
152 )
153 finally:

/build/src/qexec_repo/qexec/algo/safety.py in check_attribute_access(full_path, whitelist, name_blacklist, caller_fr, module, module_wrapper, msg, mute_greylist) 99 violations=[{'message': strip_qexec_module_path(error_message),
100 'lineno': caller_fr.f_lineno,
--> 101 'extra': extra}])
102
103

SecurityViolation: 0002 Security Violation(s): Insecure attribute access "alphalens.tears.create_factor_tear_sheet" on line 3

Hi Eric, the create_factor_tear_sheet function in Alphalens has been deprecated. Please use get_clean_factor_and_forward_returns instead. You can see an example use of Alphalens in lesson 4 of the getting started tutorial.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.