Permalink
Please
sign in to comment.
Showing
with
14,531 additions
and 0 deletions.
- +10 −0 .codecov.yml
- +15 −0 .coveragerc
- +18 −0 .gitignore
- +40 −0 .travis.yml
- +660 −0 LICENSE.md
- +19 −0 README.md
- +40 −0 backtesting/__init__.py
- +599 −0 backtesting/_plotting.py
- +135 −0 backtesting/_util.py
- +64 −0 backtesting/autoscale_cb.js
- +987 −0 backtesting/backtesting.py
- +309 −0 backtesting/lib.py
- +5,001 −0 backtesting/test/EURUSD.csv
- +2,149 −0 backtesting/test/GOOG.csv
- +23 −0 backtesting/test/__init__.py
- +512 −0 backtesting/test/_test.py
- +13 −0 doc/README.md
- +86 −0 doc/build.sh
- +20 −0 doc/deploy.sh
- +676 −0 doc/examples/Multiple Time Frames.ipynb
- +172 −0 doc/examples/Multiple Time Frames.py
- +906 −0 doc/examples/Parameter Heatmap.ipynb
- +152 −0 doc/examples/Parameter Heatmap.py
- +891 −0 doc/examples/Quick Start User Guide.ipynb
- +186 −0 doc/examples/Quick Start User Guide.py
- +540 −0 doc/examples/Strategies Library.ipynb
- +101 −0 doc/examples/Strategies Library.py
- +9 −0 doc/ipython_config.py
- +14 −0 doc/pdoc_template/config.mako
- +10 −0 doc/pdoc_template/credits.mako
- +28 −0 doc/pdoc_template/head.mako
- +5 −0 doc/pdoc_template/logo.mako
- BIN logo.png
- +29 −0 logo.py
- +112 −0 setup.py
| @@ -0,0 +1,10 @@ | |||
| coverage: | |||
| range: 75..95 | |||
| precision: 0 | |||
| status: | |||
| patch: | |||
| default: | |||
| target: '95' | |||
| project: | |||
| default: | |||
| target: auto | |||
| @@ -0,0 +1,15 @@ | |||
| [run] | |||
| parallel = 1 | |||
| concurrency = | |||
| multiprocessing | |||
| source = | |||
| backtesting | |||
| doc/examples | |||
| omit = | |||
|
|
|||
| [report] | |||
| exclude_lines = | |||
| return | |||
| raise | |||
| except | |||
| warnings.warn | |||
| @@ -0,0 +1,18 @@ | |||
| *.py[cod] | |||
| *.html | |||
| *.png | |||
| _version.py | |||
|
|
|||
| *.egg-info | |||
| __pycache__/* | |||
| dist/* | |||
|
|
|||
| .coverage | |||
| .coverage.* | |||
| htmlcov/* | |||
|
|
|||
| doc/build/* | |||
|
|
|||
| .idea/* | |||
| **/.ipynb_checkpoints | |||
| *~* | |||
| @@ -0,0 +1,40 @@ | |||
| language: python | |||
| dist: trusty | |||
| sudo: false | |||
| cache: | |||
| pip: true | |||
|
|
|||
| matrix: | |||
| fast_finish: true | |||
| include: | |||
| - python: '3.5' | |||
| - python: '3.7' | |||
|
|
|||
| - python: '3.6' | |||
| name: 'Lint, Test w/ Coverage' | |||
| before_script: | |||
| - pip install flake8 coverage | |||
| script: | |||
| - flake8 --max-line-length=120 --exclude doc/examples . | |||
| - BOKEH_BROWSER=none catchsegv coverage run setup.py test | |||
| after_success: | |||
| - bash <(curl -s https://codecov.io/bash) | |||
|
|
|||
| - python: '3.6' | |||
| name: 'Docs' | |||
| stage: deploy | |||
| install: | |||
| - pip install .[doc] | |||
| script: | |||
| - doc/build.sh | |||
| after_success: | |||
| - if [ "$TRAVIS_BRANCH" = "$TRAVIS_TAG" ]; then bash doc/deploy.sh; fi | |||
|
|
|||
| before_install: | |||
| - set -eu | |||
|
|
|||
| install: | |||
| - pip install . | |||
|
|
|||
| script: | |||
| - time catchsegv python setup.py test | |||
| @@ -0,0 +1,19 @@ | |||
| Backtesting.py | |||
| ============== | |||
| Backtest trading strategies with Python. | |||
|
|
|||
| [](https://travis-ci.org/kernc/backtesting.py) | |||
| [](https://codecov.io/gh/kernc/backtesting.py) | |||
| [](https://pypi.org/project/backtesting/) | |||
|
|
|||
| [**Project website**](https://kernc.github.io/backtesting.py/) | |||
|
|
|||
| [Documentation](https://kernc.github.io/backtesting.py/doc/backtesting/) | |||
|
|
|||
| Development | |||
| ----------- | |||
| Fork the project. Then: | |||
|
|
|||
| git clone git@github.com:YOUR_USERNAME/backtesting.py | |||
| cd backtesting.py | |||
| pip3 install -e .[doc] | |||
| @@ -0,0 +1,40 @@ | |||
| """ | |||
| # Backtesting.py Documentation | |||
| ## Manuals | |||
| * [Quick Start User Guide](../examples/Quick Start User Guide.html) | |||
| ## Tutorials | |||
| * [Library of Utilities and Composable Base Strategies](../examples/Strategies Library.html) | |||
| * [Multiple Time Frames](../examples/Multiple Time Frames.html) | |||
| * [Parameter Heatmap](../examples/Parameter Heatmap.html) | |||
| You can also [try these out] live. | |||
| [try these out]: https://mybinder.org/v2/gh/kernc/backtesting.py/master?urlpath=lab%2Ftree%2Fdoc%2Fexamples | |||
| ## Example Strategies | |||
| * (contributions welcome) | |||
| ## License | |||
| This software is licensed under the terms of [AGPL 3.0], | |||
| meaning you can use it for any reasonable purpose and remain in | |||
| complete ownership of all the excellent trading strategies you produce, | |||
| but you are also encouraged to make sure any upgrades to `backtesting` | |||
| itself find their way back to the community. | |||
| [AGPL 3.0]: https://www.gnu.org/licenses/agpl-3.0.html | |||
| # API Reference Documentation | |||
| """ | |||
| try: | |||
| from ._version import version as __version__ # noqa: F401 | |||
| except ImportError: | |||
| pass # Package not installed | |||
|
|
|||
| from .backtesting import Backtest, Strategy, Orders, Position # noqa: F401 | |||
| from . import lib # noqa: F401 | |||
Oops, something went wrong.
0 comments on commit
b1066f1