gs_quant.markets.position_set.PositionSet¶
- class PositionSet(positions, date=datetime.date(2023, 8, 14), divisor=None, reference_notional=None, unresolved_positions=None, unpriced_positions=None)[source]¶
Position Sets hold a collection of positions associated with a particular date
- __init__(positions, date=datetime.date(2023, 8, 14), divisor=None, reference_notional=None, unresolved_positions=None, unpriced_positions=None)[source]¶
Methods
__init__
(positions[, date, divisor, ...])Assigns equal weight to each position in position set
from_dicts
(positions[, date, ...])Create PostionSet instance from a list of position-object-like dictionaries
from_frame
(positions[, date, ...])Create PostionSet instance from a dataframe of positions
from_list
(positions[, date])Create equally-weighted PostionSet instance from a list of identifiers
from_target
(position_set)Create PostionSet instance from PostionSet type defined in target file
Retrieve formatted positions
Retrieve formatted unpriced positions
Retrieve formatted unresolved positions
price
([currency, weighting_strategy])Fetch positions weights from quantities, or vice versa
redistribute_weights
()Redistribute position weights proportionally for a one-sided position set
Remove unpriced positions from your position set
Remove unresolved positions from your position set
resolve
(**kwargs)Resolve any unmapped positions
to_frame
()Retrieve formatted position set
to_target
([common])Returns PostionSet type defined in target file for API payloads
Attributes
date
divisor
positions
reference_notional
unpriced_positions
unresolved_positions