Skip to content

models

mainsequence.virtualfundbuilder.models

AssetMixinOverwrite

Bases: VFBConfigBaseModel

The Asset for evaluating the portfolio.

Attributes: symbol (str): The symbol of the asset. execution_venue_symbol (ExecutionVenueNames): The execution venue where the asset traded. Needs to match with asset universe.

AssetsConfiguration

Bases: VFBConfigBaseModel

Configuration for assets included in a portfolio.

Attributes: assets_category_unique_id (str): Unique Identifier of assets category price_type (PriceTypeNames): Type of price used for backtesting. prices_configuration (PricesConfiguration): Configuration for price data handling.

BacktestingWeightsConfig

Bases: VFBConfigBaseModel

Configuration for backtesting weights.

Attributes: rebalance_strategy_name (str): Strategy used for rebalancing. rebalance_strategy_configuration (Dict): Placeholder dict for the rebalance strategy configuration. signal_weights_name (str): Type of signal weights strategy. signal_weights_configuration (Dict): Placeholder dict for the signal weights configuration.

MarketsTimeSeries

Bases: VFBConfigBaseModel

MarketsTimeSeries based on their unique id. Used as the data sources for the prices. Values include alpaca_1d_bars, binance_1d_bars etc.

Attributes: unique_identifier (str): Identfier of the MarketsTimeSeries.

PortfolioBuildConfiguration

Bases: VFBConfigBaseModel

Main class for configuring and building a portfolio.

This class defines the configuration parameters needed for building a portfolio, including asset configurations, backtesting weights, and execution parameters.

Attributes: assets_configuration (AssetsConfiguration): Configuration details for assets. portfolio_prices_frequency (str): Frequency to upsample portoflio. Optional. backtesting_weights_configuration (BacktestingWeightsConfig): Weights configuration used for backtesting. execution_configuration (PortfolioExecutionConfiguration): Execution settings for the portfolio. valuation_asset (AssetMixin): The Asset for evaluating the portfolio.

PortfolioConfiguration

Bases: VFBConfigBaseModel

Configuration for a complete portfolio, including build configuration,
TDAG updates, and VAM settings.

This class aggregates different configurations required for the
management and operation of a portfolio.

Attributes: portfolio_build_configuration (PortfolioBuildConfiguration): Configuration for building the portfolio. portfolio_markets_configuration (PortfolioMarketsConfig): VAM execution configuration.

PortfolioExecutionConfiguration

Bases: VFBConfigBaseModel

Configuration for portfolio execution.

Attributes: commission_fee (float): Commission fee percentage.

PortfolioMarketsConfig

Bases: VFBConfigBaseModel

Configuration for Virtual Asset Management (VAM) portfolio.

Attributes: portfolio_name (str): Name of the portfolio. execution_configuration (VAMExecutionConfiguration): Execution configuration for VAM.

PricesConfiguration

Bases: VFBConfigBaseModel

Configuration for price data handling in a portfolio.

Attributes: bar_frequency_id (str): The frequency of price bars. upsample_frequency_id (str): Frequency to upsample intraday data to. intraday_bar_interpolation_rule (str): Rule for interpolating missing intraday bars. is_live (bool): Boolean flag indicating if the price feed is live. markets_time_series List[MarketsTimeSeries]: The list of markets time series.