I am working on developing an alpha that using hourly and daily resolution. Does the university resolution need set to minute resolution for alphas? Is there an issues deploying an algorithm live with an hourly resolution?
QUANTCONNECT COMMUNITY
I am working on developing an alpha that using hourly and daily resolution. Does the university resolution need set to minute resolution for alphas? Is there an issues deploying an algorithm live with an hourly resolution?
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.
Louis Szeto
Hi Keith
My experience is Yes you need to do it in minute resolution or less.
The problem will be if you're using OnData to receive slice data, instead of hourly-wise, you receive slice and do everything in the function in every minute receiving slice. My advice is to not use OnData and do schedule event every hour. You can keep calling hourly history dataframe. Or if you're using rolling window, do consolidation and check if consolidated bar is ready in OnData .
Also you might experience different execution price as ask-bid data is only available in minute resolution or lower. So the slippage you experience will be higher in minute resolution. One solution is to use SpreadExecutionModel() as your execution model.
Hope this helps
Cheers
Louis
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.
Keith Forward
Hi Louis,
Thank you for your help. Unfortunately, I am running into a new issue. When I run my algo at a houly resolution, it usually takes about 10 hrs for 5 a year backtest. Now on on minute resolution, it looks like the 5 year backtest stalls after 16 hours or so. The main difference is I included the size a rolling window from 8 to 390 (hour bars in day to minute bars in a day). I believe this issue is associated with the allocation of memory per backtest. Is there a way to see what memory is be used during the backtest or a way to include the allotment of memory per backtest?
Thank you,
Keith
Louis Szeto
Hi Keith
Sorry that without the code I cannot help with that further more, but it seems to me 10 hours for 5 years data in hourly resolution will be way too long. It would not be possible for alpha deployment for live streaming even if your algo met basic requirements, since you will never finish your data processing before the next slice data come. Usually it is possible to speed it up when you get to know more on programming in QC like progression of myself. Try to consult support if your plan have any or book a community tutor to help with your code :).
As for memory allocation, it probably won’t help as the memory will only be enough or not enough, but faster CPU do helps, yet live deployment like alpha would only support single core CPU for now. BTW the realtime memory usage shall always be visible during your backtest.
Hope this could give an insight to you.
Cheers
Louis
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.
Louis Szeto
Hi Keith
Again without the code it‘s hard to help. Most common cases are eventually it would end up consuming all your memory if you have a leak. Usually python stuck by dataframe as it wound not destruct itself to free memory. Try to stop calling too much of dataframe methods and use gc collect. Also use numba or jax library wherever it is possible in pure numeric dataframe operation. Use numpy array to replace dataframe as much as possible.
Cheers
Louis
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.
Keith Forward
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!