I don't want to do this by loop every time, but when I look at the Git repository it seems that _list is strictly private and not exposed...
I don't want to do this by loop every time, but when I look at the Git repository it seems that _list is strictly private and not exposed...
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.
Hi Pfchang,
What are you trying to do with the entire list? Rolling Window inherits from IReadOnlyWindow interface, therefore you could use methods listed there. If you are trying to simple calculations like finding the average of the entire Rolling Window, please see my attached backtest. You might find some more information here.
Please let us know if you have further questions!
Hi Link thank you. What I am trying to achieve is that whenever new data comes in, I would like to make use of the updated RollingWindow object to re-do some computation that involves re-sorting the whole array.
Actually taking a step back, do you think it would be more appropriate to write an indicator class for this computation?
Hi Pfchang,
Instead of looping over the RollingWindow object, you can also use `list()` method over the RollingWindow object to retrieve the data you need. Please see my attached backtest for implementation details. Please let me know if you have any other questions, or would like to share more information on your strategy so that we could address your issue in detail.
Xin
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!