Commit Graph

88 Commits

Author SHA1 Message Date
Kernc
55e03a40b3 REF: Strategy takes params in constructor 2020-03-09 01:14:53 +01:00
Kernc
51f1e65766 REF: Better check/test for invalid OHLC data 2020-03-09 01:08:51 +01:00
Kernc
d331eeb5cf DOC: Add Adsense to generated docs 2020-03-05 02:58:34 +01:00
Kernc
1cd2b10ebe MNT: Have pdoc also exclude lib.*Strategy non-public constructor 2020-03-04 05:24:12 +01:00
Kernc
73f893145e BUG: Compute drawdown in a vectorized manner
Fixes https://github.com/kernc/backtesting.py/issues/46
2020-03-04 04:27:40 +01:00
Kernc
25e2e2fdc6 BUG: Don't fail on deciding whether to overlay non-numeric indicators 2020-03-01 03:46:36 +01:00
Kernc
70cd9b3119 BUG: Fix plot saving to filename regression since ab0cbe537e
The plot would save to filename even when run in notebook. Argh.

Refs: https://github.com/kernc/backtesting.py/issues/45
0.1.4
2020-02-25 16:40:11 +01:00
Kernc
f3d00db196 MNT: Travis CI, bump default Python to 3.8 0.1.3 2020-02-24 14:39:15 +01:00
Kernc
c62e282b5d MNT: flake8 lint 2020-02-24 14:29:43 +01:00
Kernc
ab0cbe537e BUG: Fix plot not saved as specified filename if run within notebook
Fixes https://github.com/kernc/backtesting.py/issues/45
2020-02-24 14:26:52 +01:00
Kernc
4b4b315e61 ENH: Show number of trades on OHLC plot legend 2020-02-22 03:03:28 +01:00
Kernc
5387d86dd9 MNT: Adapt for pandas 1.0.0 (bug workaround + two depr warnings) 2020-02-22 01:22:00 +01:00
Kernc
d08524904d BUG: Plot and count longest drawdown if at the end of the interval
Plot and count drawdown even when it extends open-ended into the future.
2020-02-21 03:20:47 +01:00
Kernc
3aaf746c19 BUG: Ensure none of OHLC input data is NaN
Fixes https://github.com/kernc/backtesting.py/issues/37
2020-02-21 03:20:31 +01:00
Kernc
efe516791a ENH: Add parameter agg= to lib.resample_apply() 2020-02-10 05:09:59 +01:00
Kernc
3da6d36927 MNT: Import Sequence from collections.abc to avoid warning
DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
2020-01-11 18:59:34 +01:00
Kernc
bae9340aae REF: Reorganize plotting of indicators
BUG: Fix incorrect plot when multiple indicators share the
same name.

E.g. both these names are 'λ' yet both plots contained values
of the latter of the two.

    self.I(lambda: self.data.Open, overlay=False)
    self.I(lambda: self.data.High, overlay=False)
2020-01-11 18:54:05 +01:00
Kernc
7991596f0e ENH: Also show indicator centerline if mean around 0.5 2020-01-11 14:37:31 +01:00
Kernc
abbd1fae2e MNT: Bump Bokeh dependency to 1.4.0 for previous commit 2020-01-03 01:49:18 +01:00
Kernc
f415e7a591 REF: Replace bokeh legend_label parameter to avoid deprecation warning 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
95a3519d48 BUG: Reset position price (etc.) after closing position
Fixes https://github.com/kernc/backtesting.py/issues/27
2019-11-22 03:41:59 +01:00
Andre Miras
b3cfaff295 DOC: Minor typo fix s/proided/provided/ (#22) 2019-11-03 02:04:55 +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 0.1.2 2019-09-23 03:56:21 +02:00
Kernc
a43ced9504 MNT: Fix setup.py warning 0.1.1 2019-09-23 03:17:46 +02:00
Kernc
2e8f0fc300 MNT: Change PyPI badge color from orange (default) to blue
Red-toned badges are associated with failings ...
2019-09-23 03:10:43 +02:00
Kernc
730e3547fb BUG: More robust index computation in lib.resample_apply
Fixes https://github.com/kernc/backtesting.py/issues/19
2019-09-23 02:58:05 +02:00
kernc
2145e0146a BUG: Avoid multiprocessing trouble on Windos (#6)
* BUG: Avoid BrokenProcessPool error on Windos

* REF: Avoid any multiprocessing exceptions in `Backtest.optimize()`

... and instead switch to non-parallel computation.

* REF: Support parallelism only if start method is 'fork'

* REF: In case of non-'fork' multiprocessing, use a simple loop

* MNT: quiet codecov

* TST: Remove redundant test

The code path is covered by any other Backtest.optimize() test.

* fix flake8 warning
2019-09-23 02:25:43 +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
3deee42bae REF: Revert daa1da9 and 52eb813 into something that works 2019-09-23 01:56:17 +02:00
Kernc
05a18d0071 REF: Avoid FutureWarning on pandas 0.25.0 2019-08-04 02:38:46 +02:00
Kernc
332079b618 DOC: Docstring updates 2019-08-04 02:22:35 +02:00
Kernc
5051b61618 REF: Slightly more robust input handling in places 2019-08-04 02:22:35 +02:00
Kernc
daa1da96ea REF: Drop timezone in stats computation for pandas 0.24.2 2019-08-04 02:22:35 +02:00
Kernc
52eb8131f9 REF: Avoid pandas FutureWarning 2019-08-04 01:49:33 +02:00
Kernc
d4fb639ca7 MNT: shut flake8 for bokeh.Color.l variable 2019-08-02 02:18:06 +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
f84ee3747c REF: Darken trades indicator lines on OHLC plot 2019-07-07 22:25:57 +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
4ff626e117 MNT: Fix flake8 warnings 2019-06-25 14:24:50 +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
4487b822a4 TST: Fix running tests with temp files on Windos 2019-06-25 14:18:42 +02:00
Kernc
8d35bda975 MNT: Update docs build script for updated pdoc 2019-06-20 02:28:20 +02:00
Kernc
b0d23abf83 ENH: Add scatter plot indicator style 2019-03-08 03:06:15 +01:00
Kernc
fac6dde5d0 BUG: Fix iterable color= param for non-overlay indicators 2019-03-07 19:09:09 +01:00
Kernc
a7d1d4f3fa MNT: Adapt examples for updated jupytext behavior 2019-03-01 17:27:27 +01:00
Kernc
76465a4af2 MNT: Add requirements.txt so that examples run on MyBinder.org 2019-01-22 14:38:14 +01:00
Kernc
b4a43532af DOC: Update README.md 2019-01-18 13:14:25 +01:00