Back to Community
can my strategy read a .csv or equivalent that I upload?

and if so, how often can I update that .csv (which might, for example define buy/sell triggers trained on an off-quantopian ML algo) and is it allowed for me to automate this process?

3 responses

Hi Ben,

A strategy in Algorithms can certainly read a .csv file of day-level frequency before simulation by using fetch_csv to parse the data into a pandas dataframe. This dataframe and other methods used to modify it will be passed into handle_data (or anywhere the data variable is available) before the simulation. There is no way to automatically update a .csv file itself.
Feel free to read more about this function here and let me know if I can help with anything else.

Best,
Robert

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.

my apologies, I mean during live or contest trading. I use theano and other ML libraries that aren't supported by Quantopian, but I could form a proxy for my strategies if I could, for example : use my private backtesting to tune a daily ML model to buy/sell triggers recorded as a .csv, and upload that tuned trigger sheet daily.

We don't currently support that for the contest - we don't have a good way to maintain the out-of-sample, point-in-time of your CSV file.

However, it is still eligible to receive an allocation. Write the algorithm, keep maintaining the data source, and in 6 months we will evaluate the algorithm's results.

One thing to keep in mind that is often a problem is that fetch_csv()requires you to maintain the entire history in your CSV file. You can't just dump the data at the end of every day and make a new file. It only works if append the new data each day to an existing file.

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.