Hi,
on the cloud in the Research you can use the class QuantBook.
Beside Notebooks you can also create a plain Python file, I am wondering if it is possible to use the class QuantBook there.
I get the error: NameError: name 'QuantBook' is not defined.
I found a solution for offline development, which does not work in the cloud:
Mia Alissi
The
QuantBook
class is specifically designed for use within the Research Environment on QuantConnect, which is typically accessed through Jupyter Notebooks. This environment allows for interactive data analysis and visualization, making it ideal for hypothesis testing and exploratory data analysis before implementing strategies in backtests or live trading.If you attempt to use
QuantBook
in a plain Python file on the QuantConnect cloud platform, you will encounter the errorNameError: name 'QuantBook' is not defined
. This is becauseQuantBook
is not available outside of the Research Environment. It is intended for use in Jupyter Notebooks where you can leverage its capabilities to access data and perform research tasks interactively.To work with
QuantBook
, you should create and use Jupyter Notebooks in the Research Environment. If you need to perform similar tasks in a plain Python file, you would typically use theQCAlgorithm
class and its methods within the context of a backtest or live trading algorithm, rather than usingQuantBook
.Sources: Getting Started - QuantConnect.com, Getting Started - QuantConnect.com, Research Engine - QuantConnect.com, Getting Started - QuantConnect.com, Head & Shoulders TA Pattern Detection
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.
Fari Tigar
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!