aqs-base / acuitas-issues

This is where issues with the Acuitas Trading Bot will be submitted and tracked. This is open to license holders.
1 stars 0 forks source link

Buy amount type: Percentage of capital - calculation method #35

Open Mit4Code opened 3 years ago

Mit4Code commented 3 years ago

Hi,

I would like to be able for the live trade and also for the paper trade to set the Starting Capital like in back testing. Right now if I use the percentage the entire account will be taken in consideration and for my purposes that it's not the best way to manage the percentage positions.

For example I set 5 pairs to trade and in order to set more pairs I'll have to set a low percentage. Let's say that I will set 5% from the available capital for every single pair. The first pair goes into a trade with the full 5%. When the next pairs will go into a position this one will get into a position which will be 5% X (initial capital - 5% for the previous position). Then the third one is using 5% X ((initial capital -5%) - 5%). At a certain point I'll have DCA also which will be 5% from what is left and so on and so on until some of the trades will start to exit.

One of the huge problems with this type of calculation is especially when you use DCA. If you are doing DCA and the first position is 1000$ but the second position will be 600$ and the third one will be 400$ it defies the purpose of DCA which is to lower your entry price. Because of not having the price going low enough the bot will try to sell at a to high price and it may miss the exit. All this because the available capital has been drastically reduced by other pairs and other DCA's.

The solution it is to allocate a certain amount to a certain pair and that pair will trade with it's own capital without affecting the others. Also when we do DCA I think that the second position and the third and the next x DCA's should be equal with the first position, not a percentage of the remaining capital. It is our job to check that we will have enough capital for all the pairs and DCA's to function properly as we do when we use fix positions.

For example when we back test we set a certain amount and we do the test. That test it is not affected in any way by other pairs but when we go in paper trading and live trading we are going to get huge differences into the results even if the market will be similar with the back test.

As it is right now I either prefer to use fix amounts, but the positions won't scale according to the available capital, or I would use the percentage of capital but I'll have to resume myself to a single pair.

In the next screenshot from paper trade you can see how the bot is doing DCA with smaller and smaller amounts. With equal position sizes the second buy should have got a bit more UNI coins since it would have used the same amount of dollars while the price was cheaper and the third one would have got even more UNI for even a smaller price. In this way the 1 % gain would have been achieved faster.

image

Mit4Code commented 3 years ago

I was thinking to the issues described here and I got an idea which may be considered as a feature request. It can be an option added to the bot and a solution at the same time.

We could have the option to switch between trading all the live trade setups as it is right now or the second option would be to follow all the pairs for an entry setup but when and entry has went through, the bot should cease all the other pairs and take care only of this single trade until it exits. In this way the bot would use the entire capital for that particular trade without splitting the money between all of them. At this point there will be only the issue with DCA which should be setup to use the same entry amount as the first entry.

nibarulabs commented 3 years ago

Hi, thanks for the suggestion. Yah, this can go a few different ways I guess. It's not that difficult to make this case. I will add it for a feature request. :+1:

aqs-base commented 3 years ago

Jason, let's talk tomorrow about this and break it out a bit.

On Thu, Feb 11, 2021, 11:51 AM 'Mit4Code' via Contact < contact@fenixglobal.io> wrote:

Hi,

I would like to be able for the live trade and also for the paper trade to set the Starting Capital like in back testing. Right now if I use the percentage the entire account will be taken in consideration and for my purposes that it's not the best way to manage the percentage positions.

For example I set 5 pairs to trade and in order to set more pairs I'll have to set a low percentage. Let's say that I will set 5% from the available capital for every single pair. The first pair goes into a trade with the full 5%. When the next pairs will go into a position this one will get into a position which will be 5% X (initial capital - 5% for the previous position). Then the third one is using 5% X ((initial capital -5%)

  • 5%). At a certain point I'll have DCA also which will be 5% from what is left and so on and so on until some of the trades will start to exit.

One of the huge problems with this type of calculation is especially when you use DCA. If you are doing DCA and the first position is 1000$ but the second position will be 600$ and the third one will be 400$ it defies the purpose of DCA which is to lower your entry price. Because of not having the price going low enough the bot will try to sell at a to high price and it may miss the exit. All this because the available capital has been drastically reduced by other pairs and other DCA's.

The solution it is to allocate a certain amount to a certain pair and that pair will trade with it's own capital without affecting the others. Also when we do DCA I think that the second position and the third and the next x DCA's should be equal with the first position, not a percentage of the remaining capital. It is our job to check that we will have enough capital for all the pairs and DCA's to function properly as we do when we use fix positions.

For example when we back test we set a certain amount and we do the test. That test it is not affected in any way by other pairs but when we go in paper trading and live trading we are going to get huge differences into the results even if the market will be similar with the back test.

As it is right now I either prefer to use fix amounts, but the positions won't scale according to the available capital, or I would use the percentage of capital but I'll have to resume myself to a single pair.

In the next screenshot from paper trade you can see how the bot is doing DCA with smaller and smaller amounts. With equal position sizes the second buy should have got a bit more UNI coins since it would have used the same amount of dollars while the price was cheaper and the third one would have got even more UNI for even a smaller price. In this way the 1 % gain would have been achieved faster.

[image: image] https://user-images.githubusercontent.com/49874678/107663277-1a23c700-6c83-11eb-86c4-dcc37718d15b.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/aqs-base/acuitas-issues/issues/35, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMNXJPRMU4SF6LGM23TU7UTS6QDIDANCNFSM4XPFNAIQ .

-- You received this message because you are subscribed to the Google Groups "Contact" group. To unsubscribe from this group and stop receiving emails from it, send an email to contact+unsubscribe@fenixglobal.io. To view this discussion on the web visit https://groups.google.com/a/fenixglobal.io/d/msgid/contact/aqs-base/acuitas-issues/issues/35%40github.com https://groups.google.com/a/fenixglobal.io/d/msgid/contact/aqs-base/acuitas-issues/issues/35%40github.com?utm_medium=email&utm_source=footer .