menu
Contribute

Getting Started

info

Note

Goldman Sachs employees should follow this guide instead.

Prerequisites

Configuring a Working Copy of GS Quant

You will need to have the project running locally:

  1. Visit our GitHub Repo and press the "fork" button. By doing so, a copy of the project will be created in your own GitHub repository.

  2. Clone the repository. Find the "Clone or Download" button and copy the SSH URL to clone the repository locally. e.g.:

    git clone git@github.com:YOUR_GITHUB_USERNAME/gs-quant.git
  3. Change into the project directory

    cd gs-quant
  4. Setup a new remote that points to the original project so you can receive any new changes and merge them to your local project. First, go to the GS Quant GitHub Repo and copy the SSH URL. Then add the remote upstream:

    git remote add upstream

    By now you will have two remotes for GS Quant.

    • origin which points to the forked project in your GitHub account, you have read and write access to this project.
    • upstream which points to the main GS Quant project. You only have read access to the main project.

Running the Project

Now that you have a local version of the project, you can open it in your preferred Python IDE. Then, you should:

  1. Create a virtual environment
  2. Activate your environment
  3. Install the project in develop mode. Make sure you are at the root of the project and then:
    pip install -e .[develop]
  4. Run some code:

from gs_quant.timeseries import volatility, generate_series

# calculate vol for a time series
series = generate_series(100)
vol = volatility(series, 22)
  1. (optional) Test API access by replacing CLIENT_ID and CLIENT_SECRET with your own Marquee app ID and secret:
import datetime
from gs_quant.data import Dataset
from gs_quant.session import Environment, GsSession


with GsSession.get(Environment.PROD, < client_id >, < client_secret >, scopes=('read_product_data', 'run_analytics')):
    weather = Dataset('WEATHER')
    df = weather.get_data(datetime.date(2016, 1, 15), datetime.date(2016, 1, 16), city=['Boston', 'Austin'])

Contribute

Please follow the guidelines on how to contribute found at the root of the project in the CONTRIBUTING.MD file.


This site is for informational purposes only and does not constitute an offer to sell, or the solicitation of an offer to buy, any security. The Goldman Sachs Marquee® platform is for institutional and professional clients only. Some of the services and products described on this site may not be available in certain jurisdictions or to certain types of client. Please contact your Goldman Sachs sales representative with any questions. Nothing on this site constitutes an offer, or an invitation to make an offer from Goldman Sachs to purchase or sell a product. This site is given for purely indicative purposes and does not create any contractual relationship between you and Goldman Sachs. Any market information contained on the site (including but not limited to pricing levels) is based on data available to Goldman Sachs at a given moment and may change from time to time. There is no representation that any transaction can or could have been effected on such terms or at such prices. Please see https://www.goldmansachs.com/disclaimer/sec-div-disclaimers-for-electronic-comms.html for additional information. © 2023 Goldman Sachs. All rights reserved.
Transaction Banking services are offered by Goldman Sachs Bank USA (“GS Bank”). GS Bank is a New York State chartered bank, a member of the Federal Reserve System and a Member FDIC. © 2023 Goldman Sachs. All rights reserved.
Not all products and functionality mentioned on this website are currently available through our API platform.
All loans and deposit products are provided by Goldman Sachs Bank USA, Salt Lake City Branch. Member FDIC.
Brokerage and investment advisory services offered by our investment products are provided by Goldman Sachs & Co. LLC (`‘GS&CO.`’), which is an SEC registered broker-dealer and investment adviser, and member FINRA/SIPC. Research our firm at FINRA's BrokerCheck. Custody and clearing services are provided by Apex Clearing Corporation, a registered broker-dealer and member FINRA/SIPC. Please consider your objectives before investing. A diversified portfolio does not ensure a profit or protect against a loss. Past performance does not guarantee future results. Investment outcomes and projections are forward-looking statements and hypothetical in nature. Neither this website nor any of its contents shall constitute an offer, solicitation, or advice to buy or sell securities in any jurisdictions where GS&Co. is not registered. Any information provided prior to opening an investment account is on the basis that it will not constitute investment advice and that GS&Co. is not a fiduciary to any person by reason of providing such information. For more information about our investment offerings, visit our Full Disclosures.
Investment products are: NOT FDIC INSURED ∙ NOT A DEPOSIT OR OTHER OBLIGATION OF, OR GUARANTEED BY, GOLDMAN SACHS BANK USA ∙ SUBJECT TO INVESTMENT RISKS, INCLUDING POSSIBLE LOSS OF THE PRINCIPAL AMOUNT INVESTED