menu
Pricing and Risk

Instruments

What is an Instrument

Instrument is a class that inherits from the Priceable class and is used to represent financial objects that can be priced, such as derivative instruments.

Priceable exposes several methods common to all instruments, such as as_dict() which returns a dictionary of all the public, non-null properties and values and calc(risk_measure) which is used to evaluate various risk measures. More about the latter in the Measures tutorial

gs-quant offers a number of Instrument implementations, such as equity options, interest rate swaptions and fx options. Please refer to supported instruments for a list of externally supported instruments.

info

Note

Examples require an initialized GsSession and relevant entitlements. Please refer to Sessions for details.

How to Create an Instrument

Let's now create an instance of an instrument implementation. For this example, we will create an Interest Rate Swaption, which the IRSwaption class implements.

We will start by importing IRSwaption from the Instrument package as well as PayReceive, Currency to represent commonly used constants.

from gs_quant.instrument import IRSwaption
from gs_quant.common import PayReceive, Currency

We will now instantiate an IRSwaption object. Note that all Instruments, including IRSwaption, take some non-keyworded required arguments (first 3 in this example), and some optional keyworded arguments (**kwargs). If the optional arguments are not supplied, default market conventions will be used as described in each instrument's signature. Signatures can be found in the the Instrument Package by clicking on the desired instrument.

swaption = IRSwaption(PayReceive.Receive, '5y', Currency.USD, expiration_date='13m', strike='atm+40', notional_amount=1e8)

We can now use the as_dict() method inherited from Priceable to view all public non-null properties and values of this swaption instance.

swaption.as_dict()

Output:

{'pay_or_receive': Receive,
 'expiration_date': '13m',
 'premium': 0,
 'termination_date': '5y',
 'asset_class': Rates,
 'fee': 0,
 'notional_currency': USD,
 'type': Swaption,
 'notional_amount': 100000000.0,
 'strike': 'atm+40'}

Instrument Resolution

The above output shows only the inputs specified, many of which are relative (i.e. expiration date, strike). Calling the resolve() method will resolve these parameters to absolute values as well as fill in any defaulted parameters using the PricingContext. Please refer to the above mentioned Instrument Package for each instrument's available parameters and to the Pricing Context tutorial for further details on PricingContext.

swaption.resolve()
swaption.as_dict()

Output:

{'floating_rate_spread': 0.0,
 'floating_rate_day_count_fraction': ACT/360,
 'asset_class': Rates,
 'floating_rate_designated_maturity': '3m',
 'fixed_rate_business_day_convention': Modified Following,
 'premium': 0.0,
 'expiration_date': '2020-11-02',
 'settlement': Phys.CLEARED,
 'termination_date': '2025-11-04',
 'notional_currency': USD,
 'pay_or_receive': 'Receive',
 'effective_date': '2020-11-04',
 'strike': 0.017845989434194357,
 'premium_payment_date': '2019-10-04',
 'fee': 0.0,
 'floating_rate_frequency': '3m',
 'fixed_rate_day_count_fraction': 30/360,
 'type': Swaption,
 'floating_rate_option': 'USD-LIBOR-BBA',
 'floating_rate_business_day_convention': Modified Following,
 'fixed_rate_frequency': '6m',
 'notional_amount': 100000000.0}

Note resolve() will change the state of the instrument object. In the code snippet above, calling resolve() mutates several specified relative parameters, for example:

  • expiration_date, specified as '13m', was resolved to '2020-11-02'
  • strike specified as 'atm+40', was resolved to '0.017845989434194357'

resolve() will also add any unspecified default parameters - note the additions when calling as_dict() before and after resolve(). For example:

  • 'fixed_rate_frequency': '6m'
  • 'premium_payment_date': '2019-10-04'

Accessing any of the unspecified parameters on the unresolved swaption will resolve the swaption in place.

Additionally, as discussed in the measures tutorial, if resolve() is not called prior to calling price() or calculating risk, the instrument object will be copied and resolved on the fly without mutating the original swaption object.

The preferred behavior may depend on the PricingContext - more on this in the Pricing Context tutorial.

Supported Instruments

Below are the instruments covered, names they are referred to as in gs_quant and brief definitions as well as links to the technical documentation for each. Each instrument corresponds to a model maintained by Goldman Sachs Securities Division.

Instrumentgs_quant nameDescription
Credit IndexCDIndexAn index of credit default swaps
Credit Index OptionCDIndexOptionAn option on an underlying index of credit default swaps
Eq OptionEqOptionAn option on an underlying equity security
FX ForwardFXForwardAn exchange of cashflows in different currencies at a determined future time
FX OptionFXOptionAn option on an FX Forward
FX BinaryFXBinaryAn option where the buyer receives a fixed amount if a certain currency pair fixes above or below a specified level on a specified date
FX Multi Cross BinaryFXMultiCrossBinaryAn option where the buyer receives a fixed amount if each of the currency pairs fixes above or below a specified level on a specified date
FX Volatility SwapFXVolatilitySwapAn exchange of cashflows based on the realized volatility of the underlying FX cross and a pre-determined fixed volatility level
Inflation SwapInflationSwapA zero coupon vanilla inflation swap of fixed vs floating cashflows adjusted to inflation rate
Interest Rate SwapIRSwapA vanilla interest rate swap of fixed vs floating cashflows in the same currency
Interest Rate Basis SwapIRBasisSwapAn exchange of cashflows from different interest rate indices in the same currency
Interest Rate Xccy SwapIRXccySwapAn exchange of cashflows from different interest rate indices in different currencies
Interest Rate Xccy Swap Fix FixIRXccySwapFixFixAn exchange of fixed cashflows in different currencies
Interest Rate Xccy Swap Fix FloatIRXccySwapFixFltA vanilla interest rate swap of fixed vs floating cashflows in different currencies
Interest Rate SwaptionIRSwaptionAn option to enter into a vanilla interest rate swap of fixed vs floating cashflows
Interest Rate CapIRCapAn instrument in which the buyer receives payments at the end of each period in which the interest rate exceeds the agreed strike price
Interest Rate FloorIRFloorAn instrument in which the buyer receives payments at the end of each period in which the interest rate is below the agreed strike price
Interest Rate CMS OptionIRCMSOptionAn option on a single date where the payoff is based on the CMS rate
Interest Rate CMS Option StripIRCMSOptionStripA strip of CMS Options
Interest Rate CMS Spread OptionIRCMSSpreadOptionAn option on a single date where the payoff is dependent on the spread of two CMS rates compared to the strike of the option.
Interest Rate CMS Spread Option StripIRCMSSpreadOptionStripA strip of CMS Spread Options

Note that IRDelta is additional available for Interest Rate Futures and Bond Futures upon request.


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.