Hedging with Futures

Hedging with futures

Hello, traders. I want to share a strategy I developed, inspired by Ross and HunterWhale. For those unfamiliar with it, this is a strategy called Plankton, which basically covers a 2% range both up and down. It runs on SPOT, and interestingly, it also operates in short.

Yeah, I also struggled to process the idea of shorting in SPOT (because, well… there’s no leverage or short selling), but once you understand it, it makes sense. Sure, it’s a simple concept in theory, but not so easy to grasp when you come from the world of more traditional strategies.

Now, there was one detail that bothered me: the base currency tokens used for shorting lose value over time. So, while you may be generating “profits,” you could be watching your equity curve plummet… not exactly the best feeling. I’m not saying the strategy doesn’t work—I’ve been following its performance closely, and it’s actually doing quite well. The issue is something else: if you don’t properly calculate the number of pairs you’ll be trading and don’t buy enough base currency, sooner or later, you’ll run out of liquidity. And what happens then? The bots stop. At that point, you’ll need to inject more base or quote currency to get everything running again.

So I started thinking: How can I replicate this strategy in futures, minimize risk as much as possible, and keep a “healthy” positive equity curve?

That’s where my idea was born: a hedging strategy using futures and cross-margin :skull:. Yes, it comes with risks (like everything in trading), but the key is capital management, which is where I’ll place the most emphasis.

Does my strategy have a name? No. Am I going to name it? Also no. Call it whatever you want.

Strategy Structure

The strategy has a trigger indicator, which—without dragging out the suspense—is simply a Supertrend. Why Supertrend? Well… no special reason. It’s a strategy script I already had in TradingView, and honestly, I didn’t feel like diving into Pine Script to build another one from scratch. So I recycled it.

Now, aside from my laziness with coding (which I’m sure many of you can relate to), this script helps me find an optimal configuration for the indicator’s parameters. I mainly use it in TradingView to test different settings and evaluate their performance before moving to Gainium for a deeper backtest with the best adjustments.

By the way, I’ll leave my Supertrend script somewhere around here in case you want to download it and experiment with your own settings. This way, you can fine-tune the parameters before backtesting in Gainium.

Gainium Setup: This is Where the Magic Begins

Once you have a decent configuration for the asset you want to trade, it’s time to take it to Gainium and let the Combo Bots do their job. For those unfamiliar with them, this engineering marvel created by Ares, Gainium’s CEO, can make almost anything profitable… with a little bit of sugar, spice, and everything nice. (Well, actually with good capital management, but a little love never hurts.)

To trade a single pair, we will need four Combo Bots (yes, it’s a small but well-trained army):

:white_check_mark: 1 Short bot
:white_check_mark: 1 bot that hedges the Short (in Long)
:white_check_mark: 1 Long bot
:white_check_mark: 1 bot that hedges the Long (in Short)

All of them will be in cross-margin mode, and as a recommendation, a maximum leverage of 3x (because there’s a difference between taking risks and going crazy).

I won’t go into too much detail about the configuration since I’ll leave the bot link so you can replicate it directly. The important thing here is capital management, so I’ll explain how to allocate funds correctly to avoid portfolio imbalances.


Practical Example with GALA (Because It’s Cheap and Convenient)

Let’s say you decide to trade with GALA, as it allows working with small amounts.

:small_blue_diamond: Defining the capital: Suppose we allocate $20 to trade GALA in Short.

:small_blue_diamond: Distribution:

  • 60% of the capital goes to the bot that follows the trend (Short) → $12
  • 40% goes to the hedging bot (Long)$8

:small_blue_diamond: Dividing within the Short bot:
From the $12 allocated to the Short bot:

  • $6 goes to the Base Minigrid
  • $6 goes to the DCA Minigrid

For the hedging bot you will do the same, but with $8, they divide it into 4 for the basis order and 4 for DCAs.

(:warning: Important: When configuring this, make sure to adjust the order cost, not the notional value, as the latter is affected by leverage.)

:small_blue_diamond: Configuring DCA Minigrid orders:
We want 10 DCA orders, so we take the $6 allocated to the DCA Minigrid and divide it by 10Each DCA order will be approximately $0.6.

(Exactly the same for the hedge bot, $4 you divide it by the number of DCA orders)

Note: If the bot’s total cost turns out higher or lower than what you initially calculated, slightly adjust the DCA orders until it’s as close as possible to the $12 allocated for the main bot.

(Again the same thing, but trying to adjust it to the $8 of the hedge bot)

Putting the Bot to Work

The bot will start operating ASAP and will be controlled by the Bot Controller, which is where the trigger indicators come into play. Here, you’ll need to replace and adjust the Supertrend values you previously optimized for the asset you’re trading.

:rotating_light: Stop Loss and Hedging:
The only bot with a Stop Loss is the hedging bot (in this case, the Long bot). Its Stop Loss will be set right at the limit of the total DCA orders.

:pushpin: What does this mean?
If the hedging bot’s Stop Loss is triggered, it means that the trend-following bot has already closed with profits. Mission accomplished.

What If No Bot Hits Its Stop Loss?

If neither bot triggers its Stop Loss during the trade, both will close at market price when the Supertrend changes direction.

:small_blue_diamond: Example: Suppose we were trading Short, and the Supertrend shifts to an uptrend. At that moment:
:white_check_mark: The bot that followed the trend (Short) closes with profits.
:white_check_mark: The hedging bot (Long) averages its entry price to try and close with the smallest possible loss.

The key here is that the hedging bot’s loss will be smaller than the profit made by the trend-following bot.

In other words: if everything is configured correctly, the result remains positive.

And What Do We Notice in This Scenario?

:pushpin: The hedging bot can also close with profits, but the bot that follows the trend always takes the biggest piece of the cake. :cake::rocket:

Backtest Data


Why Did I Use a SHORT as an Example?

Simple: because shorting is more difficult and riskier.

:small_blue_diamond: In a Short, profits are limited (the price can’t drop below 100%), but losses can exceed 100% if the price skyrockets uncontrollably.
:small_blue_diamond: In contrast, in a Long, the price can rise infinitely, meaning there’s no theoretical profit limit.

That’s why, if this strategy works for Shorts, which are the most challenging, don’t freak out when backtesting in Long, because you’ll probably be able to generate even more profits.

But be careful: stay disciplined.

:loudspeaker: “Before learning to win, you should first learn how to lose.”

Losing can also be useful and rewarding (like when you lose weight, for example :grimacing:).


What’s Your Job Here?

The bots cover a 50% range both up and down, so your only tasks are:

:one: Find a solid configuration using the script I’ll provide.
:two: Manage your capital properly, following the guidelines I shared.

What If You Lose Money?

If you lose money and think it’s my fault or that the strategy “doesn’t work”, then I have two recommendations:

:open_book: First, read my book The Art of Quantum Trading, available on Amazon (I’ll leave the link below).
:pushpin: Amazon Link

:brain: And if after that you still believe you can get rich with $20 leveraged at 100x, then I suggest you visit a psychologist.

I hope you find this information useful and apply it responsibly and consciously.

I’m not a fairy godmother, so think carefully before diving into this.

Trading isn’t magic, but with discipline and strategy, you can make it work in your favor.

Have fun, and always remember:

:loudspeaker: “In trading, you don’t win by predicting the future, but by managing the present well.” :rocket:

Links and Settings

— Backtest URL:

– Bot URL:

– Magic Script:
Magic Script.txt (3.5 KB)

Credit to @Rossano , @cestjf86, and @aressanch, as these ideas are created and inspired by their previous work, and of course, to @maksym.shamko, the genius behind these Gainium tools that make all this possible.

6 Likes

Thanks for sharing! Remember to export the configurations. Bot links expire over time.

1 Like

Well, I’ll do it another time because I already left my office.

1 Like

Maybe u can share result monthly. we can see it together :grin:

Love it, great work!

There is a lot of interest in hedging strategies. The combo hedge will come out soon and the dca hedge will follow. It would be interesting to see how these bots can help automate the hedge setup, at least the backtesting can be done in one step.

I am curious, I see you are closing deals at market when the supertrend changes, have you thought about using supertrend with the R:R feature on the DCA instead? I am curious to see how a fixed amount of risk per trade would affect this setup.

1 Like

The results I show are from a backtest from January 2024 to date. There are also links where you can directly access the results of the screenshot.

Well, I didn’t want to go too deep into the setup so I wouldn’t tire you out so much, but there’s a reason I did it in combo and not directly in DCA. If you dig deeper into the setup, you’ll see that bots working on the main trend systematically download the order to make a profit. On the other hand, the main bot will have more spaced out security orders to be able to more efficiently average the price and not spend as much on commissions. Now, all short bots have a slightly higher price factor between orders, this to compensate for the distance between the safety orders of the longs, Since it is not the same to have 10 DCA in long, to have 10 DCA in Short, although the distance in percentage terms is the same, in absolute terms no, since as everyone knows, the price cannot go beyond zero price, so I compensate a little by putting a price factor of 1.05 to 1.06 (5 or 6% more) That way, DCA short orders will become more and more separated as the price goes against it. Finally, I did not put an equivalent price in the DCAs to the value of the base order, because essentially the main bot and the hedging bot are TECHNICALLY a single position, and what I am looking for is that 60% of the capital of that trade behaves as a single position, and the other 40% as another position (even if it is divided inside into DCA and base order). I designed everything together to make the capital more efficient, it was not the intention to make profits from the bot that covers the main bot, the main idea was to MINIMIZE the loss in case it went against it, but it unintentionally turned out better than I expected😬. Maybe if I place orders with the same flat margin, I could increase the drawdown a lot, and what I am looking for is to operate without punishing the free float too much. Finally, with the issue of R:R, the Supertrend really has a wide margin of error, it is not so accurate, and it could be difficult to look for high ratios, although if it does, I don’t think it will be enough to compensate for the erratic which can be most of the time, so I try to average as much as possible and try to come out unscathed. (I don’t know if I can answer your question) But, it doesn’t hurt to try as a regular dca bot would.

1 Like

Loving this. It is just the sort of thing I was looking for. I have a few questions though - maybe @aressanch can help:

  1. Even though 4 Combo-bots need to be configured for this strategy, in reality only 2 are required at any given point in time. So would this use 2 or 4 of our permissible Combo-bot allowance? Perhaps if the starting condition has a +1 minute cooldown period, just to make sure the two bots for the previous phase were closed off properly before starting a new phase.
  2. It may be possible to run both long and short on prepetuals on some exchanges like Binance, which allows for hedging (depending on your KYC jurisdiction, I believe). I will check and get back to you.
  3. Would it be possible with the Bot Controller using its technical indicators to keep the Combo Bot running until it closes in profit but then not restart (as defined by the Bot Controller). So it will finish the deal it was busy with (in an attempt to close with a profit). I know it contradicts my point 1. above and it runs counter to the intent of this strategy but it ties in with another statagy concept that I am trying to develop.

Thanks.

The strategy in principle uses 2 bots in one direction (the main and the hedging) because the hedging helps mitigate the liquidation price in case it goes against you (because it is in cross margin). While in the backtest even the bot what it is supposed to lose, came out with a profit, but that does not guarantee that in the future it will be so. Essentially, hedging works to cushion the liquidation price a little, and in the worst case minimize the impact of the loss. And lastly, don’t look to put Takeprofit minimum because I’m supposed to be using an indicator that would suggest a trend reversal, if you want a minimum Takeprofit you could skip using indicators and execute trades arbitrarily and just wait.

Hi @John_Carballar Thank you for the quick reply.

This is very encouraging indeed. Love your work. To be clear, my point 3 is no criticism of your system, I understand that for your system the failing bot needs to close even if it is at a loss. I am asking the question for another hedge trading system that I am working on where ideally the combo-bot will keep on trading while in a range (i.e. keep on trading until a potential end of the range is detected then stop opening new deals but finish the current trabe - without stopping out the is). So the bot controller must simply keep the current combo-bot running, including placing new minigrid orders etc. but do not start a new combo-bot should the current one end in a profit.

Thank you for sharing your strategy with us. It certainly look very promising indeed.

1 Like

I would not have considered it critical at all. As a piece of advice, do not focus on always trying to get out without losses, this business is probabilistic, if you have the probability in your favor and good risk management keep going, but if your strategy does not tip the scales in your favor, get out of there. There are other factors such as variance in which, if you are not prepared for a strong losing streak, it could ruin the benefits of many months of work. Just be careful and don’t try to never lose. Finally, and if I understood correctly, what you want is for me to open a single trade for each entry “signal”, you could do that by putting your condition in the “open deal” section. The bot controller is specifically for keeping the bot on and alert operating. The reason I used this option was because I had no other option to close trades by means of indicators, and by putting the bot controller I could turn it off and close everything.

2 Likes

Got it thanks.

1 Like

That’s what the combo bot needs to do to close take profits using an indicator. It was proposed before, but Ares didn’t agree to implement it. In a combo bot I have, I usually close profits using the bot controller, but it’s not ideal.

1 Like

Yes, I think I also suggested it at some point, but nothing happened and I just adapt to what I have :man_shrugging:t2:

1 Like

Not sure if you have already but if you havent then you should start the strategy described above on a fresh Bybit Copy trading account and let it run for a couple of months on 5$ min order sizes.
Great way to show its performance over time and share it later on

2 Likes

I appreciate your suggestion. My intention with this strategy is to share an idea that may be useful for those who wish to explore it and adapt it to their own trading style. Everyone is free to try it and adjust it according to their criteria. Success in your trading!

1 Like

Depends. If you “close” the bot by putting in monitoring, it does count towards the plan. That’s because bots in monitoring status still consume resources. If you want to save slots you can close them (not monitoring), but it won’t restart automatically from the bot controller, you need to turn them on manually.

ForAs an additional fact, here I show an example of a trade closed a couple of minutes ago, and the importance of having a hedge. Although the bot that is going in favor of the trend is the one with the highest margin, and the highest percentage of profit, it can always go wrong and go against it. In this operation that is supposed to be the trend was long, it ended up going against and closing at a loss, however the hedging bot did its job, covered the bot’s losses in favor of the trend and even managed to close with a little profit. (And all this despite the fact that the hedge only had 40% of the total margin)

1 Like

A question, is it feasible to use compound interest (% currency) or is it better to manage it manually?

Well, personally I wouldn’t, the more time goes by and you are making profits, the risk decreases because you will have more and more margin available. If you do compound interest, you could go on a negative streak, which would be harder to carry if you gradually increased the risk. I manage it manually, and every 3 or 6 months I increase the risk and leave it alone for another period. By variance you will enter a negative streak that is for sure, you must always consider the worst scenario.

1 Like