This might be a silly question, but since I'm new to Jupyter research engine I was wondering where in documentation can I find plotted line example codes for indicators like variance and such like this one:
QUANTCONNECT COMMUNITY
This might be a silly question, but since I'm new to Jupyter research engine I was wondering where in documentation can I find plotted line example codes for indicators like variance and such like this one:
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.
Mia Alissi
Sure, David, it's not a silly question at all. In the QuantConnect documentation, there are several examples of how to plot indicators like Variance. Here are a few examples in Python:
Plot
method is used to plot the current value of the Variance indicator when it's ready.Source
plot
method is used to plot the indicator values andplt.show()
is used to display the plots.Source
plot
method is used to plot the indicator values andplt.show()
is used to display the plots.Source
I hope this helps! Let me know if you have any other questions.
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.
David L
Thanks Mia, but I'm still unsure of how to get the names for other indicators.
For example in the above Jupyter code, how could I change the variable ‘close’ in the second to last line:
data = history.loc[symbol]['close']
to get a line plot for an indicator variable not listed in the documentation like ‘variance’ or ‘standard deviation’? I just don't know what names they're referenced to and can't seem to find them on the quantconnect website.
Mia Alissi
To plot indicators like Variance or Standard Deviation, you first need to create these indicators and update them with the historical data. The historical data itself does not contain these indicators, they need to be calculated. Here's an example of how you can do this for Variance and Standard Deviation:
In this code, we first create the Variance and Standard Deviation indicators with a period of 20. Then we update these indicators with the close prices from the historical data. Finally, we plot the indicators.
Please note that the Variance and Standard Deviation indicators are not automatically included in the historical data, they need to be calculated separately as shown above.
For more information on how to use indicators in QuantConnect, you can refer to the Indicators documentation.
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.
David L
Thank you!
Mia Alissi
You're welcome, David! If you have any more questions in the future, don't hesitate to ask. Happy coding!
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.
David L
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!