Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Add simple crossover_vwap strategy with vwap indicator. #853

Merged
merged 4 commits into from
Dec 13, 2017
Merged

Add simple crossover_vwap strategy with vwap indicator. #853

merged 4 commits into from
Dec 13, 2017

Conversation

tiagosiebler
Copy link
Contributor

I've been playing with a strategy that could possibly anticipate gradual price changes and flow with those changes, reducing losses vs hold and increasing gains vs hold. Here's an example that worked well for me in a sim:
zenbot sim kraken.XXRP-ZEUR --period="120m" --strategy=crossover_vwap --currency_capital=700 --asset_capital=0 --max_slippage_pct=100 --days=60 --avg_slippage_pct=1
That's even with a relatively high average slippage. Defaults may still need tweaking though, especially on different exchanges & currency combinations:

{
  "asset_capital": 0,
  "avg_slippage_pct": 1,
  "buy_pct": 99,
  "buy_stop_pct": 0,
  "currency_capital": 700,
  "days": 60,
  "emalen1": 30,
  "markdown_buy_pct": 0,
  "markup_sell_pct": 0,
  "max_sell_loss_pct": 25,
  "max_slippage_pct": "100",
  "min_periods": 1,
  "mode": "sim",
  "order_adjust_time": 5000,
  "order_type": "maker",
  "period": "120m",
  "profit_stop_enable_pct": 0,
  "profit_stop_pct": 1,
  "rsi_periods": 14,
  "selector": "kraken.XXRP-ZEUR",
  "sell_pct": 99,
  "sell_stop_pct": 0,
  "show_options": true,
  "smalen1": 108,
  "smalen2": 60,
  "start": 1507939200000,
  "stats": false,
  "strategy": "crossover_vwap",
  "verbose": false,
  "vwap_length": 10,
  "vwap_max": 8000
}
end balance: 1538.51299549 (119.78%)
buy hold: 1218.53870819 (74.07%)
vs. buy hold: 26.25%
18 trades over 62 days (avg 0.29 trades/day)
win/loss: 4/4
error rate: 50.00%

Assuming lower slippage, e.g taker/instant orders, the results are stronger:

2017-12-13 11:59:59  0.383310 XXRP-ZEUR   +3.49%    4.77m   92 +++++0.38272 0.25607   +91.56%  4604.42017895 XXRP    8.81 ZEUR+153.39%  +44.30%
{
  "asset_capital": 0,
  "avg_slippage_pct": 0.045,
  "buy_pct": 99,
  "buy_stop_pct": 0,
  "currency_capital": 700,
  "days": 60,
  "emalen1": 30,
  "markdown_buy_pct": 0,
  "markup_sell_pct": 0,
  "max_sell_loss_pct": 25,
  "max_slippage_pct": "100",
  "min_periods": 1,
  "mode": "sim",
  "order_adjust_time": 5000,
  "order_type": "maker",
  "period": "120m",
  "profit_stop_enable_pct": 0,
  "profit_stop_pct": 1,
  "rsi_periods": 14,
  "selector": "kraken.XXRP-ZEUR",
  "sell_pct": 99,
  "sell_stop_pct": 0,
  "show_options": true,
  "smalen1": 108,
  "smalen2": 60,
  "start": 1507939200000,
  "stats": false,
  "strategy": "crossover_vwap",
  "verbose": false,
  "vwap_length": 10,
  "vwap_max": 8000
}
end balance: 1763.05037236 (151.86%)
buy hold: 1221.68117269 (74.52%)
vs. buy hold: 44.31%
18 trades over 62 days (avg 0.29 trades/day)
win/loss: 4/4
error rate: 50.00%

Copy link
Owner

@DeviaVir DeviaVir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks for contributing!

@DeviaVir DeviaVir merged commit 2f54cfe into DeviaVir:master Dec 13, 2017
@kazdimenator
Copy link

Please add in genetic_backtester :)

@tiagosiebler
Copy link
Contributor Author

tiagosiebler commented Dec 13, 2017

@kazdimenator see PR #858 :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants