menu
Data

Timeseries

GS Quant comes with a timeseries package which provides a number of functions for dealing with analytics of financial timeseries. This is based on the pandas series object to provide extensions which are specific to analyzing asset prices or other observable market data. These functions are used by our strategists to analyze and backtest trading strategies.

Timeseries Modules

Below is an overview of the various timeseries modules within GS Quant. Some are simple wrappers around the equivalent pandas or NumPy function to provide consistent interface and documentation. Many are Goldman Sachs' implementations of useful financial analysis functions which we use to quantify the performance of different strategies.

ModuleDescription
AlgebraBasic numerical and algebraic operations, including addition, division, multiplication and other functions on timeseries
AnalysisFunctions used to analyze properties of timeseries, including lagging, differencing, autocorrelation, co-integration and other related operations
DatetimeDate and time manipulation for timeseries, including date or time shifting, calendar operations, curve alignment and interpolation operations
EconometricsStandard economic and time series analytics operations, including returns, drawdowns, volatility and other numerical operations which are generally finance-oriented
StatisticsBasic statistical operations, including probability and distribution analysis (generally not finance-specific routines)
TechnicalsTechnical analysis functions including moving averages, volatility indicators, and and other numerical operations for analyzing statistical properties of trading activity

Usage

Import timeseries package or individual modules to access functionality:

import gs_quant.timeseries as ts

x = ts.generate_series(1000)           # Generate random timeseries with 1000 observations
vol = ts.volatility(x, 22)             # Compute realized volatility
vol.tail()                             # Show last few values

Output:

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

Contributions

In addition to the standard contribution guidelines for GS Quant, we request that all timeseries function have 100% test coverage and full mathematical documentation using Latex. This helps ensure consumers of these functions can understand the exact mathematical definition and usage semantics.


Related Content


GS DAP® is owned and operated by Goldman Sachs. This site is for informational purposes only and does not constitute an offer to provide, or the solicitation of an offer to provide access to or use of GS DAP®. Any subsequent commitment by Goldman Sachs to provide access to and / or use of GS DAP® would be subject to various conditions, including, amongst others, (i) satisfactory determination and legal review of the structure of any potential product or activity, (ii) receipt of all internal and external approvals (including potentially regulatory approvals); (iii) execution of any relevant documentation in a form satisfactory to Goldman Sachs; and (iv) completion of any relevant system / technology / platform build or adaptation required or desired to support the structure of any potential product or activity. All GS DAP® features may not be available in certain jurisdictions. Not all features of GS DAP® will apply to all use cases. Use of terms (e.g., "account") on GS DAP® are for convenience only and does not imply any regulatory or legal status by such term.
¹ Real-time data can be impacted by planned system maintenance, connectivity or availability issues stemming from related third-party service providers, or other intermittent or unplanned technology issues.
Transaction Banking services are offered by Goldman Sachs Bank USA (“GS Bank”) and its affiliates. GS Bank is a New York State chartered bank, a member of the Federal Reserve System and a Member FDIC. For additional information, please see Bank Regulatory Information.
Certain solutions and Institutional Services described herein are provided via our Marquee platform. The Marquee platform is for institutional and professional clients only. This site is for informational purposes only and does not constitute an offer to provide the Marquee platform services described, nor an offer to sell, or the solicitation of an offer to buy, any security. Some of the services and products described herein may not be available in certain jurisdictions or to certain types of clients. Please contact your Goldman Sachs sales representative with any questions. Any data or market information presented on the site is solely for illustrative purposes. 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.
Mosaic is a service mark of Goldman Sachs & Co. LLC. This service is made available in the United States by Goldman Sachs & Co. LLC and outside of the United States by Goldman Sachs International, or its local affiliates in accordance with applicable law and regulations. Goldman Sachs International and Goldman Sachs & Co. LLC are the distributors of the Goldman Sachs Funds. Depending upon the jurisdiction in which you are located, transactions in non-Goldman Sachs money market funds are affected by either Goldman Sachs & Co. LLC, a member of FINRA, SIPC and NYSE, or Goldman Sachs International. For additional information contact your Goldman Sachs representative. Goldman Sachs & Co. LLC, Goldman Sachs International, Goldman Sachs Liquidity Solutions, Goldman Sachs Asset Management, L.P., and the Goldman Sachs funds available through Goldman Sachs Liquidity Solutions and other affiliated entities, are under the common control of the Goldman Sachs Group, Inc.
© 2025 Goldman Sachs. All rights reserved.