Risk parity meta portfolio
This MetaClass is for making risk parity portfolio of several alphas.
Import
from finter.modeling.metamodel.portfolio.risk_parity_portfolio import (
RiskParityMetaPortfolio,
)
from finter.framework_model.submission.config import ModelUniverseConfig
Example Code (Class Definition)
Portfolio = RiskParityMetaPortfolio.create(
RiskParityMetaPortfolio.Parameters(
universe=ModelUniverseConfig.KR_STOCK,
alpha_list=[
"krx.krx.stock.ywcho.peter",
"krx.krx.stock.ywcho.gusty",
],
risk = "Volatility",
lookback_periods = "6M",
rebalancing_periods = "1M"
)
)
universe (ModelUniverseConfig): Determines the universe of the portfolio.
alpha_list (list): Contains the list of models to be used for portfolio creation.
risk (str): Determines the method to calculate 'risk'.
There are three available options ['Volatility', 'MDD', 'TuW'].
lookback_periods (str): Determines the duration used to calculate historical risk.
There are 3 available options ['3M', '6M', '12M']
rebalancing_periods (str): Determines the duration for rebalancing the portfolio.
There are 3 available options ['1W', '1M', '1Q']
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( ) : Displays the source code of the submitted or submitting model.
Last updated
Was this helpful?