Hey how to calculate Expected positive exposure in the case of interest rate swap? Assume that I simulate $M$ interest rate paths for time grid $0=t_0\le t_1 \le ... \le t_N = T.$ What is the procedure now to calculate value of a swap for each trajectory and each time step using Longstaff-Schwarz LSM? I know that in the case of american option we can go backward but I dont understand how to do it in the case of IR swap. Its easy to calculate cash flows at each time $t_1,...,t_N$ but what next?


2 Answers 2


The expected positive exposure

The expected positive exposure of a swap (or any other type of asset) at a given date $t_i$ is the expectation of the positive part of its value at that date (as that's what you stand to lose if the counterpart defaults, if the value is negative, you lose nothing). This is computed by taking the average over the $M$ paths of your Monte Carlo simulation: $$ EPE(t_i) = \mathbb{E}\left[ \max(V(t_i), 0) \right] \approx \frac{1}{M} \sum_{\omega=1}^M \max(V(t_i, \omega), 0) $$

So, now the question is how to get a grid of your swap values at all paths and dates?

Valuing the swap at all Monte Carlo dates and paths

There are two possibilities:

1. Closed-form formula

You have a closed-form formula giving you the swap price from your interest rates, which is the case. So, here the procedure is simple and you don't even need LSM:

  • at each date $t_i$, you simply take the $M$ simulated interest rates scenarios at that date and plug each one into your formula to get $M$ swap prices;
  • you take the average of the positive parts to get the expected positive exposure at that date $t_i$.
2. LSM

You don't have any closed-form formula to price the swap. In this case, you have to remember that the swap's value at each node $(t_i, \omega)$ of your Monte Carlo is in fact a conditional expectation of its discounted future flows under the risk-neutral measure: $$ V(t_i, \omega)= \mathbb{E} \left[ \sum_{t > t_i} D(t_i, t)Flow(t) \mid (t_i, \omega) \right] $$

(by $\mathbb{E} \left[ \ast \mid (t_i, \omega) \right]$ I mean the expectation of $\ast$ conditional on the state of world, in your case the values of interest rates, being the one in your date $t_i$ and path $\omega$)

Remark that the flows falling after $t_{i+1}$ are actually equal to the swap value at $t_{i+1}$ (everything discounted to $t_i$): $$ \sum_{t > t_{i+1}} D(t_i, t)Flow(t) = D(t_i, t_{i+1}) V(t_{i+1}) $$ Leading to this expression: $$ V(t_i, \omega)= \mathbb{E} \left[ \sum_{t_i < t \leq t_{i+1}} D(t_i, t)Flow(t) \mid (t_i, \omega) \right] + \mathbb{E} \left[ D(t_i, t_{i+1}) V(t_{i+1}) \mid (t_i, \omega) \right] $$

The first term is usually straightforward to compute (it falls in the previous section).

For the second term, you can see the similarity to American options, where you need to compute the continuation value, which is a conditional expectations and that you approximate using a LS.

Here, you can approximate this term using a regression of the discounted values of your swap $Y = D(t_i, t_{i+1}) V(t_{i+1})$ on some regressor $X$ depending on your interest rates values (e.g. zero-coupon bond price, annuity, etc.).

By starting from $t_N$ and moving backwards, you will get your swap values on all dates and paths.

  • 1
    $\begingroup$ 1. It's just a matter of convention, are you valuing the swap before the flows are settled or not :) You can replace all $>, <$ by $\geq, \leq$ and vice versa if you want the flows of a given date to be included in the value at that date. 2. Usually, $Flow(t) = N \delta R(t)$ where $N$ is the notional and $\delta$ the day count fraction of the flow's period. So, the expectation will be: $N \delta F(t_i, t) P(t_i, t)$ where $F(t_i, t)$ is the forward rate seen from $t_i$ and $P(t_i, t)$ is the ZC bond price at $t_i$ for maturity $t$, so you can get its value explicitely without regression. $\endgroup$
    – byouness
    May 13, 2021 at 19:01
  • 1
    $\begingroup$ 2 (continued) Of course, you could also value your whole swap like this at each $(t_i, \omega)$ but the question asks how to value it using LSM. $\endgroup$
    – byouness
    May 13, 2021 at 19:02
  • 1
    $\begingroup$ 3. The idea is to start from $V(t_N)$ where the value of the swap is zero and the regression is trivial and = 0, then move backwards and use the flows falling between $t_{N-1}$ and $t_{N}$ to get a vector of $V(t_{N-1}$, and repeat... you don't want to recompute all the future flows at each date $t_i$ but rather use what you computed up to $t_{i+1}$ to get the value at $t_i$: $$V(t_i) = \mathbb{E} \left[ D(t_i, t_{i+1}) V(t_{i+1} \right] \approx f(X(t_i))$$ $\endgroup$
    – byouness
    May 13, 2021 at 19:08
  • 1
    $\begingroup$ 3 (continued) You get this function $f$ by regressing the vector of $D(t_i, t_{i+1}) V(t_{i+1}$ on the vector of $X(t_i)$, where: $V(t_{i+1}$ is already available from the previous step), and $D(t_i, t_{i+1})$ and $X(t_i)$ are straightforward to compute. $\endgroup$
    – byouness
    May 13, 2021 at 19:11
  • 1
    $\begingroup$ I understand, thanks again! $\endgroup$
    – Math122
    May 13, 2021 at 19:39

While I'm not familiar with LSM, the exposure of a swap should be the amount you can lose at any given point in time for your interest rate path.

If you talk about a basic fixed-for-floating swap, I would calculate the value as the difference of a fixed and floating bond. Thus, for the receiver swap: V(swap)= B(fix) - B(fl)

Since you have an interest rate path, you can simply price the bonds according to each time point and with respect to the future interest rate development.

Maybe you find some inspiration here: https://www.mathworks.com/help/fininst/pricing-swing-options-using-the-longstaff-schwartz-method.html

  • $\begingroup$ So for each path and each time step I have to discount all future cash flows to that time and then If I want to calculate EPE for a given time step I have to calculate average of positive parts over all trajectories? In this case I dont see what is the role of LSM. At maturity $T$ EPE is just an average of all positive cash flows at this time or just zero? I.e we calculate exposure immidiately after payment at a given time or before this payment so we should include it in our calculations? $\endgroup$ May 12, 2021 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.