Fixed weight meta portfolio

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

Import

from finter.modeling.meta_portfolio.fixed_weight_portfolio import (
    FixedWeightMetaPortfolio,
)
from finter.framework_model.submission.config import ModelUniverseConfig

Example Code (Class Definition)

Portfolio = FixedWeightMetaPortfolio.create(
    FixedWeightMetaPortfolio.Parameters(
        universe=ModelUniverseConfig.KR_STOCK,
        alpha_list=[
            "krx.krx.stock.ywcho.peter",
            "krx.krx.stock.ywcho.gusty",
        ],
        weights = {
            "krx.krx.stock.ywcho.peter":0.2,
            "krx.krx.stock.ywcho.gusty":0.8
        }
    )
)
  • universe (ModelUniverseConfig): Determines the universe of the portfolio.

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

  • weights (dictionary): Specifies the weights assigned to each model.

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