Back to Community
Storing Custom Factors

Is there a way of storing a number of custom pipeline factors for later analysis in Alphalens? This would be very helpful if you had a set of very computationally intensive custom factors that you wanted to store and then combine in some fashion and analyze later.
Thanks for any suggestions .......

2 responses

@Eric There currently isn't a way to permanently store the output of a pipeline, or any data for that matter, within the research (ie jupyter notebook) environment. However, all the data is stored as long as a notebook is not shutdown. The data will be there when it's re-opened. Simply closing a notebook window doesn't shutdown a notebook. One needs to manually 'shutdown' a notebook. Note however, that open notebooks are periodically shutdown by our system when there is an update. Therefore, such storage is not permanent. To refresh the data simply re-run the notebook.

Could you elaborate the 'use case' you're considering? How long would you like to store the data for? Are you looking to import it into another notebook? Would it be ok to just have it available in the original notebook? Additionally, I assume it's the research environment and it's the output data you want to store.

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.

Thanks for getting back to me. My 'use case' is that I have some written up a couple of pipeline factors, some of which can take a long time to run. It would save a considerable amount of time, personal and computer, if I could store the factor for later, more in-depth analysis, combining them in different ways, backtesting them in a portfolio simulation, regime anaylsis., etc.

Yes, I would like to store the output for importation into another notebook all in the research environment. Would it be feasible to download all of the pipeline factors in an encrypted file that only Quantopian could read, in order to protect your data? Then one would upload the workspace back up to Quantopian. The ideal would be that you would then be at the point in the research process where you have completed running 'run_pipeline_chunks()', 'get_asset_pricing()', and set your indices.

I am a newbie at python although I do have reasonable quant chops. If you want you can check out my bonafides on Linkedin. I do have one quick question. I haven't been able to figure to get from pipeline to backtester yet? And where do I find the backtest number? Thanks again Dan.

Best Eric