Types of market data in Strata

Hi OG team - I’m sorry in advance if the question is unclear or confusing, I’m not that savvy on financial terms.

Is there any documentation of the different types (and samples) of market data that are expected or supported by the pricing engine, and their role in the process?

I’m trying to create a few scenarios for an internal application - for example:

  1. PV01 for swap (for example fixed-float, like the CurveScenarioExample)
  2. PV01 for internal date ranges in a swap (for example, PV01 for the next 18 months, whatever leg payments fall in that period)
  3. Pricing a (missing) fair rate for a fixed leg by the floating leg (couldn’t find a similar example, maybe I’m misunderstanding something)

But all I really have at hand is two types of market data:

  1. Daily file from ICAP with annual interest rates for the next 50 years for every index (1M, 3M, 6M, 1Y), for example - a line like: currency=USD, index=3M, tenor=2Y, bid=0.04, ask=0.04
  2. OIS rates I can pull at any given time, I assume it’s very similar to the sample data I see in the examples

I’m sure I’m missing something, but it seems to me that’s not even enough data to value the swap correctly, is that correct?

On a side note, approaching a project like mine without a financial background is a nightmare.
Whether or not it can help me, purely from a very experienced developer’s perspective, this framework is incredibly well designed and executed. The additional effort to go open source is even more impressive.
I’m very new to financial software and have only heard horror stories so far, you can imagine my surprise. Well done and thanks.

Welcome to Strata and thanks for the kind words. We have indeed tried to make the library as usable as we can for non-finance developers, but ultimately there will be some finance knowledge needed.

Given a Fixed-Float swap against a single LIBOR rate, such as GBP-LIBOR-3M, three pieces of data are needed to price it.

  • the discounting curve for GBP
  • the forward curve for GBP-LIBOR-3M
  • the time-series of historic fixings for GBP-LIBOR-3M

An OIS swap is similar, just referring to an Overnight index instead of an Ibor index.

From your question, it is unclear if you have discounting or forward curves available. I suspect not.

What Strata provides is the ability to calibrate curves from a number of instruments, see CalibrationCheckExample. So long as you have a good grasp of curves and how they are used in pricing, you should be able to look at the data files it refers to and follow through from there. If not, then it may require some background reading on how curves are created and used.

BTW, CurveScenarioExample is one of the more complex examples. SwapPricingExample is simpler and we’d recommend understanding that fully before attempting to go further (PV01 is more complex to understand than just present value for example).

On your data questions, point 3 (finding the value of a fixed rate from a floating leg) would appear to be “par rate”.

Your point 2 (PV01 for a date range) may be referring to “bucketed PV01”. However, it may also be necessary to take the swap, and alter the end date to remove any payment periods beyond the first 18 months. If that is done, standard PV01 could be used on the cut-down swap.

It is likely that your ICAP data would be sufficient to build a curve for an index. The calibrations.csv file used by CalibrationCheckExample is a good place to look to see how curve nodes at different tenors (over the next 50 years) are used.

We’d love to hear more about how you get on, bearing in mind that OpenGamma does offer paid support in addition to forums.

PS. the codebase is still under active development, and we still change method and package names (until v1.0). Hopefully this won’t affect you too much!

Thanks Stephen, appreciate your answers.
I’ve read a bit about the financial process, I can see even more value in a standard framework now, after seeing the same rate computed ten different ways by ten different papers.
Seems my next key action is to fully identify our market data, right now the only answer I’m getting is “Those are annual interest rates, Act/360”.

If I’m following the code correctly, it seems like the simple case of the PV process (for spot/zero rates collection ‘RC’) is:

  1. Generate discount curve from RC
  2. Generate forward rate from RC
  3. For each payment term, floating pv = notional * fr/time * discount, then sum for leg pv
  4. Same for fixed, except payment fixed pv = notional * fix rate/time * discount

I’m still not sure on two things (for the simple fix-float scenario)

  1. What’s the role (if any) of quotes.csv is in this process?
  2. Same question, for OIS rates? Are they used instead of the libor zero rates? side-by-side?
    I’m guessing I read some pretty old papers, because I’ve only seen OIS curves mentioned in the context of “Post-2008”

Other than that, everything looks great. Once I started following SwapFunctionGroups everything seemed clearer.
I have a small question about Strata’s paid/commercial support - I assume you can (legally) only provide adapters/converters for market data from outside sources (e.g Bloomberg, ICAP in my case)? Do you offer a market data feed of your own?

Thanks a lot.

Steps 1 and 2 are about curve calibration. As per the key book, curves should typically be calibrated together.

I’ve added a new example to assist you further: SwapPricingWithCalibrationExample. It calculates various measures for one swap, performing curve calibration. Note that this class is on master branch, and may require some tweaks for v0.8.

It loads five files:

  • groups.csv, defining what each curve in the group is used for
  • settings.csv, defining the settings for each curve including day count (which can be different to the day count of the input data
  • calibrations.csv, defining each point on the curve, including a Symbology+Ticker
  • quotes.csv, defining the quotes to use (same Symbology+Ticker as above)
  • usd-libor-3m.csv, defining the historic fixings of USD-LIBOR-3M

Note that there are two curves defined (calibrations.csv + settings.csv) but three uses of the curve (groups.csv):

  • Curve “USD-Disc” is used as a discount curve for USD
  • Curve “USD-Disc” is used as a forward curve for index USD-FED-FUND
  • Curve “USD-3ML” is used as a forward curve for index USD-LIBOR-3M

On support, OpenGamma can only supply open source code where permitted and most vendors like Reuters and ICAP do not permit it. We don’t currently have a feed for Strata available. Feel free to contact our office if you want to chat about support.

The subject of standard symbology/tickers was something I wasn’t aware of,
Many thanks Stephen, I’ll look into the example right now.