{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Creating a Custom Basket\n", "\n", "Welcome to the basket creation tutorial! Marquee allows you to create your own tradable basket ticker and manage it through the platform. When you create a basket it automatically gets published to Marquee, and you may also publish it to Bloomberg, Reuters, and Factset. This basket will tick live.\n", "\n", "Creating a basket requires enhanced levels of permissioning. If you are not yet permissioned to create baskets please reach out to your sales coverage or to the [Marquee sales team](mailto:gs-marquee-sales@gs.com)." ] }, { "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": [ "import pandas as pd\n", "\n", "from datetime import date\n", "from gs_quant.markets.baskets import Basket\n", "from gs_quant.markets.indices_utils import ReturnType\n", "from gs_quant.markets.position_set import Position, PositionSet\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: Define your basket metadata, publishing options, pricing options, & return type\n", "\n", "In this step you are going to define all the specifications needed to create your basket. First, instantiate an empty basket object and then you may begin defining it's settings. The below list contains all the parameters you may set.\n", "\n", "| Parameter Name | Required? | Default Value | Description |\n", "|:-------------------|:-----------|:--------------|:------------|\n", "|name |**Required**|-- |Display name of the basket|\n", "|ticker |**Required**|-- |Associated 8-character basket identifier (must be prefixed with \"GS\" in order to publish to Bloomberg). If you would like to request a custom prefix instead of using the default GSMB prefix please reach out to the [baskets team](mailto:gs-marquee-baskets@gs.com)|\n", "|currency |**Required**|-- |Denomination you want your basket to tick in. This can not be changed once your basket has been created|\n", "|return_type |**Required**|-- |Determines the index calculation methodology with respect to dividend reinvestment. One of Price Return, Gross Return, Total Return|\n", "|position_set |**Required**|-- |Information of constituents associated with the basket. You may provide the weight or quantity for each position. If neither is provided we will distribute the total weight evenly among each position. Please also note that any fractional shares will be rounded up to whole numbers.|\n", "|cash_reinvestment_treatment|Optional|Reinvest At Open|How to treat cash acquisitions, regular dividends, and special dividends for basket underliers.|\n", "|description |Optional |-- |Free text description of basket. Description provided will be indexed in the search service for free text relevance match.|\n", "|divisor |Optional |-- |Divisor to be applied to the overall position set. You need not set this unless you want to change the divisor to a specific number, which will in turn change the basket price (current notional/divisor). This might impact price continuity.|\n", "|initial_price |Optional |100 |Initial price the basket should start ticking at|\n", "|target_notional |Optional |10,000,000 |Target notional for the position set|\n", "|publish_to_bloomberg|Optional |True |If you'd like us to publish your basket to Bloomberg|\n", "|publish_to_reuters |Optional |False |If you'd like us to publish your basket to Reuters |\n", "|publish_to_factset |Optional |False |If you'd like us to publish your basket to Factset |\n", "|historical_methodology|Optional |Backcast |Preferred methodology to be applied when publishing basket history.