Equal weight meta portfolio

This MetaClass is for making equal weight portfolio of several alphas.

Import

from finter.modeling.meta_portfolio.equal_weight_portfolio import (
    EqualWeightMetaPortfolio,
)
from finter.framework_model.submission.config import ModelUniverseConfig

Example Code (Class Definition)

Portfolio = EqualWeightMetaPortfolio.create(
    EqualWeightMetaPortfolio.Parameters(
        universe=ModelUniverseConfig.KR_STOCK,
        alpha_list=[
            "krx.krx.stock.ywcho.peter",
            "krx.krx.stock.ywcho.gusty",
        ],
    )
)
  • universe (ModelUniverseConfig): Determines the universe of the portfolio.

  • alpha_list (list): Contains the list of models to be used for portfolio creation.

Method

  • get(start: int, end: int) : Generate positions within the created portfolio from YYYYmmdd(start) to YYYYmmdd(end).

  • submit(model_name : str) : Submits the model with the specified name.

  • get_source_code( ) : view source code of submitted or submitting model.

Last updated