Last updated
Last updated
Here, necessary libraries are imported for the operation of the portfolio model.
A list of alphas for the portfolio is defined. These alphas are specific financial models or strategies to be used within the portfolio. alpha_list
replaces the functionality of the deprecated alpha_set
.
A Portfolio
class is defined, inheriting from BasePortfolio
. It includes methods for loading alpha positions for a given period and fetching alpha positions to construct the portfolio.
The portfolio is initialized, and data for a specified period is fetched.
Constraints of portfolio
Create a portfolio by combining alphas created by yourself or others