# Financial Engineering (Interest Rates and xVA)

Course description:
The main focus of this course is the modelling of the interest rates while other asset classes like foreign exchange and inflation are also covered. Ultimately, after completing the course, the student should be able to build a multi-asset portfolio consisting of linear products and perform xVA (CVA, BCVA and FVA) and (H)Value-at-Risk computations.

Expected prior knowledge:
Basic knowledge of stochastic differential equations (SDEs), numerical methods for Monte Carlo simulation, linear algebra and basic knowledge of Python programming. Prior to this course, it is highly recommended to follow the course of Computational Finance (available here).

The course consists of 14 lectures, and each lecture is divided into 45m-1h blocks. The whole course consists of 32 blocks. Homework assignments are given at the end of each lecture.

Course Materials:

1. Slides can be found here.
2. The book used in the course can be get here.
3. Codes and the exercises for the book can be found here.
4. YouTube Channel with courses can be found here. ### Lecture 1- Introduction and Overview of the Course

1.1. Introduction & Details Regarding the Course
1.2. Lecture 2- Understanding of Filtrations and Measures
1.3. Lecture 3- The HJM Framework
1.4. Lecture 4- Yield Curve Dynamics under Short Rate
1.5. Lecture 5- Interest Rate Products
1.6. Lecture 6- Construction of Yield Curve and Multi-Curves
1.7. Lecture 7- Pricing of Swaptions and Negative Interest Rates
1.8. Lecture 8- Mortgages and Prepayments
1.9. Lecture 9- Hybrid Models and Stochastic Interest Rates
1.10. Lecture 10- Foreign Exchange (FX) and Inflation
1.11. Lecture 11- Market Models and Convexity Adjustments
1.12. Lecture 12- Valuation Adjustments- xVA (CVA, BCVA and FVA)
1.13. Lecture 13- Value-at-Risk and Expected Shortfall

### Lecture 2- Understanding of Filtrations and Measures

2.1. Filtration
2.2. Conditional Expectations
2.3. Conditional Expectations in Python
2.4. Option Pricing Using Conditional Expectation
2.5. Convergence Experiment in Python
2.6. Concept of Numeraire
2.7. From P to Q in the Black-Scholes Model
2.8. Change of Numeraire: Stock Measure
2.9. Change of Numeraire: Dimension Reduction
2.10. The T-Forward Measure
2.11. Summary of the Lecture + Homework

### Lecture 3- The HJM Framework

3.1. Equilibrium vs. Term-Structure Models
3.2. The HJM Framework
3.3. The Instantaneous Forward Rate
3.4. Arbitrage Free Conditions under HJM
3.5. Ho-Lee Model and Python Simulation
3.6. Hull-White Model
3.7. Hull-White Model and Simulation in Python
3.8. Summary of the Lecture + Homework

### Lecture 4- Yield Curve Dynamics under Short Rate

4.1. Exact Solution for the Hull-White Model
4.2. The Affinity of the Hull-White Model
4.3. Brief Introduction to Yield Curves
4.4. Shapes and Dynamics of Yield Curve
4.5. Limitations of the 1-Factor Model and Yield Curve Dynamics
4.6. Gaussian 2-Factor Model
4.7. Summary of the Lecture + Homework

### Lecture 5- Interest Rate Products

5.1. Simple Compounded Forward Rate
5.2. Forward Rate Agreement
5.3. Floating Rate Note
5.4. Interest Rate Swap
5.5. The Hull-White model under the T-Forward Measure
5.6. Options on Zero-Coupon Bond
5.7. Caplets and Floorlets
5.8. Pricing of Caplets/Floorlets Under the HW Model
5.9. Summary of the Lecture + Homework

### Lecture 6- Construction of Yield Curve and Multi-Curves

6.1. Yield Curve and its Dynamics
6.2. Mathematical Formulation
6.3. From Implied Volatilities to Building of YC
6.4. Spine Points and Optimization Routine
6.5. Analytical Example of YC Construction
6.6. Building of Yield Curve in Python
6.7. Different Interpolations and Impact on Hedging
6.8. Introduction to Multi-Curves
6.9. Multi-Curves and Connection to Default Probabilities
6.10. Python Experiment for Multi-Curves
6.11. Summary of the Lecture + Homework

### Lecture 7- Pricing of Swaptions and Negative Interest Rates

7.1. Pricing of Caplets/Floorlets
7.2. Pricing of Interest Rate Swaps
7.3. Pricing of Swaptions under the Black-Scholes Model
7.4. Jamshidian’s Trick
7.5. Swaptions under the Hull-White Model
7.6. Negative Interest Rates
7.7. Shifted Lognormal, Shifted Implied Volatility
7.8. Summary of the Lecture + Homework

### Lecture 8- Mortgages and Prepayments

8.1. Introduction to Mortgage Contracts
8.2. Bullet Mortgage
8.3. Bullet Mortgage: Python Experiment
8.4. Annuity Mortgage
8.5. Annuity Mortgage: Python Experiment
8.6. Prepayment determinants
8.7. CPR: Constant Prepayment Rate
8.8. Index Amortizing Swap
8.9. Inclusion of Refinancing Incentive
8.10. Stochastic Prepayment: Python Experiment
8.11. Stochastic Prepayment and Swaptions
8.12. Pipeline Risk
8.13. Summary of the Lecture + Homework

### Lecture 9- Hybrid Models and Stochastic Interest Rates

9.1. Hybrid Models for xVA and VaR
9.2. The Black-Scholes Hull-White Model
9.3. Implied Volatility for Models with Stochastic Interest Rates
9.4. Stochastic Vol Models with Stochastic Interest Rates
9.5. Example of a Hybrid Payoff: Diversification Product
9.6. The Heston Hull-White Hybrid Model
9.7. Monte Carlo Simulation for Hybrid Models
9.8. Monte Carlo Simulation of the Heston-Hull-White Model
9.9. Summary of the Lecture + Homework

### Lecture 10- Foreign Exchange (FX) and Inflation

10.1. Introduction to Foreign Exchange
10.2. Forward FX Contract
10.3. Cross-Currency Swaps
10.4. Pricing of FX Options, the Black-Scholes Case
10.5. The Heston FX Model
10.6. Pricing of FX Options with Stochastic Interest Rates
10.7. Introduction to Inflation
10.8. Pricing of Inflation Forwards and Swaps
10.9. Modeling of Inflation with SDEs
10.10. Summary of the Lecture + Homework

### Lecture 11- Market Models and Convexity Adjustments

11.1. A bit of History
11.2. Libor Market Model Specifications
11.3. Libor Rate Dynamics, from P → QT
11.4. Lognormal LMM and Measure Changes
11.5. LMM Under the Terminal and Spot Measures
11.6. Stochastic Volatility LMM
11.7. Smile and Skew in the LMM (Displaced Diffusion)
11.8. Freezing Technique
11.9. Convexity Correction
11.10. Convexity and Inclusion of Volatility Smile and Skew
11.11. Summary of the Lecture + Homework

### Lecture 12- Valuation Adjustments- xVA (CVA, BCVA and FVA)

12.1. Introduction and Basics of CVA
12.2. Exposures and Potential Future Exposure
12.3. Expected Exposures
12.4. Expected Exposures and Closed Form Solutions
12.5. Generation of Exposures with Python (1D Case)
12.6. Exposure Generation for Portfolio of Assets
12.7. Unilateral Credit Value Adjustment (CVA)
12.8. Approximations in Calculation of CVA
12.9. Bilateral Credit Value Adjustment (BCVA)
12.12. Summary of the Lecture + Homework

### Lecture 13- Value-at-Risk and Expected Shortfall

13.1. Value at Risk (VaR), Stressed VaR (SVaR)
13.2. Coherent Risk Measures
13.3. Expected Shortfall
13.4. Historical VaR (HVar) and Python Experiment
13.5. Missing Data, Arbitrage and Re-Gridding
13.6. VaR Computation with Monte Carlo
13.7. Backtesting
13.8. Summary of the Lecture + Homework

### Lecture 14- The Summary of the Course

14.1. The Summary of the Course