Drakkar-Software / OctoBot

Open source crypto trading bot
https://www.octobot.cloud
GNU General Public License v3.0
3.21k stars 745 forks source link

Variable market average profitability in backtesting result #1534

Open valouvaliavlo opened 3 years ago

valouvaliavlo commented 3 years ago

Step 2: Describe your environment

Docker Master & Dev

Step 3: Describe the problem:

Describe the bug market average profitability various with strategy config ( if 7 or more crypto, lower seem to be ok)

Expected behavior market average profitability have to be the same even if config have been changed

Steps to reproduce:

  1. Start backtesting with 7 or more crypto
  2. Observe market average profitability result
  3. Change config (risk or activate other TA)
  4. Rerun backtesting with same historical file
  5. market average profitability is not the same than previous
Herklos commented 3 years ago

Step 2: Describe your environment

Docker Master & Dev

Step 3: Describe the problem:

Describe the bug market average profitability various with strategy config ( if 7 or more crypto, lower seem to be ok)

Expected behavior market average profitability have to be the same even if config have been changed

Steps to reproduce:

  1. Start backtesting with 7 or more crypto
  2. Observe market average profitability result
  3. Change config (risk or activate other TA)
  4. Rerun backtesting with same historical file
  5. market average profitability is not the same than previous

Hi @valouvaliavlo, it's logical, if you change risk and TA configuration it'll impact strategies result and trading modes decisions. So the profitability should be different.

GuillaumeDSM commented 3 years ago

Did you change the time frames settings between backtesting runs ? Backtesting profitability is computed between the 1st and the last candle, if you did not change these candles, it should remain the same.

valouvaliavlo commented 3 years ago

Step 2: Describe your environment

Docker Master & Dev

Step 3: Describe the problem:

Describe the bug market average profitability various with strategy config ( if 7 or more crypto, lower seem to be ok) Expected behavior market average profitability have to be the same even if config have been changed

Steps to reproduce:

  1. Start backtesting with 7 or more crypto
  2. Observe market average profitability result
  3. Change config (risk or activate other TA)
  4. Rerun backtesting with same historical file
  5. market average profitability is not the same than previous

Hi @valouvaliavlo, it's logical, if you change risk and TA configuration it'll impact strategies result and trading modes decisions. So the profitability should be different.

Hi, yes bot profitability change but market profitability too

valouvaliavlo commented 3 years ago

Did you change the time frames settings between backtesting runs ? Backtesting profitability is computed between the 1st and the last candle, if you did not change these candles, it should remain the same.

Hi, without change on timeframe for exemple if you run a backtesting with doublemovingaverage only, the market average profitability will be different if you take marketaverageprofitability and RSImomentumevaluator

valouvaliavlo commented 3 years ago

Hi, it seems that the market average varied even though there is only one crypto used in the backtest

valouvaliavlo commented 3 years ago

Hello, I am attaching you an excel file with backtest results which are not correct compared to what I calculate. In yellow this is what the bot gives me as a result and in orange it is what I calculate. I specify that the value of the candles that I indicated in the table come directly from the sqlite history file.

https://cloud.loveyuparis.me/index.php/s/ziCTXXFrqdgSaYR

Nextcloud
backtest.xlsx
Nextcloud - a safe home for all your data