Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profit always zero (0.00) #37

Open
pangoyal opened this issue Aug 9, 2018 · 4 comments
Open

Profit always zero (0.00) #37

pangoyal opened this issue Aug 9, 2018 · 4 comments

Comments

@pangoyal
Copy link

pangoyal commented Aug 9, 2018

The tool seems to be giving 0.00 profit in any scenario I test it in. The same backtest done with native gekko shows different results. Below details of the versions and the output that I get. Any idea what's happening here?

Update: works fine for gekko < 0.6.0. seems some breaking changes in the v0.6.

Gekko: "0.6.4"
Gekko-BacktestTool: v0.7 as per changelog. Upto date with master. commit: 9180779
Using default configs with custom date range.
Machine: Darwin Pankajs-MacBook-Pro.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
Perl: 5.18.2

Output:
Pankajs-MacBook-Pro:gekko3 pankaj$ perl backtest.pl

[2018-08-09 18:17:44] Collect data from coinmarketcap.com
[2018-08-09 18:17:44] Generate params combinations for: CCI
[2018-08-09 18:17:44] Use TOML files for strategies configuration
[2018-08-09 18:17:44] Save output to csvfile: database.csv
[2018-08-09 18:17:44] Starting Backtest Machine (5 threads)...
============================================================== I N P U T D A T A ===============================================================
Pairs
binance:USDT:BTC
Total: 1
Strategies
MACD CCI RSI
Total: 3

===================================================================================================================================================
Candles
10:73
Total: 1
[2018-08-09 18:17:44] 3 backtests remain
============================================================= L A S T R E S U L T S ============================================================
Pair Strategy Profit Profit-market Trades/day Win trades Best win Worst loss HODL Days Time

USDT:BTC RSI 0.00% 14.85 1.22 40.00% 2.25% -9.14% 1740 9 00:01
USDT:BTC CCI 0.00% 14.85 1.56 50.00% 2.96% -4.65% 1116 9 00:01
USDT:BTC MACD 0.00% 14.85 12.00 24.53% 2.30% -3.55% 125 9 00:01
[2018-08-09 18:17:46] 100% complete. Elapsed: 00:00:02, average backtest duration: 00:00

[2018-08-09 18:17:46] Creating ALL RESULTS table (sorted profit/day)...

==================================================== A L L R E S U L T S =====================================================
Curr. Asset Strat Profit Profit-market Profit/day Trades/day Best win Worst loss Avg.Hodl Avg.price Ov.trades/day Volume/day

USDT BTC RSI 0.00 14.85 0.00 1.22 2.25 -9.14 1740 8331.54141169 241812 41211
USDT BTC CCI 0.00 14.85 0.00 1.56 2.96 -4.65 1116 8331.54141169 241812 41211
USDT BTC MACD 0.00 14.85 0.00 12.00 2.30 -3.55 125 8331.54141169 241812 41211
[2018-08-09 18:17:46] Creating TOP STRATEGY table...

================================================ T O P S T R A T E G Y =================================================
Strat Best % % profit > Best Worst Sum % Avg % % Avg win Best Avg trade Worst Avg trade Avg Avg
profitable market % P/L % P/L profit profit trades trade profit trade loss trades/day HODL min

CCI 0 0 50 0.0 0.0 0 0.00 50.0 2.96 1.90 -4.65 -2.54 1.6 1116
RSI 1 0 50 0.0 0.0 0 0.00 40.0 2.25 1.99 -9.14 -6.59 1.2 1740
MACD 0 0 50 0.0 0.0 0 0.00 24.5 2.30 0.76 -3.55 -0.71 12.0 125
[2018-08-09 18:17:46] Creating TOP DATASET table...

============================================================== T O P D A T A S E T ===============================================================
Pair Best % % profit > % Market Best Worst Sum % Avg % % Avg win Avg Avg Price CMC Current Current Days
profitable market change % P/L % P/L profit profit trades trades/day HODL min volatility Rank marketcap CMC volume

USDT:BTC 3 0 100 -14.85 0.0 0.0 0 0.0 38.2 4.9 993 6.6 1 111320731836 4569082350 9
[2018-08-09 18:17:46] All jobs are done. Elapsed time: 2 seconds

@pangoyal
Copy link
Author

pangoyal commented Aug 9, 2018

seems like the output format is a bit changed. The 'simulated profit' is changed to 'profit'
https://github.com/askmike/gekko/pull/2216/files#diff-1be0ac309f059e0715001ab1e4c386daL41

Fixing this in backtest.pl solves the issue.
fdc3fa4#diff-d4252af75e942fa69715716f1de9a18fR521

@xFFFFF could you check any more discrepancies like this and patch it, please.

@pangoyal pangoyal closed this as completed Aug 9, 2018
@pangoyal pangoyal reopened this Aug 9, 2018
@danibeni81
Copy link

I have the same issue. Tryed the modification on backtest.pl suggested by fubarred but did not sove it.
I am using Windows 10 and the latest versions of Gekko and BackTestTool.

@pangoyal
Copy link
Author

@danibeni81 renaming 'simulated profit' to 'profit' did not help? thats the only change I did to fix the issue.

@danibeni81
Copy link

danibeni81 commented Aug 30, 2018

@fubarred I solve it following the advice from @robmazur in #35:
my @profit = $grun =~ /(?<=profit:\t\t )[0-9.-][0-9.-]* $sets[1] ((.*)(?=%))/;

bogdanbrudiu added a commit to bogdanbrudiu/Gekko-BacktestTool that referenced this issue Nov 30, 2018
bogdanbrudiu added a commit to bogdanbrudiu/Gekko-BacktestTool that referenced this issue Nov 30, 2018
bogdanbrudiu added a commit to bogdanbrudiu/Gekko-BacktestTool that referenced this issue Nov 30, 2018
bogdanbrudiu added a commit to bogdanbrudiu/Gekko-BacktestTool that referenced this issue Nov 30, 2018
fix for Profit always zero (0.00) xFFFFF#37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants