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 onwards. (Support for python 3.6 will end at some point in the near future)
- Access to PIP package manager
You can verify your Python version with the command
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.
# Internal usage only pip install gs-quant[internal] # If using Anaconda or a virtual environment pip install gs-quant[internal] --user # Otherwise
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
Out: 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.
If you need any help or have feedback, please email us at email@example.com.
Was this page useful?
Give feedback to help us improve developer.gs.com and serve you better.