You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: notebooks/applications/volatility_surface.md
+28-11Lines changed: 28 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,14 @@ jupytext:
6
6
format_version: 0.13
7
7
jupytext_version: 1.16.6
8
8
kernelspec:
9
-
display_name: Python 3 (ipykernel)
9
+
display_name: .venv
10
10
language: python
11
11
name: python3
12
12
---
13
13
14
14
# Volatility Surface
15
15
16
-
In this notebook we illustrate the use of the Volatility Surface tool in the library. We use [deribit](https://docs.deribit.com/) options on BTCUSD as example.
16
+
In this notebook we illustrate the use of the Volatility Surface tool in the library. We use [deribit](https://docs.deribit.com/) options on ETHUSD as example.
17
17
18
18
First thing, fetch the data
19
19
@@ -28,7 +28,7 @@ Once we have loaded the data, we create the surface and display the term-structu
28
28
29
29
```{code-cell} ipython3
30
30
vs = loader.surface()
31
-
vs.maturities = vs.maturities[1:]
31
+
vs.maturities = vs.maturities
32
32
vs.term_structure()
33
33
```
34
34
@@ -58,7 +58,22 @@ df
58
58
The plot function is enabled only if [plotly](https://plotly.com/python/) is installed
Copy file name to clipboardExpand all lines: notebooks/models/poisson.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,16 +19,16 @@ The most common process is the Poisson process.
19
19
20
20
## Poisson Process
21
21
22
-
The Poisson Process $N_t$ with intensity parameter $\lambda > 0$ is a Lévy process with values in $N$ such that each $N_t$ has a [Poisson distribution](https://en.wikipedia.org/wiki/Poisson_distribution) with parameter $\lambda t$, that is
22
+
The Poisson Process $n_t$ with intensity parameter $\lambda > 0$ is a Lévy process with values in ${\mathbb N}$ such that each $n_t$ has a [Poisson distribution](https://en.wikipedia.org/wiki/Poisson_distribution) with parameter $\lambda t$, that is
Copy file name to clipboardExpand all lines: notebooks/reference/glossary.md
+16-6Lines changed: 16 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,20 +15,30 @@ kernelspec:
15
15
16
16
## Characteristic Function
17
17
18
-
The characteristic function of a random variable $X$ is the Fourier transform of $f_X$, where $f_X$ is the probability density function
19
-
of $X$
18
+
The [characteristic function](../theory/characteristic.md) of a random variable $x$ is the Fourier transform of ${\mathbb P}_x$,
19
+
where ${\mathbb P}_x$ is the distrubution measure of $x$.
20
+
20
21
\begin{equation}
21
-
\Phi_{X,u} = {\mathbb E}\left[e^{i u X_t}\right] = \int e^{i u x} f_X\left(x\right) dx
22
+
\Phi_{x,u} = {\mathbb E}\left[e^{i u x}\right] = \int e^{i u s} {\mathbb P}_x\left(d s\right)
22
23
\end{equation}
23
24
25
+
If $x$ is a continuous random variable, than the characteristic function is the Fourier transform of the PDF $f_x$.
26
+
27
+
\begin{equation}
28
+
\Phi_{x,u} = {\mathbb E}\left[e^{i u x}\right] = \int e^{i u s} f_x\left(s\right) ds
29
+
\end{equation}
30
+
31
+
24
32
## Cumulative Distribution Function (CDF)
25
33
26
34
The cumulative distribution function (CDF), or just distribution function,
27
-
of a real-valued random variable $X$ is the function given by
35
+
of a real-valued random variable $x$ is the function given by
28
36
\begin{equation}
29
-
F_X(x) = P(X \leq x)
37
+
F_x(s) = {\mathbb P}_x(x \leq s)
30
38
\end{equation}
31
39
40
+
where ${\mathbb P}_x$ is the distrubution measure of $x$.
41
+
32
42
## Hurst Exponent
33
43
34
44
The Hurst exponent is a measure of the long-term memory of time series. The Hurst exponent is a measure of the relative tendency of a time series either to regress strongly to the mean or to cluster in a direction.
@@ -66,5 +76,5 @@ The [probability density function](https://en.wikipedia.org/wiki/Probability_den
66
76
(PDF), or density, of a continuous random variable, is a function that describes the relative likelihood for this random variable to take on a given value. It is related to the CDF by the formula
Copy file name to clipboardExpand all lines: notebooks/theory/characteristic.md
+20-6Lines changed: 20 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,13 +13,14 @@ kernelspec:
13
13
14
14
# Characteristic Function
15
15
16
-
The library makes heavy use of characteristic function concept and therefore, it is useful to familiarize with it.
16
+
The library makes heavy use of [characteristic function](https://en.wikipedia.org/wiki/Characteristic_function_(probability_theory))
17
+
concept and therefore, it is useful to familiarize with it.
17
18
18
19
## Definition
19
20
20
-
The characteristic function of a random variable $x$ is the Fourier (inverse) transform of $P^x$, where $P^x$ is the distrubution measure of $x$
21
+
The characteristic function of a random variable $x$ is the Fourier (inverse) transform of ${\mathbb P}_x$, where ${\mathbb P}_x$ is the distrubution measure of $x$
21
22
\begin{equation}
22
-
\Phi_{x,u} = {\mathbb E}\left[e^{i u x_t}\right] = \int e^{i u x} P^x\left(dx\right)
23
+
\Phi_{x,u} = {\mathbb E}\left[e^{i u x}\right] = \int e^{i u s} {\mathbb P}_x\left(ds\right)
23
24
\end{equation}
24
25
25
26
## Properties
@@ -30,6 +31,7 @@ The characteristic function of a random variable $x$ is the Fourier (inverse) tr
30
31
* it is continuous
31
32
* characteristic function of a symmetric random variable is real-valued and even
where the **characteristicexponent** $\phi_{x_1,u}$ is given by the [Lévy–Khintchine formula](https://en.wikipedia.org/wiki/L%C3%A9vy_process).
37
+
where the [](characteristic-exponent) $\phi_{x_1,u}$ is given by the [Lévy–Khintchine formula](https://en.wikipedia.org/wiki/L%C3%A9vy_process).
38
38
39
-
There are several Lévy processes in the literature, including, importantly, the [Poisson process](../models/poisson.md), the compound Poisson process, and the Brownian motion.
39
+
There are several Lévy processes in the literature, including, the [Poisson process](../models/poisson.md), the compound Poisson process
0 commit comments