PortfolioAllocation

PortfolioAllocation: Allocates capital into assets based on signal-derived ratios and current unit prices. Solves A·x = b where A is the diagonal price matrix, x is the asset count vector, and b is total asset value vector.

PortfolioAllocation
(
const string[] assets_IN
,,,
double equity_IN
)

Parameters

assets_IN string[]

List of asset names (used for logging).

asset_ratios_IN Matrix

Relative weights for each asset (from signal model).

asset_prices_unit_IN Matrix

Unit prices of assets.

equity_IN double

Total capital to allocate.

Return Value

Type: Matrix

Matrix: Vector of number of units to purchase per asset.