40 likes | 56 Views
Understand credit risk, measure default probability, manage risk through collateral and hedge, calculate expected loss formula, handle bond positions, and analyze portfolio measures.
E N D
Introduction to Credit Risk • Credit Risk vs. Market Risk • Credit Risk is the risk of the other side not paying (all or part)! This is a “default”… • Failure to pay an interest amount or return all of principal amount • How do we typically measure it? • How do we manage it? • Pledged collateral, posted margin, keep loss reserves, hedging with CDS • You can think of “credit risk” as: • Issuer Risk • Counterparty Risk • Settlement Risk (the time it takes to get your asset/cash or until it’s “inventory”) • Counterparties are sometimes Issuers… • Probability of Default : “PD” • Loss Given Default : “LGD” • Expected Loss : “EL” • Simplified Formula : EL = PD * LGD • Look up LGD’s by quality code (in SBB_ratings.h/cc - an example is ifdef’d) • LGD is a fraction so the total LGD of the position = Amount * LGD • This is the amount we would lose if counterparty defaulted • A type of credit risk sensitivity: • How does my credit risk change on a ratings downgrade?
Mid-Term Submission Requirements • An executable which will build and run on either Linux or Mac using GNU • Deliver an archive tar file named “yourname.tar” - create using: “tar cvf yourname.tar .” in your directory • Build by typing “make all”, launch with shell script “run.sh” • Direct debug to stderr, file descriptor 2 (see run.sh) • Encapsulate your main with “START_TIMER() and END_TIMER() • Price and calculate for each for bond position in file • Given YIELD or SPREAD, compute price, dv01 and risk • Handle both coupon bearing and zero coupon types (key off coupon value - either zero or non-zero) • Our definition of “risk” is: “dv01/100 * amount” - dv01 is in percent and amount is in thousands • Search positions in our portfolio according to below criteria and write out to separate file (“results.txt”) • Largest long position (write out the Amount) • Largest short position (write out the Amount) • Position with most risk (can be either long/positive or short/negative - write out the Risk number • Total risk for the whole portfolio (write out the total Risk number) • - Format of results.txt: 4 numbers per in order above 1-4. See example file “results.txt” on site • Load new input files called: “tradingbook.txt” and “yieldcurve.txt” • For spread priced bonds find closest maturity treasury bond. On a tie choose shorter maturity treasury. • Required output format • For the individual bond results append to the end of each line read in from tradingbook.txt • E.g., “[inputs] Price dv01 risk LGD” • LGD will be adjusted by amount (like risk) • Exclude # lines (comments) • For portfolio measures write out 4 numbers (one per line) to file “results.txt” • The timer output writes out to stdout by default so: • Execute run.sh to call your executable and the only thing displayed should be the timer output. You must call run.sh to run your executable! • Units: • Show 3 decimal places for all measures • Amounts will be in thousands - 1,000 means 1 million • See code example for Risk calculation
Our “Risk” Measures • Position adjusted sensitivity using 1 basis point change • Example of “bond risk”: • Price (pv): 85.731991 (that’s a total amount of $857.31 the bond is worth) • DV01: 0.092519 (how much price moves with a 1/100 of 1% change in yield = .01) • amount: 10000 (10,000 is 10MM “position”) • Position risk: 9.251928 (that’s $9,251 change to position value given a 1bp move) static double bond_risk( const SBB_bond_calculator_interface* bond_calc_ptr, const SBB_instrument_fields* bond_record_ptr, double dv_bump_amount) { double pv = bond_calc_ptr->PV(bond_record_ptr->Yield() ); double dv = bond_calc_ptr->dv_bump(bond_record_ptr->Yield(), pv, dv_bump_amount); double position_risk = bond_record_ptr->Amount() * dv/100.0; return position_risk; } • Above is our “market” risk measure • For credit risk we will use “Loss Given Default” • Two measures to assess risk: one for market and one for credit
Upcoming deliverables… • No class Oct 14 – fall break • Mid-term submission day Oct 28 • First phase submission of project on thumb or google drive (done individually) • Have teams formed for upcoming phases (from here on we will work in teams) • Surgeon, Tester? • Client-side/server side? • Post Mid-term next graded phase will be a test harness client-side driver that hits your server • One week after mid-term submission • Second quiz of MMM chapters 7-13 • Two weeks after mid term lecture: • Server built with version 1 of your message set defined • Stub client (could use python to have a scripted test driver) • Your regression harness is essentially your executable loading tradingbook.txt with answers inserted • The tradingbook.txt and results.txt file will be posted on class page after mid term submission • Submission will be a server and a client • The client will write results to stdout • Specification of results to follow…