Fat Tails
Python package and Jupyter notebooks for fat-tailed statistics. Inspired by Nassim Taleb's Technical Incerto.
Content
Notebooks
See the notebooks/README.md for more detail.
My favourite notebooks so far:
- Central Limit Theorem: How the sum of Uniform values is Gaussian
- S&P500: How geometric average return is impossible
- GameStop: January 2021 was not an outlier if you assume Power Law tails.
Functions
Quick Access:
fattails.mad(): Calculates mean absolute deviation.fattails.plot_MS_moments(): Plots the cumulative max/sum ratio of moments 1 to 4.
Other:
fattails.metrics.get_survival_probability(): Calculate survival probabilities for a given dataset.fattails.metrics.calculate_moments(): Generate dataframe with the chosen moments for each datapointfattails.metrics.max_over_sum(): Calculate the cumulative max/sum ratio
Example:
$ pip install fattails
$ python
>>> import fattails
>>>
>>>
>>> fattails.mad([1,2,3]) # Calculate Mean Absolute Deviation of [1,2,3]
0.6666666666666666
>>>
>>>
>>> fattails.metrics.get_survival_probability([1,2,3]) # Get survival probability for each value in your data
0 0.75
1 0.50
2 0.25
Name: survival_probability, dtype: float64
Derivations
Contact
Jump straight to discussions or check out the contributing guidelines. Feedback and suggestions are really appreciated!
Contributors
Special thanks to:
- Daniel Reti: github.com/drettt
External Resources
Technical Incerto Book One:
- Free PDF: researchers.one, arxiv.org
- Errata: fooledbyrandomness.com
More Links:
- Incerto Reading Club: Website, GitHub
StatisticalConsequencesOfFatTails: Code and Links collected by Marcos Carreira
Metadata
Release files for fattails 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fattails-0.0.4.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fattails-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.6 kB
Release files / fattails-0.0.4.tar.gz
| Download URL | fattails-0.0.4.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dee555f8b949f0031ba8cea42e158fb3cc0c02ccfa0a08adac96f263b2472a56
|
|
BLAKE2b-256 checksum How to use checksums |
975ad508553ba7c2eb7d89c98b99b4b7b81b77c6d00050e88a945058011adfb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.1.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5
|
Release files / fattails-0.0.4-py3-none-any.whl
| Download URL | fattails-0.0.4-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f3afb6c5abda11877a2f0b2cdb07be187e94cb1e49204c05149cc19bf3c52f69
|
|
BLAKE2b-256 checksum How to use checksums |
d37dde6f646829d5d97ae5f89d1604a89c945ab2e6f1eb571be8f477b9fe1d99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.1.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5
|