Skip to content

Commit

Permalink
Merge pull request freqtrade#2453 from freqtrade/rel/2019-10
Browse files Browse the repository at this point in the history
Release 2019-10
  • Loading branch information
xmatthias authored Nov 1, 2019
2 parents 6bbc0ee + 7204227 commit 1593847
Show file tree
Hide file tree
Showing 114 changed files with 3,567 additions and 1,389 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,6 @@ Contributors may be given commit privileges. Preference will be given to those w
1. Access to resources for cross-platform development and testing.
1. Time to devote to the project regularly.

Beeing a Committer does not grant write permission on `develop` or `master` for security reasons (Users trust FreqTrade with their Exchange API keys).
Being a Committer does not grant write permission on `develop` or `master` for security reasons (Users trust FreqTrade with their Exchange API keys).

After beeing Committer for some time, a Committer may be named Core Committer and given full repository access.
After being Committer for some time, a Committer may be named Core Committer and given full repository access.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7.4-slim-stretch
FROM python:3.7.5-slim-stretch

RUN apt-get update \
&& apt-get -y install curl build-essential libssl-dev \
Expand All @@ -16,9 +16,9 @@ RUN cd /tmp && /tmp/install_ta-lib.sh && rm -r /tmp/*ta-lib*
ENV LD_LIBRARY_PATH /usr/local/lib

# Install dependencies
COPY requirements.txt requirements-common.txt /freqtrade/
COPY requirements.txt requirements-common.txt requirements-hyperopt.txt /freqtrade/
RUN pip install numpy --no-cache-dir \
&& pip install -r requirements.txt --no-cache-dir
&& pip install -r requirements-hyperopt.txt --no-cache-dir

# Install and execute
COPY . /freqtrade/
Expand Down
12 changes: 5 additions & 7 deletions config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
"ask_strategy":{
"use_order_book": false,
"order_book_min": 1,
"order_book_max": 9
"order_book_max": 9,
"use_sell_signal": true,
"sell_profit_only": false,
"ignore_roi_if_buy_signal": false
},
"exchange": {
"name": "bittrex",
Expand All @@ -41,19 +44,14 @@
"ZEC/BTC",
"XLM/BTC",
"NXT/BTC",
"POWR/BTC",
"TRX/BTC",
"ADA/BTC",
"XMR/BTC"
],
"pair_blacklist": [
"DOGE/BTC"
]
},
"experimental": {
"use_sell_signal": false,
"sell_profit_only": false,
"ignore_roi_if_buy_signal": false
},
"edge": {
"enabled": false,
"process_throttle_secs": 3600,
Expand Down
10 changes: 4 additions & 6 deletions config_binance.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
"ask_strategy":{
"use_order_book": false,
"order_book_min": 1,
"order_book_max": 9
"order_book_max": 9,
"use_sell_signal": true,
"sell_profit_only": false,
"ignore_roi_if_buy_signal": false
},
"exchange": {
"name": "binance",
Expand Down Expand Up @@ -51,11 +54,6 @@
"BNB/BTC"
]
},
"experimental": {
"use_sell_signal": false,
"sell_profit_only": false,
"ignore_roi_if_buy_signal": false
},
"edge": {
"enabled": false,
"process_throttle_secs": 3600,
Expand Down
15 changes: 7 additions & 8 deletions config_full.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
"ask_strategy":{
"use_order_book": false,
"order_book_min": 1,
"order_book_max": 9
"order_book_max": 9,
"use_sell_signal": true,
"sell_profit_only": false,
"ignore_roi_if_buy_signal": false
},
"order_types": {
"buy": "limit",
Expand Down Expand Up @@ -75,7 +78,7 @@
"ZEC/BTC",
"XLM/BTC",
"NXT/BTC",
"POWR/BTC",
"TRX/BTC",
"ADA/BTC",
"XMR/BTC"
],
Expand All @@ -100,11 +103,6 @@
"max_trade_duration_minute": 1440,
"remove_pumps": false
},
"experimental": {
"use_sell_signal": false,
"sell_profit_only": false,
"ignore_roi_if_buy_signal": false
},
"telegram": {
"enabled": true,
"token": "your_telegram_token",
Expand All @@ -121,7 +119,8 @@
"initial_state": "running",
"forcebuy_enable": false,
"internals": {
"process_throttle_secs": 5
"process_throttle_secs": 5,
"heartbeat_interval": 60
},
"strategy": "DefaultStrategy",
"strategy_path": "user_data/strategies/"
Expand Down
9 changes: 7 additions & 2 deletions config_kraken.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
"ask_strategy":{
"use_order_book": false,
"order_book_min": 1,
"order_book_max": 9
"order_book_max": 9,
"use_sell_signal": true,
"sell_profit_only": false,
"ignore_roi_if_buy_signal": false

},
"exchange": {
"name": "kraken",
Expand Down Expand Up @@ -66,5 +70,6 @@
"forcebuy_enable": false,
"internals": {
"process_throttle_secs": 5
}
},
"download_trades": true
}
20 changes: 20 additions & 0 deletions docker-compose.develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
version: '3'
services:
freqtrade_develop:
build:
context: .
dockerfile: "./Dockerfile.develop"
volumes:
- ".:/freqtrade"
entrypoint:
- "freqtrade"

freqtrade_bash:
build:
context: .
dockerfile: "./Dockerfile.develop"
volumes:
- ".:/freqtrade"
entrypoint:
- "/bin/bash"
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
version: '3'
services:
freqtrade:
image: freqtradeorg/freqtrade:master
volumes:
- "./user_data:/freqtrade/user_data"
- "./config.json:/freqtrade/config.json"
25 changes: 18 additions & 7 deletions docs/backtesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Assume you downloaded the history data from the Bittrex exchange and kept it in
You can then use this data for backtesting as follows:

```bash
freqtrade backtesting --datadir user_data/data/bittrex-20180101
freqtrade --datadir user_data/data/bittrex-20180101 backtesting
```

#### With a (custom) strategy file
Expand Down Expand Up @@ -72,6 +72,17 @@ The exported trades can be used for [further analysis](#further-backtest-result-
freqtrade backtesting --export trades --export-filename=backtest_samplestrategy.json
```

#### Supplying custom fee value

Sometimes your account has certain fee rebates (fee reductions starting with a certain account size or monthly volume), which are not visible to ccxt.
To account for this in backtesting, you can use `--fee 0.001` to supply this value to backtesting.
This fee must be a percentage, and will be applied twice (once for trade entry, and once for trade exit).

```bash
freqtrade backtesting --fee 0.001
```


#### Running backtest with smaller testset by using timerange

Use the `--timerange` argument to change how much of the testset you want to use.
Expand All @@ -92,12 +103,6 @@ The full timerange specification:
- Use tickframes since 2018/01/31 till 2018/03/01 : `--timerange=20180131-20180301`
- Use tickframes between POSIX timestamps 1527595200 1527618600:
`--timerange=1527595200-1527618600`
- Use last 123 tickframes of data: `--timerange=-123`
- Use first 123 tickframes of data: `--timerange=123-`
- Use tickframes from line 123 through 456: `--timerange=123-456`

!!! warning
Be carefull when using non-date functions - these do not allow you to specify precise dates, so if you updated the test-data it will probably use a different dataset.

## Understand the backtesting result

Expand Down Expand Up @@ -184,6 +189,7 @@ Hence, keep in mind that your performance is an integral mix of all different el
Since backtesting lacks some detailed information about what happens within a candle, it needs to take a few assumptions:

- Buys happen at open-price
- Sell signal sells happen at open-price of the following candle
- Low happens before high for stoploss, protecting capital first.
- ROI sells are compared to high - but the ROI value is used (e.g. ROI = 2%, high=5% - so the sell will be at 2%)
- Stoploss sells happen exactly at stoploss price, even if low was lower
Expand All @@ -192,6 +198,11 @@ Since backtesting lacks some detailed information about what happens within a ca
- Low uses the adjusted stoploss (so sells with large high-low difference are backtested correctly)
- Sell-reason does not explain if a trade was positive or negative, just what triggered the sell (this can look odd if negative ROI values are used)

Taking these assumptions, backtesting tries to mirror real trading as closely as possible. However, backtesting will **never** replace running a strategy in dry-run mode.
Also, keep in mind that past results don't guarantee future success.

In addition to the above assumptions, strategy authors should carefully read the [Common Mistakes](strategy-customization.md#common-mistakes-when-developing-strategies) section, to avoid using data in backtesting which is not available in real market conditions.

### Further backtest-result analysis

To further analyze your backtest results, you can [export the trades](#exporting-trades-to-file).
Expand Down
Loading

0 comments on commit 1593847

Please sign in to comment.