The Algorithm Lab is now more powerful than ever. We have added baked-in features to promote best practices in hypothesis design and enable more intuitive algorithm development. The layout changes, along with what they mean for your development process, are outlined below.
"Create New Algorithm"
The options to "Create Framework Algorithm" and "Create Classic Algorithm" have been replaced with "Create New Algorithm." This represents a back-end change where the two classes were combined to form a single class containing all of their old methods. Any algorithms you built previously will still function, and any that you build in the future will inherit both the modularity of Framework algorithms and the familiarity of Classic algorithms.
Importantly, this means all algorithms will now be eligible for submission via Alpha Streams. The Update() method is still the recommended way to emit insights as it gives you more control, but it is no longer necessary.
Streamlining Development with Modules
You will be met with an updated initialization screen upon creating a new algorithm. This screen contains example modules for the five components that comprise every strategy:
- Alpha: the specific cause
- Universe: the set of assets where the effect occurs
- Portfolio Construction: the proportion of the portfolio allocated to each asset
- Execution: how orders are filled
- Risk Management: parameters for mitigating risk
Modules are boilerplate code to handle these components of your strategy automatically. Alpha modules will be added frequently as we continue to update our data sources.
Modules can be used as placeholders for parts of a strategy that are outside your scope of interest. For example, many retail traders do not need to worry about execution, as their orders create little market impact. Similarly, they may not require sophisticated portfolios or risk management. By passing in standard modules for those components, more effort can be focused on the causal relationship between the data and asset class. This is especially useful for building algorithms to submit to Alpha Streams, which only require accounting for Alpha and Universe.
Integrated Hypothesis Design
The text beneath the code preview will automatically refresh as you select modules. The description should be read as: "__A__ leads to, or causes, a change in __B__," which will be the guiding hypothesis for your algorithm moving forward.
We believe hypothesis-driven development is incredibly important because it defines the core relationship that your algorithm will use to predict the market. Writing code within a more disciplined scope is a more scientific approach to algorithm development that will help you better isolate fundamental causes of price movement.
Happy Coding!
Alex Otsu
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!