Beginning Scala Quant Developer – Swaption

By Toyin Akin,

  Filed under: Capital Markets, Development, JVM, Quant Development, Scala, Swaptions
  Comments: None

Beginning Scala Quant Developer – Swaption-750_422

Quant Developer, we look at constructing, pricing and reporting on Swaption derivatives in Scala using opengamma strata.


We, at poc-d, have taken opengamma‘s strata library (which has been developed in java) and extended it for online learning of capital market products for C#, VB.Net, C++, Python, Java and Scala developers as well an Microsoft Excel addin for financial analysts.

The learning is hands on, which means you will be provided a copy of the library to follow along.


 

Course Curriculum


  • Module #1 : Swaption Structure
    • xxx
    • xxx
    • xxx
  • Module #2 : Swaption Pricing
    • xxx
    • xxx
    • xxx
  • Module #3 : Swaption FpML
    • xxx
    • xxx
    • xxx
    • xxx
  • Module #4 : Swaption Risks
    • xxx
    • xxx
    • xxx
  • Provided (for hands on)
    • Microsoft Excel Addin which exposes required opengamma strata financial functions within Excel
    • Opengamma jars in which to write capital market code against (for Scala or Java)
  • Required
    • Minimum Microsoft Windows 7
    • 4GB of RAM (8GB preferred)
    • ScalaIDE for Scala or Java Development. Eclipse (or any other Java IDE) for Java Development
    • Optional : Microsoft Excel 2007 onwards

Course Access


This course is broken down into modules (as seen in the graphic above).

You can access all the Capital Market courses based on C#, VB.Net, C++, Python, Java, Scala and Microsoft Excel for one low monthly fee. Currently the membership site houses courses that covers Fixed Rate Bonds, Swaps, Inverse Floaters, Swaptions and Cap/Floors.

Or each module can be purchased individually from


 

Swaption Derivative


A swaption is an option granting its owner the right but not the obligation to enter into an underlying swap. Although options can be traded on a variety of swaps, the term “swaption” typically refers to options on interest rate swaps

There are two types of swaption contracts:

  • A payer swaption gives the owner of the swaption the right to enter into a swap where they pay the fixed leg and receive the floating leg.
  • A receiver swaption gives the owner of the swaption the right to enter into a swap in which they will receive the fixed leg, and pay the floating leg.

In addition, a “straddle” refers to a combination of a receiver and a payer option on the same underlying swap.

The buyer and seller of the swaption agree on:

  • The premium (price) of the swaption
  • Length of the option period (which usually ends two business days prior to the start date of the underlying swap),
  • The terms of the underlying swap, including:
    • Notional amount (with amortization amounts, if any)
    • The fixed rate (which equals the strike of the swaption)
    • The frequency of observation for the floating leg of the swap (for example, 3 month Libor paid quarterly)

The swaption market

The participants in the swaption market are predominantly large corporations, banks, financial institutions and hedge funds. End users such as corporations and banks typically use swaptions to manage interest rate risk arising from their core business or from their financing arrangements. For example, a corporation wanting protection from rising interest rates might buy a payer swaption. A bank that holds a mortgage portfolio might buy a receiver swaption to protect against lower interest rates that might lead to early prepayment of the mortgages. A hedge fund believing that interest rates will not rise by more than a certain amount might sell a payer swaption, aiming to make money by collecting the premium. Major investment and commercial banks such as JP Morgan Chase, Bank of America Securities and Citigroup make markets in swaptions in the major currencies, and these banks trade amongst themselves in the swaption interbank market. The market making banks typically manage large portfolios of swaptions that they have written with various counterparties. A significant investment in technology and human capital is required to properly monitor the resulting exposure. Swaption markets exist in most of the major currencies in the world, the largest markets being in U.S. dollars, euro, sterling and Japanese yen.

The swaption market is over-the-counter (OTC), i.e., not traded on any exchange. Legally, a swaption is a contract granting a party the right to enter an agreement with another counterparty to exchange the required payments. The counterparties are exposed to each other’s failure to make scheduled payments on the underlying swap, although this exposure is typically mitigated through the use of collateral agreements whereby variation margin is posted to cover the anticipated future exposure

Swaption styles

There are three main categories of Swaption, although exotic desks may be willing to create customised types, analogous to exotic options, in some cases. The standard varieties are

  • Bermudan swaption, in which the owner is allowed to enter the swap on multiple specified dates.
  • European swaption, in which the owner is allowed to enter the swap only on the expiration date. These are the standard in the marketplace.[1]
  • American swaption, in which the owner is allowed to enter the swap on any day that falls within a range of two dates.

This couse will be covering European swaptions.

Valuation

The valuation of swaptions is complicated in that the at-the-money level is the forward swap rate, being the forward rate that would apply between the maturity of the option – time m – and the tenor of the underlying swap such that the swap, at time m, would have an “NPV” of zero; see swap valuation. Moneyness, therefore, is determined based on whether the strike rate is higher, lower, or at the same level as the forward swap rate.

The text below is an edited version taken from the strata web site : http://strata.opengamma.io/introduction/

Introduction to Strata for the Quant Developer


What is Strata?

Strata is the award-winning open source analytics and market risk library from OpenGamma.

Strata allows quant developers to build or enhance existing applications with standardized, off-the-shelf market risk components. It includes:

  • Pricing, financial analytics and curve calibration
  • Reporting
  • Scenario evaluation
  • Trade modelling
  • Market data representation
  • Financial foundations – currencies, indices, holidays, date adjustments, schedules, time-series

Strata has been built from the ground up to be lightweight and flexible. It does not impose any database, server or middleware requirements; these would be built on top of Strata. It provides a high-quality, open source Java toolkit that is designed to be used both in its entirety, as well as for its individual components.

Who is Strata for?

Firms have long employed expensive resources – quants and quant developers – to build and maintain market risk functionality that  offers no real competitive advantage. Where possible, they wish to leverage existing investments in systems and other in-house technologies, while looking externally for just the components required to fill their solution gaps.

Is there an alternative?

One alternative to building in-house is to look towards out-of-the-box offerings provided by financial software vendors. While these vendors offer solutions to industry business issues, the downside is that many firms have been burned by opaque, closed source vendor models, including vendor lock-in to make or support any changes, and “sledgehammer to crack a nut” software footprints.

Solution

Strata delivers the best of both worlds – industry standard market risk functionality, distributed as open source java software to eliminate vendor dependency and return control back to in-house development teams. With open access to standard market risk components and java source code, firms can accelerate the time-to-market of their solutions.

Developers

Strata is aimed at quant or systems developers tasked with delivering analytic solutions into trading, risk, clearing or prime servicing, or collateral businesses. Strata empowers developers with vetted open source java components that deliver standard market risk functionality, allowing them to focus on the unique aspects of solutions delivery to their business stakeholders.

Be the first to write a comment.

Your feedback