SpringOne Platform 2016: Wall St. Derivative Risk Solutions Using Apache Geode

Speaker: Andre Langevin, CIBC
Speaker: Mike Stolz, Pivotal
White Paper: http://pivotal.io/building-wall-street-risk-applications
Geode: http://geode.incubator.apache.org

GemFire is the commercial offering of Geode

Design

  • Input: Trades
  • Input: Market Data
  • Output: Risk
  • Where the Magic Happens: Risk Calculations
  • Geode is the backbone infrastructure

A Crash Course in Wall Street

  • Big Wall Street firms have “FICC” trading business organized by market
    • Each business will trade “cash” and derivative products, but traders specialize in one or the other
    • There may be a team of traders working to trade a single product
  • Trading systems are product specific and often highly specialized
  • Managing these businesses requires a consolidated view of risk

Calculating Risk

  • What is the “risk” that we are trying to measure?
  • Markets are represented using curves
  • Consistency is paramount

Technology Solutions that Work Badly

  • The easiest thing to do is just book all your trades using one trading system
  • How about booking all of the hedges into the primary trading system?
  • How about adding up all of the risk from each trading system into a report

Designing and Naming Data Objects

  • The trade data model serves 2 distinct purposes
  • Market data should follow the calculation design
  • Use “dot” notation to give business-friendly keys to object (i.e., USD.LIBOR.3M)

Region Design

  • Trade and market data regions
  • Typically a curve embeds a list for rates — leave it denormalized if rates are updated slowly
  • Computational results and aggregation
  • Regions: Rates, Trades, Curves, Built Curves, FX, Trade Risk, Risks, Agg

Placing Regions on the Cluster

  • Region placement optimizes the solution’s performance
  • Partition the trades regions to balance the cluster
  • Partition or replicate market data to optimize computations

PDX Integration Glue

  • PDX serialization is an effective cross-language bridge
  • Structure PDX objects to optimize performance
  • JSON is a good message format

Getting Trade Data into Geode

  • Message formats vary by product type
  • Broker messages in an application server
  • Trade data capture is transactional: Best practive is to make end-to-end process a transaction, but may need to split into two legs based on source of messages

Getting Market Data into Geode

  • Market data feeds have many proprietary formats
  • Market data is often exceptionally fast moving
  • Market data can also be very slow moving: i.e., LIBOR
  • Conflate fast market data by sampling
  • Gate market data into batches

Crunching Numbers on a Shared Grid

  • Most trading firms have a proprietary math library
  • Pushing Geode events to an external compute grid: Asynchronous Event Queue (AEQ)
  • Caching locally on the grid to accelerate performance: Wildcards on keys

Crunching Numbers Inside Geode

  • Running the math inside Geode is dramatically faster
  • Using the Geode grid as a compute grid
  • Using cache listeners to propagate valuation events

Ticking Risk Views

  • Roll-your-own client applications to view ticking risk
  • Integrating packaged products: ION Enterprise Risk, Armanta Theatre, Active Pivot…
  • The Traders always want spreadsheets: Write an Excel plug-in