Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
deleted 135 characters in body
Source Link

Hi I want to model the G2++ short rate modeltwo stochastic integrals in Matlab, which is given by $ r(t) = x(t) + y(t) + \varphi(t),r(0) = r_0$ with $\\\\$$ x(t) = x(s) e^{-a(t-s)} + \sigma \int_s^t e^{-a(t-u)} dW_1(u)$

$dx(t) = -a x(t) dt + \sigma dW_1(t), x(0) = 0 \\ dy(t) = -by(t) dt + \eta dW_2(t), y(0) = 0 $
$\\\\$$y(t) = y(s) e^{-b(t-s)} + \eta \int_s^t e^{-b(t-u)} dW_2(u)$

Integrating leads to $\\\\$with

$r(t) = x(s) e^{-a(t-s)} + y(s) e^{-b(t-s)} + \sigma \int_s^t e^{-a(t-u)} dW_1(u) + \eta \int_s^t e^{-b(t-u)} dW_2(u) + \varphi(t)$ $\\\\$$E[x(t) \vert F_s] = x(s) e^{-a(t-s)}$

Furthermore we have$Var[x(t) \vert F_s] = \frac{\sigma^2}{2a} [1-e^{-2a(t-s)}]$

The dynamics are given thatby $r(t)$ is normally distributed and we know its conditional mean and variance. Hence we also know:

$E[x(t) \vert F_s]$ and $Var[x(t) \vert F_s]$ and respectively for $y(t)$.$dx(t) = -a x(t) dt + \sigma dW_1(t), x(0) = 0 \\ dy(t) = -by(t) dt + \eta dW_2(t), y(0) = 0 $
$\\\\$

I want to implement this in Matlab without using the dynamics but the stochastic integral and the distribution property. I want to model paths for x(t) and y(t)

Questions:We have

  1. Is modelling the dynamics for $dx(t)$ and $dy(t)$ the same as if I model $x(t)$ and $y(t)$ given $E[x(t) \vert F_s]$ and $Var[x(t) \vert F_s]$ ?

  2. How to model x(t) with the process $x(t) = x(s) e^{-a(t-s)} + \sigma \int_s^t e^{-a(t-u)} dW_1(u)$ given its conditional expectation and variance.

$x(1) \sim N\left(x(0)e^{-at}, \frac{\sigma^2}{2a} [1-e^{-2at} \right)$

$x(2) \sim N\left(x(0)e^{-a(t-1)}, \frac{\sigma^2}{2a} [1-e^{-2a(t-1)} \right)$ .......

Knowing the distribution for each $t$, how can I model $x(t)$ for each $t$

Hi I want to model the G2++ short rate model in Matlab, which is given by $ r(t) = x(t) + y(t) + \varphi(t),r(0) = r_0$ with $\\\\$

$dx(t) = -a x(t) dt + \sigma dW_1(t), x(0) = 0 \\ dy(t) = -by(t) dt + \eta dW_2(t), y(0) = 0 $
$\\\\$

Integrating leads to $\\\\$

$r(t) = x(s) e^{-a(t-s)} + y(s) e^{-b(t-s)} + \sigma \int_s^t e^{-a(t-u)} dW_1(u) + \eta \int_s^t e^{-b(t-u)} dW_2(u) + \varphi(t)$ $\\\\$

Furthermore we have given that $r(t)$ is normally distributed and we know its conditional mean and variance. Hence we also know

$E[x(t) \vert F_s]$ and $Var[x(t) \vert F_s]$ and respectively for $y(t)$.

I want to implement this in Matlab. I want to model paths for x(t) and y(t)

Questions:

  1. Is modelling the dynamics for $dx(t)$ and $dy(t)$ the same as if I model $x(t)$ and $y(t)$ given $E[x(t) \vert F_s]$ and $Var[x(t) \vert F_s]$ ?

  2. How to model x(t) with the process $x(t) = x(s) e^{-a(t-s)} + \sigma \int_s^t e^{-a(t-u)} dW_1(u)$ given its conditional expectation and variance.

Hi I want to model two stochastic integrals in Matlab, which is given by $ x(t) = x(s) e^{-a(t-s)} + \sigma \int_s^t e^{-a(t-u)} dW_1(u)$

$y(t) = y(s) e^{-b(t-s)} + \eta \int_s^t e^{-b(t-u)} dW_2(u)$

with

$E[x(t) \vert F_s] = x(s) e^{-a(t-s)}$

$Var[x(t) \vert F_s] = \frac{\sigma^2}{2a} [1-e^{-2a(t-s)}]$

The dynamics are given by :

$dx(t) = -a x(t) dt + \sigma dW_1(t), x(0) = 0 \\ dy(t) = -by(t) dt + \eta dW_2(t), y(0) = 0 $
$\\\\$

I want to implement this in Matlab without using the dynamics but the stochastic integral and the distribution property. I want to model paths for x(t) and y(t)

We have

$x(1) \sim N\left(x(0)e^{-at}, \frac{\sigma^2}{2a} [1-e^{-2at} \right)$

$x(2) \sim N\left(x(0)e^{-a(t-1)}, \frac{\sigma^2}{2a} [1-e^{-2a(t-1)} \right)$ .......

Knowing the distribution for each $t$, how can I model $x(t)$ for each $t$

Source Link

Modelling interest rate

Hi I want to model the G2++ short rate model in Matlab, which is given by $ r(t) = x(t) + y(t) + \varphi(t),r(0) = r_0$ with $\\\\$

$dx(t) = -a x(t) dt + \sigma dW_1(t), x(0) = 0 \\ dy(t) = -by(t) dt + \eta dW_2(t), y(0) = 0 $
$\\\\$

Integrating leads to $\\\\$

$r(t) = x(s) e^{-a(t-s)} + y(s) e^{-b(t-s)} + \sigma \int_s^t e^{-a(t-u)} dW_1(u) + \eta \int_s^t e^{-b(t-u)} dW_2(u) + \varphi(t)$ $\\\\$

Furthermore we have given that $r(t)$ is normally distributed and we know its conditional mean and variance. Hence we also know

$E[x(t) \vert F_s]$ and $Var[x(t) \vert F_s]$ and respectively for $y(t)$.

I want to implement this in Matlab. I want to model paths for x(t) and y(t)

Questions:

  1. Is modelling the dynamics for $dx(t)$ and $dy(t)$ the same as if I model $x(t)$ and $y(t)$ given $E[x(t) \vert F_s]$ and $Var[x(t) \vert F_s]$ ?

  2. How to model x(t) with the process $x(t) = x(s) e^{-a(t-s)} + \sigma \int_s^t e^{-a(t-u)} dW_1(u)$ given its conditional expectation and variance.