Back

Coarse Universe Changes - Dollar Volume

Hey QC community,

We are changing how we calculate coarse universe dollar volume. Before - we have been providing a 30 day EMA average of the dollar volume. We are now changing this to a raw daily dollar volume. The new dollar volume field will be calculated as: (daily volume) * (closing price).

We are doing this because different users are asking for different periods of rolling average dollar volumes. The easiest way for us to accommodate everyone is to provide the raw daily dollar volumes and have users calculate the dollar volume window they want in code.

This change will be live today.

- Andrew

Update Backtest








0

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.


https://github.com/QuantConnect/Lean/pull/1178
0

Would it be possible to give an example of how one would use the new method to calculate a moving average of dollar volume? Would this moving average dollar volume look back into the previous periods?

Say the backtest started on 1/1/17, the universe selects SPY, could it get the accurate 30 day moving average dollar volume starting on day one or would it need to collect data from SPY for 30 days?

0

I second that question... Can we have an example (Ideally in Python) to calculate a window ? Thanks !

0

Stephane b, the EmaCrossUniverseSelectionAlgorithm is a good example. We just need to use the dollar volume value,  instead of price, to update the indicators:

avg.update(cf.EndTime, cf.DollarVolume)

Unfortunately, LukeI, we need to collect data from the previous x days to warm up the indicator. We can do it with the historical data request. I would advise you to pre-select the symbols. For example:

  1. Select the 200 securities with the highest DollarVolume;
  2. Make history request and warm up the x days moving average;
  3. Select the 100 securities with the highest moving average of DollarVolume.
0

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.


Update Backtest





0

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.


Loading...

This discussion is closed