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

Feature req: End balance in crypto (asset) not in currency #1293

Open
rountrey opened this issue Feb 6, 2018 · 9 comments
Open

Feature req: End balance in crypto (asset) not in currency #1293

rountrey opened this issue Feb 6, 2018 · 9 comments

Comments

@rountrey
Copy link

rountrey commented Feb 6, 2018

System information

  • Have I written custom code (as opposed to using zenbot vanilla): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Xubuntu 16.04
  • Zenbot version: 4.1.0
  • NodeJS version: 8.9.4
  • Python version: 2.7.12
  • Exact command to reproduce:

Describe the problem

I've thought hard about this and to prevent me from stressing out so much on live trading and in getting my sims completed, I would like to have an option to have the end balance in crypto only. With the market like it is, constantly going up and down, I have now created a new goal in mind. That goal is to grow my crypto and to not worry about the prices of them. I'm thinking of a setting that shows the percentage increase in crypto from the start either by pressing "X" or "P", or the simulation ending.

Source code / logs

Sample sim:
change "end balance" and "buy hold" value to crypto balance only instead of crypto*price but leave percentages in place.

end balance: 200.31317843 (15.06%)
buy hold: 203.70404858 (17.00%)
vs. buy hold: -1.66%

to

end balance: 23.012LTC (15.06%)
buy hold: 20.00 (0.00%)
vs. buy hold: 15.06%

I understand this would place the buy/hold at 0% but I think it would be fine.

@defkev
Copy link
Contributor

defkev commented Feb 7, 2018

Balance means asset + currency in currency as the profit (end balance/buy hold as well as win/loss) gets calculated against the current (the last) market price.

e.g.
BTC (in USD) + USD
XMR (in BTC) + BTC

@infatrus
Copy link

infatrus commented May 7, 2018

Let's assume trades with LTC-BTC asset-currency pair.
Starting parameters are: 20 LTC / 0 BTC (1 LTC = 0.01 BTC)
Ending parameters are: 15 LTC / 0 BTC (1 LTC = 0.015 BTC)
Buy hold: 20 * 0.015 = 0.3 (50%)

So, at the end you've got 15 * 0.015 = 0.225 BTC - that means 25% loss (against no trades at all), not 12,5% gain. Profit is only virtual and depends on exchange rate. The goal of trading is multiplying asset/currency, not (temporary) balance!

Maybe that's why Zenbot usually trade with losses.

@defkev
Copy link
Contributor

defkev commented May 7, 2018

What happened to the 5 LTC?

@infatrus
Copy link

infatrus commented May 7, 2018

Disappeared during "profitable" Zenbot trades - while making 12,5% gain ;)

@defkev
Copy link
Contributor

defkev commented May 7, 2018

If you manage to lose 1/4th of your asset i'd say something is wrong with your strategy/config 😏

Start capital: 0.20 BTC
End capital: 0,225 BTC +12.5%
vs Buy/Hold (hold as you started with 0 currency): 0.3 BTC +50%

So End vs Buy/Hold -37.5%

@infatrus
Copy link

infatrus commented May 7, 2018

That's only sample, just to show that trade based on balance calculations may not be optimal, as well as summary form may be misleading when trading asset.

With most simulations (and not only sims), you can observe Zenbot "bleeding" (slower or faster) with your asset/currency and still reporting "+x.xx" in profit column (the one before last).

@defkev
Copy link
Contributor

defkev commented May 8, 2018

I absolutely agree that the profit calculation is factually incorrect, as e.g 20 LTC vs 15 LTC is in fact a 25% lose and not a 12.5% win (at a price change from 0.01 to 0.015 BTC)

BUT taking into account that the bot separates between Asset (LTC) and Currency (USD) like Cryptocurrency/Fiat i suppose (suppose) the intent behind the original implementation, which came before i started using/contributing to the project, was to trade Fiat for Coins (and vise versa) and calculate profit in Fiat (using Coin * Worth + Fiat) as the idea of trading is to increase your original investment (in Fiat)

Now before you chase me with a stick, you are of course able to trade Cryptocurrency/Cryptocurrency pairs (like LTC/BTC or whatever/BTC) but this doesn't really change the intent why you are trading in the fist place.

I suspect the vs Buy/Hold profit was added later to address just that and illustrate the other side of the same coin, which it does.

If anything you would probably need to implement two different modes of profit calculation (like asset trader vs currency trader) so people can actually choose what they are aiming to accomplish.

@infatrus
Copy link

infatrus commented May 8, 2018

Maybe it would be better to calculate profit in comparison to buy-hold?

@subhead
Copy link

subhead commented Nov 27, 2020

Is there any approach to archieve this? I´m also interessted in generating more cryptos then currencies.

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

No branches or pull requests

5 participants