# Practical implementation of Libor Market Model

I am trying to implement a project about the BGM model, suggested in the book "The Concepts and Practice of mathematical finance" by Mark Joshi.

My question is related to the forward volatility structure, particularly about the covariance matrix. First of all, the book assumes that forward $f_j$ has volatility $$K_j \left(\left(a + b(t_j - t)\right)e^{-c(t_j-t)} + d\right)$$

for $t < t_j$ and $0$ otherwise. Also, the instantaneous correlation between the forward rates $f_i$ and $f_j$ is defined as $e^{-\beta|t_i - t_j|}$.

Now, I need to write a method that "computes the covariance matrix for the time-step".

I get confused with the fact that there are "simultaneous" forward rates at each time step that have to be simulated, which brings me to the following two questions:

1. Concerning the dimensions of the covariance matrix, I see that they depend on the number of time periods (and not on the time step size), but how long are the time periods? Is there a convention?
2. How do the elements of the covariance matrix come into play? This might sound a bit stupid, but when pricing a swaption, we can have the following discretization of the logarithm of the forward rate: $$\ln F_k^{\Delta t}(t + \Delta t) = \ln F_k^{\Delta t}(t) + \sigma_k(t)\sum_{j = \alpha + 1}^k \frac{\rho_{k,j}\,\tau_j\,\sigma_j(t)\,F_j^{\Delta t}(t)}{1 + \tau_j F_j^{\Delta t}(t)} \Delta t - \\ \frac{\sigma_k(t)^2}{2}\Delta t + \sigma_k(t)\left(Z_k(t + \Delta t) - Z_k(t)\right)$$ I do not see how the covariance matrix helps in a Monte Carlo simulation. I might be confusing concepts, so some help would be welcome.

For a swap, we have a sequence of re-setting and payment dates. The # of forward rates corresponding to the # of payment dates. For example, let us assume that we have $n$ payment dates $t_1, \ldots, t_n$, where $0< t_1 < \cdots < t_n$. Then there are $n$ forward rates.
During the simulation, for time steps prior to $t_1$, there exist $n$ "simultaneous" forward rates, corresponding to payment dates $t_1, \ldots, t_n$, while for time steps between $t_1$ and $t_2$, there exist $n-1$ "simultaneous" forward rates, corresponding to payment dates $t_2, \ldots, t_n$. For time steps between $t_{n-1}$ and $t_n$, there is only a single forward rate that corresponds to the last payment date $t_n$.
Because of the existence of these "simultaneous" forward rates, except for the time steps between $t_{n-1}$ and $t_n$, the Cholesky decomposition of the correlation matrix between the driving Brownian motions of the existing forward rate dynamics is needed. That is how the covariance matrix come into play in the Monte Carlo simulation.