Download presentation
Presentation is loading. Please wait.
1
Enhancements for server-side Price to Yield - will need to add a root finder –High yield bonds are not usually spread-priced. –We still want to know what the sensitivities are though… Server-side: –Evolve our executable to be either: an actual server or a linked in library (if using excel for example) Why build a server? Heavy weight process vs. threads Extra Credit: –Expand calculator to handle partial periods –No longer assume all periods are even between settlement date and coupon dates –Before we assumed all our bonds were newly issued and settlement date fell on a coupon date –We will use actual/365 day count convention
2
Putting it all together Front vs “back end” - Pros/Cons of: –Server (separate process) –Executable –Library GUI –Our main() will now be our test driver –GUI environment choice is up to the teams - any language or lib suite –Link a lib or make a process hop Now that we can price and calculate risk on all or part of a book, it’s time to put a nice front end on… Use what we have to calculate historical data to be used in VaR
3
Measuring day-over-day change We can now calculate risk at a point in time for a given book –Credit : Expected loss –Market : Interest rate sensitivity However, the risk changes daily given trading activity and changing market environment… –What is the new market environment (yield curve, etc., )? –What is the new position? –What is the new risk? –Sensitivities change as well as position amounts and valuations We need an itemized bill: –“Risk Attribution” –“PnL Attribution” (How did I make/lose money?) If VaR changed materially where did it come from? Big position move or a risk move? –Was it due to Interest Rate movement of Spread movement?
4
Calculate Expected Loss for the book Calculate Expected Loss given a ratings downgrade scenario: –AA to A (for example) –BBB to BB (Investment grade crosses over to junk) Calculate change in position between two days (why will now need security ID) You should be able to: –Load a position file and price by either spread or yield or Price –Calculate scenarios by shifting the yield curve –Show how risk has changed between two days –Get your GUI wiggling (specific requirements to follow - “questions to answer”…) –Each team will have to use graphics to meet some aspect of the requirements Table object and Graphic of some sort Next quiz is in two weeks - Nov 22 –Will cover the remainder of MMM (chapter 13 to end) Grades for mid-term will be distributed next class Requirements for Final Submission
5
The “risk” calculation 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 “face amount”) 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; }
6
Units consistency $10,000,000 of a bond 9% coupon, 20 years to maturity Current price: 134.6722 and yield is: 6% Market value is: $10,000,000 * 1.346722 = $13,467,220 Bump yield by up by 100 basis points (1%) and price is now: 121.3551 Our data file has amounts in 000’s so $10,000,000 would be entered as 10,000 (with no comma) Dollar Value of an “01” (DV01) - price diff between starting yield and 1/100th of a percent move of yield, or 1 basis point, (1/100th of above example). Additionally, it is the average of two shifts: the absolute value of the differences resulting from both an up and down move. “Risk” for us is defined as Amount * DV01/100 and thus stays in thousands since Amount is in thousands… double yield_delta_abs = fabs(bump_amount); // yield goes up, price goes down double down_price = PV(base_yield + yield_delta_abs); double price_delta_down = base_price - down_price; // yield goes down, price goes up double up_price = PV(base_yield - yield_delta_abs); double price_delta_up = up_price - base_price; dv01 = (price_delta_up + price_delta_down ) / 2.0;
7
Requirements for Front End Static reports: Day-over-day change (see spreadsheet story-board) Total Notional Amount, Risk and LGD by: “Quality” “Issuer” User input driven: Risk and Market Value by maturity band: Maturity buckets defined as: 0-2yr, 2-5yr, 5-10yr, 10-30yr inclusive Display Notional Amount of 2 year treasuries (T2 in file) to hedge each bucket bucket dv01 * bucket amount = dv01 * Amount User should be able to re-run maturity band report with shifted inputs: Yield curve parallel up and down by 50% (of starting yield curve yields) User entered spreads at each point (to support ad-hoc shifts) It is required is to display data in tabular form however: It is desirable to also display in graphical form where possible. e.g, pie, bar, clustered column chart… Solve for Amount:
8
Deliverables for Final Install pkg:.tar (as before) - including makefile, README, etc. Your main is now your test driver (to simulate calls from the client side) Include the client side code (or excel file) in the.tar I will not grade the user handling part of the client side code but may need to refer to it Presentation/demo
9
Requirements for Presentation Architecture: Description of: Server-side capabilities Client-side capabilities How is logic partitioned between server and client side? GUI technology choice rationale “Middleware” protocol Challenges faced during implementation How was the work partitioned within the team? Demonstrate the front end What questions does the app help the user answer? Clear description of how to install it, build it and use it Walk through test-driver of the server side (a requirement!) I will drive after the presentation is given and ask questions interactively
10
Schedule ahead from Nov 8 Third quiz on MMM remaining chapters in two weeks Each team must demonstrate a working GUI next week Show tabular display of prices, dv01s and Risk in a table Requirements clarification via email or phone Office hours on request Feedback on mid-term submission Compile, Link, Run Stale.o’s and.a’s Compiler flags GNU on Linux (NYU build) or MacOS Darwin Team grades distributed next week on code submission Submitted mid-term grades will be based on the two tests
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.