28 Commits

Author SHA1 Message Date
Kernc
d5db8bed50 CI: Pin scikit-learn<=1.1.3 due to broken scikit-optimize 2022-12-12 19:29:25 +01:00
Kernc
e4b16f9a5a CI: Pin ruff==0.0.160 until it stabilizes 2022-12-12 18:56:02 +01:00
Kernc
6ac0a215c2 MNT: Replace flake8 with ruff 2022-12-05 17:17:48 +01:00
Kernc
b8285d42bb DOC: Revise contributing/readme 2022-11-25 05:49:53 +01:00
Kernc
8b83b3541a BUG: Fix numpy.random generation in Backtest.optimize
Fixes https://github.com/kernc/backtesting.py/issues/500
2021-10-10 17:20:43 +02:00
Tony
6b33ce5287 ENH: Model-based optimization and randomized grid search (#154)
* initial commit

* initial commit

* added optimize_skopt to backtesting

* _optomize_skopt refactor

* made dimensions dynamic

* added unit test-apply PR comments

* added heatmap to skopt and update unit tests

* removed eggs folder

* remove egg folder

* fixed gitignore

* add scikit-optimize dependancy for test

* comment out pickle TRUE

* fixed flake8 errors

* added skopt to Parameter Heatmap notebook

* Revert unwanted changes

* Fixup .gitignore

* Reword docstring

* Refactor Backtest.optimize() code

* make Backtest.optimize() arguments kw-only
* add random_state for reproducible results
* ensure function arguments consistency
* ensure all kwargs have values
* make scikit-optimize package optional
* cast timedelta/datetime dimensions to int
* cache objective_function evaluations (avoid warning)
* ensure param combo matches constraint=
* adjust skopt.forest_minimize() params
* return ordering: stats, heatmap, optimize_result
* clean heatmap and optimize_result

* Make max_tries for method=grid be randomized search

* Update example notebook

* doc/build.sh: unescape URLs

* mypy happy

* minor restyle

* fix typo

* Add changelog entry

Co-authored-by: Tony Freeman <tfreeman@approachci.com>
Co-authored-by: Kernc <kerncece@gmail.com>
2020-11-24 03:28:36 +01:00
kernc
77b47b0645 MNT: Migrate Travis CI to GitHub Actions (#163)
* MNT: Migrate Travis CI to GitHub Actions

Travis has constant backlog and its build sometimes fails to fire.
Long live GH Actions! :/

* Copy deploying tags docs into a separate workflow

* fix yml: https://github.com/kernc/backtesting.py/actions/runs/332715564

* fix docs build with -e

* pip install wheel

* it's late

* Make test type a parameter, becasuse it's shown in the UI

* Remove Py3.9 testing: It's new and weird

https://github.com/kernc/backtesting.py/runs/1318477083

* Fetch tags for correct __version__

* test deploy-docs workflow ...

* mark .github/deploy-gh-pages.sh executable

* give 'fetch tags' step a name

* goddamn debug

* set github-actions git credentials

* undo 'test deploy-docs workflow'

* DOC: Update 'Build: Passing' link in README

* MNT: Bump minimal Python to 3.6+ in setup.py

* DOC: Bump mentions to Python 3.6+

* move lint deps to setup.py [dev] group
2020-10-30 01:49:57 +01:00
Kernc
03340072d6 DOC: Add doc/examples/Trading with machine learning 2020-08-21 05:12:42 +02:00
Kernc
d1923eb58f MNT: setup.py, open long_description README.md as UTF-8
Fixes: https://github.com/kernc/backtesting.py/issues/121
2020-08-01 14:45:06 +02:00
Kernc
abbd1fae2e MNT: Bump Bokeh dependency to 1.4.0 for previous commit 2020-01-03 01:49:18 +01:00
Kernc
6c5b0c5a17 MNT: Build examples for jupytext >= 1.3 compat 2019-11-28 05:19:32 +01:00
Kernc
ccc762e4d0 MNT: Update setup.py keywords 2019-11-28 05:19:32 +01:00
Kernc
a46d72a635 BUG: Fix pandas insertion error on Windos
Fixes https://github.com/kernc/backtesting.py/issues/21
2019-10-01 04:46:20 +02:00
Kernc
5bcaafd6b3 ENH: Make plot span 100% of browser width by default 2019-09-23 03:56:21 +02:00
Kernc
a43ced9504 MNT: Fix setup.py warning 2019-09-23 03:17:46 +02:00
Kernc
0444313734 MNT: Pin pandas != 0.25.0
Refs: 6d9917c
Refs: https://github.com/kernc/backtesting.py/issues/14
2019-09-23 01:58:19 +02:00
Kernc
6d9917cf89 MNT: pin pandas below 0.25 to avoid bug https://github.com/kernc/backtesting.py/issues/14 2019-08-02 02:11:56 +02:00
Kernc
8e2bfb5322 MNT: Pin pandas >= 0.21.0 for TestOptimize.test_optimize_invalid_param 2019-07-02 17:56:52 +02:00
Kernc
d7c1328d2c MNT: Require pandas >= 0.20.0
Fixes https://github.com/kernc/backtesting.py/issues/7
2019-06-25 14:19:05 +02:00
Kernc
a7d1d4f3fa MNT: Adapt examples for updated jupytext behavior 2019-03-01 17:27:27 +01:00
Kernc
74f0f9b8de MNT: tests need matplotlib, doc/build needs pdoc3 2019-01-12 10:38:28 +01:00
Kernc
08028591ac MNT: Add setuptools.setup(project_urls=) 2019-01-09 09:26:55 +01:00
Kernc
fdc1185b79 MNT: Make module backtesting.test runnable 2019-01-08 07:00:37 +01:00
Kernc
cc4ef27726 Add CONTRIBUTING.md 2019-01-07 15:13:34 +01:00
Kernc
3aa3c01126 setup.py: nbconvert requires jupyter_client and ipykernel 2019-01-07 14:11:42 +01:00
Kernc
0917c25811 setup.py: List packages and include_package_data=True
Gotta remember that even with setuptools_git,
these are non-optional!
2019-01-07 14:11:42 +01:00
Kernc
959182d4f9 setup.py: List 'seaborn' as 'test' dependency
Used in Parameter\ Heatmap.ipynb
2019-01-07 14:11:41 +01:00
Kernc
b1066f16fb Add initial Backtesting.py (squashed dev branch) 2019-01-07 14:11:40 +01:00