10
Basic VaR Categories Historical Simulation “Full re-val” or “Greeks based” Simple, explainable, repeatable Supplement with stress testing Need lots of historical data Can proxy to indicies and do a specific risk add-on” Variance/co-variance Correlations maintained in a matrix Unlike historical which captures correlations by default (just add PnL vectors) Example FX and IR Simulation on normal distribution function Random draw against a probability density function

Basic VaR Categories Historical Simulation –“Full re-val” or “Greeks based” –Simple, explainable, repeatable –Supplement with stress testing –Need lots

Embed Size (px)

DESCRIPTION

VaR Implementation Historical simulation Parameterize by “holding period” and “confidence interval” e.g, 1 day, 99% confidence interval At least 10 days of historical data (in practice min of 3 years) Each security will have an associated historical file Name will be the unique ID in our data file for ex., “SBB_0001.txt” Each historical file will have either: YIELD SPREAD Column based like our other data files Pricing modes won’t be mixed (all YIELD or all SPREAD, etc.) Refer to Spreadsheet example

Citation preview

Page 1: Basic VaR Categories Historical Simulation –“Full re-val” or “Greeks based” –Simple, explainable, repeatable –Supplement with stress testing –Need lots

Basic VaR Categories• Historical Simulation

– “Full re-val” or “Greeks based”– Simple, explainable, repeatable– Supplement with stress testing– Need lots of historical data– Can proxy to indicies and do a specific risk add-on”

• Variance/co-variance– Correlations maintained in a matrix– Unlike historical which captures correlations by default (just add

PnL vectors)– Example FX and IR

• Simulation on normal distribution function– Random draw against a probability density function

Page 2: Basic VaR Categories Historical Simulation –“Full re-val” or “Greeks based” –Simple, explainable, repeatable –Supplement with stress testing –Need lots

Basic VaR categories …• Historical Simulation

– Full re-val • better for “path dependent” products and capturing non-linear behavior

– “Greeks based” (simpler to implement and less computation)• Supplement with stress testing

– Hypothetical (the black swan)– Actual past extreme event “greatest hits”

• Depends on history and how far you look-back is…• Depends on availability of clean historical data (no holes)

– Per security– Per benchmark

• Can add on a “index tracking error” or “specific risk”

Page 3: Basic VaR Categories Historical Simulation –“Full re-val” or “Greeks based” –Simple, explainable, repeatable –Supplement with stress testing –Need lots

VaR Implementation

• Historical simulation

• Parameterize by “holding period” and “confidence interval”

• e.g, 1 day, 99% confidence interval

• At least 10 days of historical data (in practice min of 3 years)

• Each security will have an associated historical file

• Name will be the unique ID in our data file for ex., “SBB_0001.txt”

• Each historical file will have either:

• YIELD

• SPREAD

• Column based like our other data files

• Pricing modes won’t be mixed (all YIELD or all SPREAD, etc.)

• Refer to Spreadsheet example

Page 4: Basic VaR Categories Historical Simulation –“Full re-val” or “Greeks based” –Simple, explainable, repeatable –Supplement with stress testing –Need lots

Pricing Modes

• Pricing “Modes” - when are they used?

• Spread

• followers (track but still have “specific risk”

• Yield

• leaders (highly liquid benchmark / indices)

• Price

• idiosyncratic (high yield e.g., junk)

• In the end we always need a price to calculate PnL

• But values are quoted in yield or spread so we have ot convert...

Page 5: Basic VaR Categories Historical Simulation –“Full re-val” or “Greeks based” –Simple, explainable, repeatable –Supplement with stress testing –Need lots

Enhancements to server-side• Pricing “Modes” – e.g., “what you are starting with”

• spread, yield, price - when are they used?

• we will implement yield and spread (no price)

• VaR of the book

• Expected (from history) vs. Potential (from stress testing)

• Holding Period will always be 1 day

• In practice this could be be 5 or 10 days

• Parameterize by confidence interval (could be either 99% or 95%)

• How did VaR change with book composition and/or market data?

• PnL “Attribution”

• Interest Rate “IR”

• Credit Spread “CS”

Page 6: Basic VaR Categories Historical Simulation –“Full re-val” or “Greeks based” –Simple, explainable, repeatable –Supplement with stress testing –Need lots

Server-side Mechanics

• Server-side API is determined by how you craft your message set

• Message set choices

• ASCII or Binary - go ASCII so you can debug

• Balancing process hop frequency vs. server-side grouping of results

• Client/Server concerns

• Recovery - what happens when your server crashes?

• Sync or async - start async and you can always go sync

• Sharing data between compute processes

• Sourcing data inside the compute grid

• Case study - Govt bond trading desk pricing/risk app

Page 7: Basic VaR Categories Historical Simulation –“Full re-val” or “Greeks based” –Simple, explainable, repeatable –Supplement with stress testing –Need lots

Review Spreadsheet Specs

1. var_example.xls

2. finalGUI_reqsV2.xls

Page 8: Basic VaR Categories Historical Simulation –“Full re-val” or “Greeks based” –Simple, explainable, repeatable –Supplement with stress testing –Need lots

For next week

• Study for test 2 of 3 on MMM!

• Chapters 7-12

• No programming phase this week but:

• Review V2 of GUI spec: “finalGUI_reqsV2.xls”

Page 9: Basic VaR Categories Historical Simulation –“Full re-val” or “Greeks based” –Simple, explainable, repeatable –Supplement with stress testing –Need lots
Page 10: Basic VaR Categories Historical Simulation –“Full re-val” or “Greeks based” –Simple, explainable, repeatable –Supplement with stress testing –Need lots

Cover in lecture 11VaR Implementation details

• 1 data file per security ex: “SBB_0001.txt”– At least 10 days of data– There will be an historical file for each benchmark security T2, T5, T10, T30– For spread priced you will have to look up benchmark yield for that day– New SBB_io_class.h/.cc

• Date ValType ValValue DV01 Benchmark• ValType can be either “YIELD”, “SPREAD”, “PRICE”• Benchmark will be string equal to ticker in our yieldcurve.txt file e.g, “T2”

• Calculate a PnL vector for each security• Total VaR for book is derived by:

– adding the individual security vectors – calculating using confidence interval “90%”

• VaR will have to be “attributed” (is the PnL due to credit spread or interest rate?)– Benchmark yield movement (yields in our treasury.txt)– Credit spread (“CS”) movement (for bonds that are priced by SPREAD)

• Historical files will have SPREAD or YIELD per day• For each day we’ll have to calculate price then calculation price changes between days• Our PnL vector is percentage changes of price between days• Refer to spreadsheet