Market Risk: Snapping Data

One of the problem with Real-Time Risk (RTR) is the need to be real-time. Specifically the PV is calculated off market data. This market data changes throughout the trading day. It’s probably impossible to keep up to date with calculating all the curves based on a single market data change (tick), and thereby re-calculate all cashflows, and hence all aggregations (topic for another posting). Hence what needs to occur is the following:

  • Decide when to snap the market data
  • Generate the curves based off the snapped market data – e.g. yield curve and forecast
  • Copy the trades
  • Generate the cashflows for the copied trades based off the snapped curves/market data
  • Report Market Risk
  • Start from the top again based on some event e.g. time
Advertisement

~ by mdavey on March 15, 2010.

2 Responses to “Market Risk: Snapping Data”

  1. This has too many locking problems for me… I like this way: Calculate the curve/function per instrument and store the last results. “New curve” becomes an event that can hit a trade in its current state to generate the cash flow for the trade. New trade events hits the last stored curve and also generates a cash flow event for the trade. Store the last cash flow event for each trade – this is the current cash flow for aggregation. No copying of trades == acceptable scalability. There is almost no additional locking above what’s required anyway to keep trade data consistent. And also, you have some very granular control over the timing of various calculations.

    Hope this makes sense :)

  2. “Start from the top again based on some event e.g. time” — or you can keep a dependency graph: instruments to curves to trades. Then, when an instrument ticks, work out all all the curves used by the affected trades, and snap all the instruments in question. While those trades are pricing, stop listening for new ticks on the associated instruments; start listening again once you’ve got all your risk.

    This way you can price trades in parallel if they’ve got no instruments in common, while making sure that you don’t see risk on hedges arrive before (and therefore be inconsistent with) risk from exotic trades.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 272 other followers