Getting Started

GS Quant is a Python toolkit for quantitative finance, which provides access to derivatives pricing and risk capabilities through the Goldman Sachs developer APIs, as well as standalone packages for financial analytics.

It is created and maintained by quantitative developers (quants) at Goldman Sachs to enable the development of trading strategies and analysis of derivative products. GS Quant can be used to facilitate derivative structuring, trading, and risk management, or as a set of statistical packages for data analytics applications.


  • Python 3.6 to 3.7. Python 3.8 will be supported when external dependencies are upgraded to 3.8 (e.g. numpy, scipy)
  • Access to PIP package manager

You can verify your Python version with the command python --version.

Any Python-ready IDE will work. However, most of our team uses PyCharm.


pip install gs-quant

Run this from a terminal (mac), command prompt (windows), or shell (linux)



Goldman Sachs users can use the following to enable SSO.

pip install gs-quant[internal]         # If using Anaconda or a virtual environment
pip install gs-quant[internal] --user  # Otherwise

Use GS Quant

The following is a simple example which generates a random timeseries and computes 1-month (22 day) rolling realized volatility:

import gs_quant.timeseries as ts
from gs_quant.timeseries import Window

x = ts.generate_series(1000)           # Generate random timeseries with 1000 observations
vol = ts.volatility(x, Window(22, 0))  # Compute realized volatility using a window of 22 and a ramp up value of 0
vol.tail()                             # Show last few values
2021-12-20 12.898025
2021-12-21 12.927230
2021-12-22 12.929520
2021-12-23 13.987033
2021-12-24 14.048165
dtype: float64

Congratulations! You are up and running with gs-quant.

Learn More

Please refer to our Tutorials to learn about how GS Quant works and what you can do with it.


Development of GS Quant is on GitHub. Contributions are encouraged! Please see the Contribution section for more details.


If you need any help or have feedback, please email us at