Skip to content

Commit

Permalink
updated montecarlo
Browse files Browse the repository at this point in the history
  • Loading branch information
victorballester7 committed Nov 16, 2023
1 parent 6dbd814 commit 94fd828
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 16 deletions.
30 changes: 15 additions & 15 deletions Mathematics/4th/Stochastic_processes/Stochastic_processes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,9 @@
p_{ij}^{(n+1)} & =\Prob(X_{n+1}=j\mid X_0=i) \\
& =\sum_{k\in I}\Prob(X_{n+1}=j, X_n=k\mid X_0=i) \\
\begin{split}
&=\sum_{k\in I}\Prob(X_{n}=k\mid X_0=i)\cdot\\
&\hspace{2.5cm}\cdot\Prob(X_{n+1}=j\mid X_n=k, X_0=i)
\end{split} \\
& =\sum_{k\in I}\Prob(X_{n}=k\mid X_0=i)\cdot \\
& \hspace{2.5cm}\cdot\Prob(X_{n+1}=j\mid X_n=k, X_0=i)
\end{split} \\
& =\sum_{k\in I}p_{ik}^{(n)}p_{kj}^{(1)}
\end{align*}
where the penultimate equality follows from \mcref{SP:lema1Markov} and the last equality follows from \mcref{SP:lema2Markov} and the Markov property because if $D=\{X_n=k, X_0=i\}$ we have that:
Expand Down Expand Up @@ -589,10 +589,10 @@
where $A=\{X_0=i,X_1\ne i, \ldots, X_{m_1-1}\ne i,X_{m_1}=i, X_{m_1+1}\ne i,\ldots, X_{m_1+\cdots+m_{\ell-1}}=i\}$. So, by the \mnameref{SP:substitutionPrinciple} we have:
\begin{align*}
\begin{split}
p_\ell&=\Prob_i(X_{m_1+\cdots+m_\ell}=i,X_{m_1+\cdots+m_\ell-1}\ne i,\ldots,\\
&\hspace{4cm}X_{m_1+\cdots+m_{\ell-1}+1}\ne i\mid A)
p_\ell & =\Prob_i(X_{m_1+\cdots+m_\ell}=i,X_{m_1+\cdots+m_\ell-1}\ne i,\ldots, \\
& \hspace{4cm}X_{m_1+\cdots+m_{\ell-1}+1}\ne i\mid A)
\end{split} \\
& =\Prob_i(X_{m_\ell}=i,X_{m_\ell-1}\ne i,\ldots,X_{1}\mid X_{0}=i) \\
& =\Prob_i(X_{m_\ell}=i,X_{m_\ell-1}\ne i,\ldots,X_{1}\mid X_{0}=i) \\
& =\Prob(\tau_i=m_\ell)
\end{align*}
\end{proof}
Expand Down Expand Up @@ -652,14 +652,14 @@
\begin{proof}
Note that $\{X_n=j\}\subseteq \{\tau_j\leq n\}=\bigsqcup_{m=1}^n\{\tau_j=m\}$. Hence, $\{X_n=j\}=\bigsqcup_{m=1}^n[\{X_n=j\}\cap \{\tau_j=m\}]$. Thus:
\begin{align*}
p_{ij}^{(n)} & =\Prob_i(X_n=j) \\
& =\sum_{m=1}^n \Prob_i(X_n=j,\tau_j=m) \\
& =\sum_{m=1}^n \Prob_i(X_n=j\mid\tau_j=m)\Prob_i(\tau_j=m) \\
p_{ij}^{(n)} & =\Prob_i(X_n=j) \\
& =\sum_{m=1}^n \Prob_i(X_n=j,\tau_j=m) \\
& =\sum_{m=1}^n \Prob_i(X_n=j\mid\tau_j=m)\Prob_i(\tau_j=m) \\
\begin{split}
& =\sum_{m=1}^n \Prob_i(X_n=j\mid X_m=j,X_{m-1}\ne j,\ldots, X_1\ne j)\cdot \\
&\hspace{7cm}\cdot f_{ij}^{(m)}
& =\sum_{m=1}^n \Prob_i(X_n=j\mid X_m=j,X_{m-1}\ne j,\ldots, X_1\ne j)\cdot \\
& \hspace{7cm}\cdot f_{ij}^{(m)}
\end{split} \\
& =\sum_{m=1}^n \Prob_j(X_{n-m}=j)f_{ij}^{(m)} \\
& =\sum_{m=1}^n \Prob_j(X_{n-m}=j)f_{ij}^{(m)} \\
& =\sum_{m=1}^nf_{ij}^{(m)}p_{jj}^{(n-m)}
\end{align*}
\end{proof}
Expand Down Expand Up @@ -926,9 +926,9 @@
\begin{align*}
p_{ij}(t+s) & =\sum_{k\in I} \Prob(X_{t+s}=j,X_s=k\mid X_0=i) \\
\begin{split}
& =\sum_{k\in I} \Prob(X_{t+s}=j\mid X_s=k,X_0=i)\cdot\\
&\hspace{3.5cm}\cdot\Prob(X_s=k\mid X_0=i) \\
\end{split} \\
& =\sum_{k\in I} \Prob(X_{t+s}=j\mid X_s=k,X_0=i)\cdot \\
& \hspace{3.5cm}\cdot\Prob(X_s=k\mid X_0=i) \\
\end{split} \\
& =\sum_{k\in I} p_{ik}(t)p_{kj}(s)
\end{align*}
\end{proof}
Expand Down
33 changes: 32 additions & 1 deletion Mathematics/5th/Montecarlo_methods/Montecarlo_methods.tex
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,44 @@
\begin{itemize}
\item $\vf{b},\vf\sigma\in\mathcal{C}^3$ with bounded derivatives and $\vf\sigma$ uniformly elliptic.
\item $D$ is a half-space or $\Fr{D}$ is bounded of class $\mathcal{C}^3$.
\item $g$ is measurable with polynomial growth and vanishes at a neighbourhood of $\Fr{D}$.
\item $g$ is measurable with polynomial growth and vanishes at a neighborhood of $\Fr{D}$.
\end{itemize}
Then:
$$
\Exp\left(\indi{\tau>T}g(X_T) \right)-\Exp(\indi{\tilde\tau^m>T} g(\tilde{X}^m_T))=\O{\frac{1}{\sqrt{m}}}
$$
where $\tilde\tau^m:=\min\{ t_i: \tilde{X}^m_{t_i}\notin D\}$ and $\tilde{X}^m$ is the Euler scheme.
\end{proposition}
\begin{proposition}
Assume that:
\begin{itemize}
\item $\vf{b},\vf\sigma\in\mathcal{C}^5$ with bounded derivatives and $\vf\sigma$ uniformly elliptic.
\item $D$ is a half-space or $\Fr{D}$ is bounded of class $\mathcal{C}^5$.
\item $g$ is measurable with polynomial growth and vanishes at a neighborhood of $\Fr{D}$.
\end{itemize}
Then:
$$
\Exp\left(\indi{\tau>T}g(X_T) \right)-\Exp(\indi{\tau^m>T} g(\tilde{X}^m_T))=\O{\frac{1}{m}}
$$
\end{proposition}
\begin{proposition}
Assume that $\mathcal{D}$ is a half-space with hyperplane orthogonal to $\vf\nu\in\RR^d$ passing by $\vf{z}\in\RR^d$, i.e.:
$$
\mathcal{D}=\{ \vf{y}\in\RR^d : \transpose{\vf\nu}(\vf{y}-\vf{z})>0\}
$$
If $\vf{x}_i,\vf{x}_{i+1}\in \mathcal{D}$, then:
\begin{multline*}
\Prob(\exists t\in [t_i,t_{i+1}], \tilde{X}_t^m\notin\mathcal{D}:\tilde{X}_{t_i}^m=\vf{x}_i, \tilde{X}_{t_{i+1}}^m=\vf{x}_{i+1})=\\=\exp{
-2\frac{m}{T}\frac{\transpose{\vf\nu}(\vf{x}_{i}-\vf{z})\transpose{\vf\nu}(\vf{x}_{i+1}-\vf{z})}{\norm{\transpose{\vf\sigma(\vf{x}_i)}\vf\nu}^2}
}
\end{multline*}
\end{proposition}
\begin{lemma}
Let ${(B_t)}_{t\geq 0}$ be a Brownian motion. Then, $\forall a\leq 0$ and $b\geq a$ we have:
$$
\Prob\left(\min_{t\in[0,h]}B_t\leq a\mid B_h=b\right)=\exp{-\frac{2}{h}a(a-b)}
$$
\end{lemma}
\subsection{Computation of sensitivities}
\end{multicols}
\end{document}

0 comments on commit 94fd828

Please sign in to comment.