Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Quantopian Newbie Question Back testing using user prepared CSV files

I have a few algos I want to backtest. One uses fundamental data, to produce a list of stocks to purchase every quarter. My plan is to use a momentum algo to identify entry and exit points for these stocks throughout each quarter. Based on what I have read so far, the Quantopian IDE currently does not have the capabilities needed to run my stock selection algo. Can I load my list of stocks up to the working folder every quarter and have my momentum algo run against my list of stocks?

Here is a brief description of my stock selection algo: It is a Random Forest algo that runs against roughly 1000 time lagged features to find those features where there is the most information gain (using the Feature Important function). Then those top features are run against a current universe of about 2000 stocks with a market cap > .5B and < 5B. I think this would be too many stocks and too many features to run in the Quantopian enviroment.

Any advice would be greatly appreciated. Thank you, David K

4 responses

Is your csv contains the stocks that will be buy for your algo base on the criterion set?
May be you can shows the csv file

Hi Jason Thanks for getting back to me. I think I figured it out by looking at the fetch function code examples. My CSV file could be just two columns-- the ticker and the quarter start date. My Quantopian algo would just key into the quarter start date. Going forward, if I wanted to do more than backtest, I would just append new tickers and dates to my file. If this wont work, maybe someone could let me know. I will try it anyway just to get myself up to speed on the Quantopian platform.
Thanks again Jason
PS I am going to start another thread about Random Forest and attach an example of my dataset and the datasource.

Yup, fetch function will do. I am thinking if fetch function to load the csv that contains just the stocks alone will work?
example:
AAPL,
IBM,
MSFT

Hey Jason, I attempted to put a CSV file which is in a ML format (with labels and features) up on the community posts. I guess that can't be done? Only notebooks and backtesting can go on the posts? I wanted to put it there to ask if anyone was using FED data. My guess is it can't be done.