Hi QC community,
I am new to QC and trying to do develop my algo here. The first question I am having now is how to set/restrict the universe from a list of stock symbols from an extenal file. For example:
CSV (external file):
date,symbol
2015/10/01,AAPL
2015/10/02,MSFT
What I want is on 2015/10/01, the algo knows it can only trade AAPL and on 2015/10/02, both AAPL and MSFT can be traded by the algo.
thanks a lot!
Alexandre Catarino
What you are looking for is what we call "Custom Universe Selection".
Here is a thread where we discuss it:
In Michael's example, remote files are stored in Dropbox. Since they have changed their policy for public folder, there could be an issue. Fortunatelly, the algorithm runs sucessfully.
QQQ VVV
Hi Alexandre Catarino
Thanks for the response. I was wondering if Dropbox is the only option here. Can I use Google Drive? Thanks!
Alexandre Catarino
We can use any hosting service as long as you can use System.Net.WebClient to fetch the data.
QQQ VVV
Alexandre Catarino The System.Net link is broken... 403 Forbidden
Alexandre Catarino
Sorry, it shouldn't be a link, but here is the link to WebClient class: WebClient Class.
QQQ VVV
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 QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect 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. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!