Choosing the right pairs for trading is always one of the biggest questions when you are filling confident trading with your first pair (usually BTC/USDT). In a past post, I wrote a magic formula I was thinking to allow you selecting the right pairs.
I should remind you about the big risk of trading with every pair the exchange you selected works with: you may end with a lot of dust. Dust, is the term traders use to refer for untradable quantities. For example, recently Poloniex has put a rule that you can not trade less than 1 USDT; if you are having some balance in BCH but it worths less than 1 USDT, you won't be able to trade in the USDT_BCH pair. Therefore, you have dust.
As I have been coding the next release of Trademinator, I have convinced myself that genetic algorithms and artificial intelligence are the most useful tools for the trading task. In this article, I will write about how I am using the neuronal networks to decide what pair to trade with.
The Rationale and Solution of Choosing a Pair for Trading
Let's say you are in an exchange such as Poloniex with a lot of pairs (Poloniex offers about 60 pairs for trading and it is adding new ones). Your capital (which it is not important at this point) is a limited resource. So, you need to choose those pairs who have the greatest trading volume and bigger variation in the price. A pair with low volume and enough volatility is useless because your earnings would be so little that your earning rates would be depreciable. A pair with enough variation but a little volume would let your orders hang for a while, useless too. No need to explain when no enough variation nor volume.
The following table will help you to visualize:
|Enough Volume||Enough Volatility||Tradable?|
So, you should have both conditions to be tradable. Does this resemble you to a boolean function?
Please note this approach is agnostic, this means it does not take your balance data to decide what pairs to select.
How much is enough Volume on your Trading Pair?
The logic table shows you should have enough volume. But since the volume is something you can not control, so we should do a bell-shaped adjust. Per each market, the pair who has the greatest trading volume will get the value of one, and from it goes down. Kind of grading on a curve method. Bell curve method is used because I do not really care too much about the volume, just the ones who are having the greatest volume.
This could be named market share.
Usually, the paired belled-curve grade will be from the rang of 0 to 0.10. As my experience shows.
How much is enough Volatility on your Trading Pair?
In this case, the only thing that matters is the volatility. It really does not matter the direction as a pair with enough volatility goes up and down. In order to let us compare all the pairs, I decided to use the ATRP(14) indicator. ATRP(x) is given by dividing ATR(x) by its closing price. Therefore, you are having an indicator between 0 and 1. This way, we can compare the volatility of pairs such as BTC_BTCD (which it ranges around 0.006 range) against the USDT_BTC pair (which is in ranges around 7300 when writing this article).
Of course, those values need to be applied through the bell curve method in order to have a range from 0 to 1. Again, I do not care about the number the ATRP(x) metric returns, but I need to know who is the one who has the greatest variation in its own market.
The Artificial Intelligence with Neuronal Networks
Neuronal networks are used to solve complex problems where you only have a sample of positive or negative cases while ignoring the mathematical model. Although at this early point, you may think the use of a neuronal network is not required and a simple coding may do the trick, the thing is I am not sure that I am using all the variables to solve this selection problem.
Some unused variables in this problem could be:
- the spread, the space between the lowest ask and the best bid,
- the amount shown in the market depth, we need to know if a whale or a dolphin is coming,
- momentums of some metrics such as EMA's, Bolinger bands or Keltner bands.
By adding one of these variables and doing a training of positive and negative cases, the artificial intelligence will be able to decide the grey areas.
Training the Neuronal Network
I decided to go for a simple neural network with the following training data:
- Volatility in the range [0.5,1] and Market Share in the range [0.1,1] will return a true value
- any other combination will return a false value
Applying the Neuronal Network to Select Trading Pairs
There is not too much science to say here, Once the code is done, I got a set of trading pair candidates. Usually, it is around 10 out of 60 pairs. However, the problem is not solved. The neuronal network only returns a true (1) or false (0) value. The problem here is my capital is not infinite, and although I have a reduced set of good pairs to trade with, the possibility of not having enough capital (therefore ending with dust) has a place.
The easiest way (but maybe not yet the right one) I came to solve this problem is by using the ATRP(x) value. The pair with the greatest volatility is the one I will trade first with.
The Trademinator agnostic selection will then send a list of pairs with a number in the range of (0, 1]. The next step would be to process that list with specific trader data such as:
- the zero balances,
- the relationship between balances and the market depth
After spending some hours coding, I finally had it running. Let's see the results.
XMR_BTCD=7200 USDT_XMR=4060 USDT_GNT=3480 ETH_GNO=3470 ETH_BAT=3339 USDT_ZEC=2803 USDT_ETC=2513 ETH_ETC=2488 USDT_REP=2417 USDT_EOS=2368 ETH_OMG=2357 USDT_NXT=2320 USDT_DASH=1982 USDT_STR=1933 USDT_KNC=943 USDT_LSK=919 ETH_ZEC=884 USDT_LTC=822 BTC_BCN=821 ETH_ZRX=786 ETH_REP=753 USDT_SNT=725 ETH_LSK=720 ETH_STEEM=720 ETH_LOOM=688 USDT_BAT=677 USDT_ETH=677 ETH_GNT=655 USDT_XRP=435 USDT_BCH=435 ETH_SNT=415 BTC_DOGE=364 ETH_CVC=350 BTC_PASC=344 XMR_MAID=312 BTC_GAME=298 USDT_BTC=290 BTC_BURST=243 ETH_BCH=240 BTC_NAV=229 BTC_AMP=215 USDT_ZRX=210 BTC_GAS=204 BTC_NXT=198 BTC_HUC=196 BTC_STRAT=178 BTC_SC=174 BTC_XMR=172 BTC_XCP=161 BTC_DGB=157 BTC_VIA=155 BTC_ARDR=155 ETH_EOS=153 XMR_LTC=130 XMR_ZEC=130
The pairs XMR_BTC and USDT_XMR are the first two with the highest grade. Lets review the graphics.
Observer the volume and how the long candles.
Now, let's review the latest pairs XMR_ZEC and XMR_LTC.
Check the null activity and the very short candles.
I think it is working. What do you think?
Good luck!blog comments powered by Disqus