{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Editing a Custom Basket\n", "\n", "Editing a custom basket is very similar to the creation process. You simply fetch your basket, set its properties to match your preferences, and call update! Please note that not all settings are modifiable after creation (see the list of options below). Additionally, if you'd like to adjust your basket's composition or price settings, please refer to the [rebalance tutorial](./Basket%20Rebalance.ipynb) instead." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Step 1: Authenticate & Initialize your session\n", "\n", "First you will import the necessary modules and add your client id and client secret." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from gs_quant.markets.baskets import Basket\n", "from gs_quant.session import Environment, GsSession\n", "\n", "client = 'CLIENT ID'\n", "secret = 'CLIENT SECRET'\n", "\n", "GsSession.use(Environment.PROD, client_id=client, client_secret=secret, scopes=('read_product_data read_user_profile modify_product_data',))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Step 2: Fetch your basket and set your changes\n", "\n", "Next you will fetch the basket you'd like to edit by passing in any of its identifiers such as BloombergId, Cusip, Ticker, etc. If this is a basket you or someone from your organization created, please make sure your application has edit/admin entitlements or you will not be able to modify it. You will then be ready to change any of the properties listed below.\n", "\n", "| Parameter Name |Description |\n", "|:--------------------|:-----------|\n", "|name |Display name of the basket|\n", "|description |Free text description of basket. Description provided will be indexed in the search service for free text relevance match.|\n", "|publish_to_bloomberg |If you'd like us to publish your basket to Bloomberg|\n", "|publish_to_reuters |If you'd like us to publish your basket to Reuters |\n", "|publish_to_factset |If you'd like us to publish your basket to Factset |\n", "|include_price_history|Republish price history based on current composition|\n", "|cash_reinvestment_treatment|How to treat cash acquisitions, regular dividends, and special dividends for basket underliers.|\n", "|historical_methodology|Preferred methodology to be applied when publishing basket history.