pub struct Portfolio<DateTime, BidderId: Eq, PortfolioId: Eq + Hash, DemandId: Eq + Hash, ProductId: Eq + Hash, AppData> {
pub id: PortfolioId,
pub as_of: DateTime,
pub app_data: AppData,
pub bidder_id: BidderId,
pub demand_group: Map<DemandId>,
pub product_group: Map<ProductId>,
}Expand description
Represents a portfolio entity in the flow trading system.
A portfolio acts as a container that groups together related demands and products for a specific bidder. It enables:
- Aggregation of multiple demands into a single trading entity
- Association of demands with specific products they can trade
- Weighted distribution of allocations across demands
§Relationships
- Bidder: Each portfolio is owned by exactly one bidder
- Demands: Multiple demands can be associated to a portfolio, each with individual weights
- Products: Multiple products can be associated to a portfolio, each with individual weights
Fields§
§id: PortfolioIdUnique identifier for this portfolio instance. Generated by the application when creating a new portfolio.
as_of: DateTimeTimestamp when this version of the portfolio was created or last updated. Used for temporal queries and history tracking.
app_data: AppDataApplication-specific data attached to this portfolio. This field allows extending the portfolio with custom data without modifying the core schema.
bidder_id: BidderIdThe bidder who owns this portfolio. A bidder can have multiple portfolios to organize different trading strategies.
demand_group: Map<DemandId>Map of demands associated with this portfolio and their weights.
product_group: Map<ProductId>Map of products this portfolio can trade and their weights.