Hey hey hey!
Late last night we launched our newest feature: Universe selection. This allows the algorithm to define the universe of symbols it would like to receive data for by specifying a function that returns the symbols! QuantConnect currently provides what we call 'coarse' universe selection data. This is an aggregate of daily that includes the daily close, daily volume, and the dollar volume (daily close * EMA30(volume)).
You can add coarse universe selection criteria by using the AddUniverse method. Here's an example of adding a coarse universe selection that takes all symbols with a daily dollar volume of over $1 billion:// in Initialize()
const decimal OneBillion = 1000m*1000m*1000m;
AddUniverse(coarse =>
{
return from c in coarse
where c.DollarVolume >= OneBillion
select c.Symbol;
});
What this code means is that we want to filter the complete unverse of US equity symbols by selecting all symbols with a DollarVolume >= OneBillion! We'll automatically handle pumping the right data for your selected symbols in your OnData method. Also, we won't remove securities that have open orders or positions.
Have a peek at the attached demo coarse universe algorithm example. We welcome feedback and questions!
Travis Teichelmann
Micheal - I made a few changes to the example to parse price and use WSJ's composite market data. I tried running my own version and the one that you made but neither work. That's pretty cool how you generated that spreadsheet. I was wondering where you got it from.
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.
Travis Teichelmann
Update! I redact my previous question about backtesting live data since it doesn't make sense. Lol What I meant was that I wanted to pull in data directly from a site at runtime without having to make the algorithm go live. I found a page scraper extension on the chrome web store to generate csv files. Here's a guess at how to add a price filter
if(line.StartsWith(@"3.69")) { //return price }
Still working on that part I got the algorithm to pull in data from today and what you see below is actually the algorithm buying UNT on January 6th 2015 which is today's current highest gainer.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.
Tadas Talaikis
Hi, guys. One question. How can I update witth custom data, for example Open:
where _vars.UpdateSkew(cf.EndTime, cf.Price)
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.
Tadas Talaikis
Figured cusytom updates out. Anotehr one. What is the best way to close symbols not based on SecurityChanges, but defining specific ("where"?) rules?
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.
Zhang Dong
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.
Quant Trader
Hi,
I want to simulate and use the same data as in Quantopian and given by the author or articles/ research papers. For this reason a SP500 selection is often used. The definition is:
When is this to be added to the selection? Selecting on volume and dollarvolume is not the same as above.
J.
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.
Travis Teichelmann
Micheal - I made a few changes to the example to parse price and use WSJ's composite market data. I tried running my own version and the one that you made but neither work. That's pretty cool how you generated that spreadsheet. I was wondering where you got it from.
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.
Travis Teichelmann
Update! I redact my previous question about backtesting live data since it doesn't make sense. Lol What I meant was that I wanted to pull in data directly from a site at runtime without having to make the algorithm go live. I found a page scraper extension on the chrome web store to generate csv files. Here's a guess at how to add a price filter
if(line.StartsWith(@"3.69")) { //return price }
Still working on that part I got the algorithm to pull in data from today and what you see below is actually the algorithm buying UNT on January 6th 2015 which is today's current highest gainer.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.
Tadas Talaikis
Hi, guys. One question. How can I update witth custom data, for example Open:
where _vars.UpdateSkew(cf.EndTime, cf.Price)
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.
Tadas Talaikis
Figured cusytom updates out. Anotehr one. What is the best way to close symbols not based on SecurityChanges, but defining specific ("where"?) rules?
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.
Zhang Dong
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.
Quant Trader
Hi,
I want to simulate and use the same data as in Quantopian and given by the author or articles/ research papers. For this reason a SP500 selection is often used. The definition is:
When is this to be added to the selection? Selecting on volume and dollarvolume is not the same as above.
J.
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.
Travis Teichelmann
Micheal - I made a few changes to the example to parse price and use WSJ's composite market data. I tried running my own version and the one that you made but neither work. That's pretty cool how you generated that spreadsheet. I was wondering where you got it from.
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.
Travis Teichelmann
Update! I redact my previous question about backtesting live data since it doesn't make sense. Lol What I meant was that I wanted to pull in data directly from a site at runtime without having to make the algorithm go live. I found a page scraper extension on the chrome web store to generate csv files. Here's a guess at how to add a price filter
if(line.StartsWith(@"3.69")) { //return price }
Still working on that part I got the algorithm to pull in data from today and what you see below is actually the algorithm buying UNT on January 6th 2015 which is today's current highest gainer.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.
Tadas Talaikis
Hi, guys. One question. How can I update witth custom data, for example Open:
where _vars.UpdateSkew(cf.EndTime, cf.Price)
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.
Tadas Talaikis
Figured cusytom updates out. Anotehr one. What is the best way to close symbols not based on SecurityChanges, but defining specific ("where"?) rules?
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.
Zhang Dong
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.
Quant Trader
Hi,
I want to simulate and use the same data as in Quantopian and given by the author or articles/ research papers. For this reason a SP500 selection is often used. The definition is:
When is this to be added to the selection? Selecting on volume and dollarvolume is not the same as above.
J.
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!