Output of "Time.Multiply(Extensions.ToTimeSpan(Resolution.Daily), 0.25)"?

Back

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

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.


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

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.


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.

0

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

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