Base finite allocation
PortfolioOptimisers.FiniteAllocationOptimisationEstimator Type
abstract type FiniteAllocationOptimisationEstimator <: OptimisationEstimatorAbstract supertype for finite allocation portfolio optimisation estimators.
Finite allocation estimators convert continuous portfolio weights into discrete share quantities given an investment budget and asset prices.
Related Types
sourcePortfolioOptimisers.FiniteAllocationOptimisationResult Type
abstract type FiniteAllocationOptimisationResult <: OptimisationResultAbstract supertype for finite allocation optimisation result types.
Related Types
sourcePortfolioOptimisers.FOptE_FOpt Type
const FOptE_FOpt = Union{<:FiniteAllocationOptimisationEstimator,
<:FiniteAllocationOptimisationResult}Alias for a finite allocation optimisation estimator or result.
Matches either a FiniteAllocationOptimisationEstimator or a FiniteAllocationOptimisationResult.
Related
sourcePortfolioOptimisers.setup_alloc_optim Function
setup_alloc_optim(w, p, cash, ...)Set up the data structures needed for finite allocation optimisation.
Separates the portfolio into long and short positions, computes budgets and cash allocations for each side, and returns indices and cash values for downstream allocation routines.
Arguments
w: Portfolio weights vector.p: Asset price vector.cash: Total cash available.Additional parameters for budget configuration.
Returns
- Named tuple or multiple values with allocation setup data.
Related
sourcePortfolioOptimisers.adjust_long_cash Function
adjust_long_cash(bgt, lcash, scash)Adjust the long-side cash allocation based on budget and short-side cash.
Redistributes cash between long and short portfolio sides to satisfy the overall budget constraint.
Arguments
bgt: Portfolio budget (sum of weights target).lcash: Long-side cash allocation.scash: Short-side cash allocation.
Returns
- Adjusted long-side cash.
Related
sourcePortfolioOptimisers.factory Method
factory(res::FiniteAllocationOptimisationResult, fb::Option{<:FOptE_FOpt})Rebuild a finite allocation result with an updated fallback optimiser fb.
Like the continuous-result generic, every finite allocation result carries fb as its last field, so the rebuild copies all fields unchanged except the trailing fb. Concrete result types may override this method when rebuilding requires more than swapping fb.
Related
source