from datetime import date
from gs_quant.markets.position_set import Position, PositionSet
from gs_quant.session import Environment, GsSession
client = 'CLIENT ID'
secret = 'CLIENT SECRET'
GsSession.use(Environment.PROD, client_id=client, client_secret=secret, scopes=('read_product_data',))
position_set = PositionSet([Position(identifier='MSFT UW', quantity=200)])
position_set.positions += Position(identifier='AAPL UW', weight=800) # can alternatively specify 'quantity' instead of 'weight'
position_set.resolve()