bayesline.api.equity.AsyncOptimizationResult#
- class bayesline.api.equity.AsyncOptimizationResult#
Contains the optimized state of each portfolio in the problem.
Each portfolio is optimized independently against the same objectives and constraints, so every date/portfolio pair carries its own solver status and objective value; one errored or infeasible solve does not affect the others.
- __init__()#
Methods
__init__()Get the prior and optimized factor exposures per date and portfolio.
Get the prior and optimized holdings per date, portfolio and asset.
Get the solver outcome per date and portfolio.
- abstractmethod async get_summary() DataFrame#
Get the solver outcome per date and portfolio.
Solution-carrying rows (
optimal,optimal_inaccurate) report the achieved objective value; other rows report a null objective value.messageholds a human-readable explanation for rows without a solution and is null otherwise.objective_valueis in scaled (gross-nav-relative) units, not dollars or a per-net-nav unit – a multi-term objective would have no single natural unit to convert it to.Returns#
- pl.DataFrame
A dataframe with columns
date,portfolio_id,status(anOptimizationStatusvalue),objective_value, andmessage, one row per optimized date and portfolio.
- abstractmethod async get_holdings() DataFrame#
Get the prior and optimized holdings per date, portfolio and asset.
Only date/portfolio pairs whose status carries a solution (
optimal,optimal_inaccurate) contribute rows.Returns#
- pl.DataFrame
A dataframe with columns
date,portfolio_id,asset_id,old,new, andtrade, all in nav currency (dollars).
- abstractmethod async get_exposures() DataFrame#
Get the prior and optimized factor exposures per date and portfolio.
Only date/portfolio pairs whose status carries a solution (
optimal,optimal_inaccurate) contribute rows.Returns#
- pl.DataFrame
A dataframe with columns
date,portfolio_id,factor,old, andnew, both per unit of net nav. Null for a factor-unconstrained portfolio whose net nav is ~0 (long/short books), where a per-net-nav value is not well-defined.