menu
Data

Processors

Processors are objects that define interfaces on how to apply a timeseries function to a series in a DataGrid. These series can be from a DataCoordinate or from another processor which allows for nested processors. Each processor class defines how many series can be passed into the processor and any required or optional parameters for the timeseries functions. DataGrid supports many processors with the ability to seamlessly add more to GS Quant.

Supported Processors

We currently support many processors which are grouped by type. There are also API references for all our processors with detailed descriptions and usage.

Special Processors

Special processors are unlike our normal timeseries processors. They handle special use-cases such as getting data from an Entity or coordinate.

ProcessorDescriptionAPI Reference
CoordinateProcessorReturns data from a Coordinate. See example.Link
EntityProcessorReturns data such as the name or an identifier of a entity in string format.Link

Econometric Processors

Econometrics processors are for standard economic and timeseries analytics operations and other numerical operations which are generally finance-oriented.

ProcessorDescriptionAPI Reference
ChangeProcessorComputes the difference of every value from the initial value of the input series.Link
CorrelationProcessorComputes the rolling correlation of two series.Link
VolatilityProcessorComputes the realized volatility of the input series.Link
SharpeRatioProcessorComputes the Sharpe ratio of the the input seriesLink

Statistics Processors

ProcessorDescriptionAPI Reference
PercentilesProcessorComputes the rolling percentiles over given window.Link

Utility Processors

Utility processors are for generic operations on timeseries which may be useful for your analytics.

ProcessorDescriptionAPI Reference
AppendProcessorAppends two series together.Link

Examples

Coordinate Processor

Below is an example DataGrid with a CoordinateProcessor.

from gs_quant.analytics.datagrid import DataColumn, DataRow, DimensionsOverride, DataGrid
from gs_quant.analytics.processors import LastProcessor, EntityProcessor, CoordinateProcessor
from gs_quant.data import DataDimension
from gs_quant.data.coordinate import DataCoordinate, DataMeasure, DataFrequency
from gs_quant.markets.securities import AssetIdentifier, Asset
from gs_quant.session import GsSession

GsSession.use()

implied_volatility = DataCoordinate(
    measure=DataMeasure.IMPLIED_VOLATILITY,
    dimensions={
        DataDimension.TENOR: "3m",
        DataDimension.RELATIVE_STRIKE: 0.5,
        DataDimension.STRIKE_REFERENCE: "delta"
    },
    frequency=DataFrequency.DAILY,
)

col_1 = DataColumn(name="Name", processor=EntityProcessor(field="name"))
col_2 = DataColumn(name="Tenor", processor=CoordinateProcessor(implied_volatility, dimension=DataDimension.TENOR))
col_3 = DataColumn(name="IV ATM", processor=LastProcessor(implied_volatility))

columns = [col_1, col_2, col_3]

SPX = Asset.get("SPX", AssetIdentifier.BLOOMBERG_ID)

rows = [
    DataRow(SPX),
    DataRow(SPX, overrides=[
        DimensionsOverride(
            column_names=[col_2.name, col_3.name],
            dimensions={DataDimension.TENOR: "6m"},
            coordinate=implied_volatility
        )
    ]),
    DataRow(SPX, overrides=[
        DimensionsOverride(
            column_names=[col_2.name, col_3.name],
            dimensions={DataDimension.TENOR: "1y"},
            coordinate=implied_volatility
        )
    ])
]

datagrid = DataGrid(name="SPX Implied Vol by Tenor", rows=rows, columns=columns)
datagrid.initialize(), datagrid.poll()
print(datagrid.to_frame())

Output

            Name Tenor    IV ATM
0  S&P 500 Index    3m  0.252124
1  S&P 500 Index    6m  0.243322
2  S&P 500 Index    1y  0.231568

Contributing Processors

GS Quant is Open-Source, we encourage users to create and contribute new processors for any new analytics.

All processors must inherit from the BaseProcessor which automatically handles serialization and creating the dependency graph for data fetching and other background logic. Users only need to create the process function that handles calculations and setting the procesor's value.

info

Note

For contributing processors, please send merge requests and reach out to: gs-marquee-markets@gs.com


help

Questions?

Please contact us at gs-marquee-markets@gs.com with any questions or feedback.


Related Content


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