1
0
mirror of https://github.com/polakowo/vectorbt.git synced 2022-03-22 01:31:39 +03:00

Build new documentation

This commit is contained in:
Oleg Polakow
2021-12-30 16:13:03 +01:00
parent 0a0077e42e
commit 6228c72fa2
189 changed files with 6326 additions and 7037 deletions

View File

@@ -12,9 +12,9 @@ omit =
*/px_accessors.py
*/utils/colors.py
*/utils/figure.py
*/utils/image.py
*/utils/module.py
*/utils/requests.py
*/utils/image_.py
*/utils/module_.py
*/utils/requests_.py
*/generic/plotting.py
*/generic/plots_builder.py
*/data/custom.py

4
.gitignore vendored
View File

@@ -4,5 +4,5 @@ __pycache__
.idea
.mypy_cache
.pytest_cache
pipeline.yaml
Untitled.ipynb
docs/docs/api
docs/site

View File

@@ -1,91 +0,0 @@
test: &test
stage: test
language: python
install:
- ./scripts/install-talib.sh
- pip install .[full]
script:
- export NUMBA_BOUNDSCHECK=1
- pytest tests/
- export NUMBA_DISABLE_JIT=1
- pytest tests/
jobs:
include:
- <<: *test
python: "3.6"
- <<: *test
python: "3.7"
- <<: *test
python: "3.8"
- <<: *test
python: "3.9"
- stage: test-cov
language: python
python: "3.6"
install:
- ./scripts/install-talib.sh
- pip install .[full,cov]
script:
- export NUMBA_BOUNDSCHECK=1
- export NUMBA_DISABLE_JIT=1
- pytest --cov=vectorbt tests/
after_success:
- codecov
- stage: deploy-pypi
language: python
python: "3.6"
script: skip
deploy:
- provider: pypi
skip_existing: true
username: "__token__"
password:
secure: k+1Rs3iUivAanltzMx+SrMoXOv6dvsY2kxzCbLUN2vD3umaM2b6UECbnGnYEb3Y0Mmj0mxu37k9znvOSvbLsXYTZqk7KBFy9XPI+b6tSj7u7O+GlTAZta6VixnsZWlyuwUIbPTcNd82HqfLbhU/pOo9ZNzWDhg37LASKrIz//orJoJjYGfAEDU9u8BA7k7pcCcGp5N1a7O5Ab5Ecko5Q993oyxi+ernU/HBmvW6XZHKwub3TFXzUJBMeiCMVUtRdlEEteG32ydHcX2F+gKjLRQNE0hXicqUERyQ65ceCJlks+pgpCsvu9snR4MniKTfolZrrK4b8BRQ1S7OEk32qZ9ldOcjpVCruEyz8PxEGuAVU7J817tn6QjZdA5EBWg3RXnxZAcqyyNtFd1KK6hMfvUmQkgAeyG8UGP8XP9vmf8bqJnYAPhwCAavCcc6SHM72MF8WIOb5Lbgw39toFwNgPJAZUCWBRA7In2vP9Z1WC7HK3bcRmdIjZVAs2N55yFsQHOw6DO0sJwjmFyxgsG92K0hZ4rftRi2eRkq8JB6ZliFgUfjUlZrc8jTMB0pSDp2zzZaK/tj1lKFZ72f/jeS08B8g+34wNfhvfH8BW4fLkne2YuUKV9sPfaCPLUzN3odyVRLrpFetrwabBR7F/fg5N6VzpsxbUguQNXDBURrHlUo=
on:
branch: master
- stage: deploy-pages
language: python
python: "3.6"
install:
- ./scripts/install-talib.sh
- pip install .[full,docs]
script:
- pdoc --html --force --output-dir docs vectorbt --template-dir docs/templates
- rm -rf !(docs)
- mv docs/vectorbt/* docs
- rmdir docs/vectorbt
- mv docs/site/* .
- touch CNAME
- echo 'vectorbt.dev' > CNAME
- touch .nojekyll
deploy:
- provider: pages
skip_cleanup: true
github_token: "$GITHUB_TOKEN"
keep_history: true
on:
branch: master
- stage: deploy-docker
language: ruby
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t polakowo/vectorbt . --build-arg FULL=
- ./scripts/docker-push.sh "polakowo/vectorbt" "$(cat vectorbt/_version.py | cut -d '"' -f 2)"
- docker build -t polakowo/vectorbt-full . --build-arg FULL=yes --build-arg TEST=yes
- ./scripts/docker-push.sh "polakowo/vectorbt-full" "$(cat vectorbt/_version.py | cut -d '"' -f 2)"
stages:
- name: test
if: (type = pull_request) OR (commit_message =~ /(\[ci test\]|\[ci deploy\])/)
- name: test-cov
if: (type = pull_request) OR (commit_message =~ /(\[ci test\]|\[ci test-cov\]|\[ci deploy\])/)
- name: deploy-pypi
if: (type != pull_request) AND (commit_message =~ /(\[ci deploy-pypi\]|\[ci deploy\])/)
- name: deploy-pages
if: (type != pull_request) AND (commit_message =~ /(\[ci deploy-pages\]|\[ci deploy\])/)
- name: deploy-docker
if: (type != pull_request) AND (commit_message =~ /(\[ci deploy-docker\]|\[ci deploy\])/)
branches:
only:
- master

View File

@@ -1,6 +1,6 @@
<div align="center">
<br>
<img src="static/header.svg">
<img src="docs/docs/logo/header.svg">
<br>
</div>
<br>
@@ -11,8 +11,6 @@
<img src="https://img.shields.io/badge/license-Fair%20Code-yellow" /></a>
<a href="https://pypi.org/project/vectorbt" alt="PyPi">
<img src="https://img.shields.io/pypi/v/vectorbt?color=blueviolet" /></a>
<a href="https://app.travis-ci.com/github/polakowo/vectorbt" alt="Build Status">
<img src="https://app.travis-ci.com/polakowo/vectorbt.svg?branch=master" /></a>
<a href="https://codecov.io/gh/polakowo/vectorbt" alt="codecov">
<img src="https://codecov.io/gh/polakowo/vectorbt/branch/master/graph/badge.svg?token=YTLNAI7PS3" /></a>
<a href="https://vectorbt.dev/" alt="Website">
@@ -50,7 +48,7 @@ With vectorbt, you can
* Analyze time series and engineer new features for **ML models**
* Supercharge pandas and your favorite tools to run much faster
* Visualize strategy performance using **interactive charts and dashboards** (both in Jupyter and browser)
* Fetch and process data periodically, send Telegram notifications, and more
* Fetch and process data periodically, send Telegram notifications, and more :fire:
## Installation
@@ -196,7 +194,7 @@ fig = mean_expectancy.unstack().vbt.scatterplot(xaxis_title='randnx_n', yaxis_ti
fig.show()
```
![rand_scatter.svg](https://raw.githubusercontent.com/polakowo/vectorbt/master/static/rand_scatter.svg)
![rand_scatter.svg](https://raw.githubusercontent.com/polakowo/vectorbt/master/docs/docs/assets/usage_rand_scatter.svg)
* For fans of hyperparameter optimization: here is a snippet for testing 10,000 window combinations of a
dual SMA crossover strategy on BTC, USD, and LTC:
@@ -219,7 +217,7 @@ fig = pf.total_return().vbt.heatmap(
fig.show()
```
<img width="650" src="https://raw.githubusercontent.com/polakowo/vectorbt/master/static/dmac_heatmap.gif">
<img width="650" src="https://raw.githubusercontent.com/polakowo/vectorbt/master/docs/docs/assets/usage_dmac_heatmap.gif">
Digging into each strategy configuration is as simple as indexing with pandas:
@@ -265,7 +263,7 @@ The same for plotting:
pf[(10, 20, 'ETH-USD')].plot().show()
```
![dmac_portfolio.svg](https://raw.githubusercontent.com/polakowo/vectorbt/master/static/dmac_portfolio.svg)
![dmac_portfolio.svg](https://raw.githubusercontent.com/polakowo/vectorbt/master/docs/docs/assets/usage_dmac_portfolio.svg)
It's not all about backtesting - vectorbt can be used to facilitate financial data analysis and visualization.
@@ -299,7 +297,7 @@ vbt.save_animation('bbands.gif', bbands.wrapper.index, plot, bbands, delta=90, s
100%|██████████| 31/31 [00:21<00:00, 1.21it/s]
```
<img width="750" src="https://raw.githubusercontent.com/polakowo/vectorbt/master/static/bbands.gif">
<img width="750" src="https://raw.githubusercontent.com/polakowo/vectorbt/master/docs/docs/assets/usage_bbands.gif">
And this is just the tip of the iceberg of what's possible. Check out [Resources](#resources) to learn more.

1
docs/docs/CNAME Normal file
View File

@@ -0,0 +1 @@
vectorbt.dev

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

Before

Width:  |  Height:  |  Size: 404 KiB

After

Width:  |  Height:  |  Size: 404 KiB

View File

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

View File

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 30 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.1 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 28 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 584 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 832 KiB

After

Width:  |  Height:  |  Size: 832 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 MiB

After

Width:  |  Height:  |  Size: 5.3 MiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 5.7 MiB

After

Width:  |  Height:  |  Size: 5.7 MiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 306 KiB

After

Width:  |  Height:  |  Size: 306 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 186 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 MiB

After

Width:  |  Height:  |  Size: 3.1 MiB

View File

Before

Width:  |  Height:  |  Size: 5.4 MiB

After

Width:  |  Height:  |  Size: 5.4 MiB

View File

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -3,7 +3,7 @@
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
<TileColor>#ffffff</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,15 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" width="1000" height="1000"><rect width="1000" height="1000" rx="0" ry="0" fill="#ffffff"></rect><g transform="matrix(8.333333333333334,0,0,8.333333333333334,-5.684341886080802e-14,-5.684341886080802e-14)"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" width="120" height="120"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 120 120" style="enable-background:new 0 0 120 120;" xml:space="preserve">
<style type="text/css">
.st0{fill:#1E2029;stroke:#FFFFFF;stroke-width:0.25;stroke-miterlimit:10;}
.st1{fill:#1E2029;}
</style>
<path class="st0" d="M51.9,92.6"></path>
<path class="st1" d="M95,17.1"></path>
<path class="st1" d="M81.8,17.1"></path>
<path class="st1" d="M47.8,82.3"></path>
<polygon class="st1" points="95,10 79.7,10 60,48.4 64.8,68.8 "></polygon>
<g>
<path class="st1" d="M40.1,10H24.6l0,0l23.7,100h8.5h7l0,0L115,10H99.6c0,0-27.6,53.6-40.8,79.5C58.9,89.5,58.9,89.5,40.1,10z"></path>
</g>
<polygon class="st1" points="28.7,110 5,10 20.5,10 44.2,110 "></polygon>
</svg></svg></g></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Some files were not shown because too many files have changed in this diff Show More