Abstract:
I hope this post inspires the start of a systematic trading research group.
We attempt to optimize a simple trading strategy. This exercise highlights the severe limitations and access to robust quantitative systems for JUP ecosystem members due to hardware requirements and the coding difficulty required to conduct efficient data analysis for trading.
If you had a 60% winrate strategy with 2:1 risk reward on the 5min timeframe, would you share this knowledge, how much would you charge? - of course “they” wouldn’t share that for free, as infinitely profitable as that may seem, it is infinitely expensive to mine and maintain!
The Strategy:
- The strategy is multi-timeframe and trend following using a fast and slow sma as an indication of the trend.
- A Bullish trend is when the fast sma if above the slow sma, and vice versa.
- Our entry is defined when we have a bullish trend and the close price crosses above the fast sma, as seen below:
The optimization parameters:
We will be using multiple parameters for SMA lengths and timeframes. The strategy is only allowed one position at a time, and we will be enforcing a hard stoploss and take profit rule.
timeframe_freq_values = [“1H”, “4H”]
fast_ma_freq_values = [“1H”, “4H”, “D”, “W”]
slow_ma_freq_values = [“1H”, “4H”, “D”, “W”]
fast_ma_length_values = [10, 20, 50, 100, 200]
slow_ma_length_values = [10, 20, 50, 100, 200]
tp_values = [1.02, 1.04, 1.06, 1.08, 1.1]
sl_values = [0.98, 0.96, 0.94, 0.92, 0.9]
The product of which results in 20 000 iterations of a backtest function! This is a far cry from the level of research we need to beat our centralized counterparts, with no guarantee of success .
Adding just two more parameters and we reach a staggering 200 000 iterations!
Results:
We have filtered the results to return strategies that provide:
- 10x on initial equity;
- positive risk reward ratio; and
- greater than 50% win rate.
We end up with only 14 variations out of 20 000:
Lets visualize a selected strategy (last 250 bars):
Timeframe: 4H
Moving Average: 4 Hour 20period as fast sma & Daily 10 period as slow sma
TP: 10%; SL: 6%
Returns:
Winrate: 51.94%
Amount of trades: 129
Culmulative pnl: 298.0% *idk stats much, but this the sum of pct gains per trade and probably not the right name.
Max drawdown: -10.000000000000014 % (negative never in drawdown)
Equity Max: 12800.79 USD
Equity Min: 1100.0 USD
Final equity value: 12800.79 USD
Summary: $11800.79 profit made from $1000 initial in about 2380 days 00:00:00 hours & minutes
Conclusion:
The provisional signs looks promising but the MTF Moving average trading strategy requires further observation.
For further observation:
- Sell only backtest needs to be completed, BTC is long biased.
- A tweak to the entry signal to include lows and not only closes.
- The strategy appears to be suitable for leverage, displays very low drawdown.
Results of the further observations coming soon. Please post your own observations or what you would like to see below! Peace