qis.compute_lookthrough_exposures¶
- qis.compute_lookthrough_exposures(weights, group_loadings=None, *, group_data=None, lookthrough_matrix=None)[source]¶
Split weights or contributions using explicit fractions and ordinary labels.
- Parameters:
weights (DataFrame) – Date-by-instrument weights or arithmetic return contributions. Missing cells mean inactive positions and are treated as zero.
group_loadings (DataFrame | None) – Legacy alias for a complete lookthrough_matrix; cannot be combined with lookthrough_matrix. Prefer the latter in new callers.
group_data (Series | None) – Ordinary Series labels for rows omitted from the matrix.
lookthrough_matrix (DataFrame | None) – Optional static nonnegative row-sum-one overrides.
- Returns:
Date-by-sleeve exposures retaining input row sums and dates.
- Raises:
ValueError – For invalid mappings, conflicting aliases or infinite inputs.
TypeError – If group_data is not a Series.
- Return type: