em_bs

command
v0.0.0-...-8fb85de Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 8 Imported by: 0

README

How It Works

In this example, we solve the following SDE with the following approximation method.

SDE: Black-Scholes

X(t,x) = x + \int_0^t\mu X(s,x)\,ds+\int_0^t\sigma X(s,x)\,dB(s),

where $x, \mu, \sigma\in\mathbb{R}$.

Method: Euler-Maruyama

Letting $\Delta t>0$ and $n\in\mathbb{Z}_{>0}$ be specified, define $\widehat{X}(0,x):=x$ and

\widehat{X}(t_{k}, x) := \widehat{X}(t_{k-1}, x)
+ \mu \widehat{X}(t_{k-1}, x)\,\Delta t + \sigma \widehat{X}(t_{k-1}, x)\, \sqrt{\Delta t}\,Z_{k},

for $k=1,2,\cdots,n$. Here, $t_{k}=\frac{k}{n}t$ and $Z_{k}$, $k=1,\cdots,n$ are i.i.d. standard normal random variables.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL