Dear All,
I am studying Quantconnect shared code in Github, and I am stuck in this line.
I searched google and every document of Quantconnect, I could not find any explanation for what this function means.
my question is,
1) What is the output of "Time"
2) Would you please breakdown" Time.Multiply(Extensions.ToTimeSpan(Resolution.Daily), 0.25)" ??
It is so hard to guess for me since Research Jupyter notebook also does not spit any number.
It would be appreciated if someone breakdown this code for me.
Regards,
Juhwan
Derek Melchin
Hi Juhwan,
(1) `Time` returns an instance of the Time class. Checkout our documentation for more information about it.
(2) This statement returns a timedelta object spanning 1/4 of a day, or 6 hours.
If the research environment is not producing any output when executing these lines in a cell, use `print()`.
Best,
Derek Melchin
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.
Juhwan Kim
Derek Melchin,
Thanks for the answer. Also, the community helped me to understand what it means.
"print" does not work. it only shows what kind of object it is. But, "Str" works.
Derek Melchin
Hi Juhwan,
I'm glad the community was able to assist with this issue. The `print` function should work in the research environment to display the timedelta duration. See the attached research notebook for a working solution.
Best,
Derek Melchin
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.
Yaros
Hello, follwing in this discution, did you find any information about it to figure it out? I am getting stuck with same
Any help will be appreciated
Varad Kabade
Hi Yaros,
Both the original issues have been resolved in the thread. Attach a backtest to highlight the issue you are experiencing. Please refer to this updated link for the documentation on the Time class.
Best,
Varad Kabade
Juhwan Kim
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!