Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When a coin is sold after falling off the TOP list, WEIGHT is not considered #21

Open
Mothluin opened this issue Apr 30, 2022 · 1 comment

Comments

@Mothluin
Copy link

Hi
Just did my daily check on what the bot did and found something strange.

I think WEIGHT is not considered when buying coins after selling one coin that fell off the TOP list.

See the example below:

2022-04-30T11:10:03: [CHECK] Rebalance not necessary
2022-04-30T11:15:02: [CHECK] DOT should not be in the portfolio
2022-04-30T11:15:02: [SELL] DOT for 44.6000163 USDT
2022-04-30T11:15:02: [BUY] XRP for 4.05454 USDT
2022-04-30T11:15:03: [BUY] LUNA for 4.0545 USDT
2022-04-30T11:15:03: [BUY] SOL for 4.054 USDT
2022-04-30T11:15:04: [BUY] BTC for 4.05 USDT
2022-04-30T11:15:04: [BUY] ETH for 4.05 USDT
2022-04-30T11:15:04: [BUY] ADA for 4.05454 USDT
2022-04-30T11:15:05: [BUY] CRO for 4.05454 USDT
2022-04-30T11:15:05: [BUY] LINK for 4.054 USDT
2022-04-30T11:15:05: [BUY] MATIC for 4.05454 USDT
2022-04-30T11:15:06: [BUY] MKR for 4.05 USDT
2022-04-30T11:15:06: [BUY] SAND for 4.05454 USDT

CRO and BTC currently have a 12% WEIGHT in my config.ts.
As such, I would have expected the bot to buy CRO and BTC for an amount equivalent to 5.35 USDT (the 12% of 44.6 USDT).
The remaining USDT amount should have been equally divided among the other 9 coins (3.76 USDT for each).

Thanks

@Mothluin
Copy link
Author

Mothluin commented May 1, 2023

One year later, I'm still convinced that WEIGHT is applied only when the bot invests nightly, according to the schedule defined in config.ts file. Any coin rebalance will not take into account the WEIGHT parameter at all.

See logs down here: LUNA2 was sold, USD gained were spread on all other coins evenly.
It's also interesting to note how CRO and BTC (the coins I set a WEIGHT for) are then immediately found as "OVERPERFORMING":

2023-04-30T05:50:02: [CHECK] LUNA2 should not be in the portfolio
2023-04-30T05:50:03: [SELL] LUNA2 for 118.49755 USD
2023-04-30T05:50:03: [BUY] MATIC for 13.16639 USD
2023-04-30T05:50:04: [BUY] XRP for 13.16639 USD
2023-04-30T05:50:04: [BUY] ETH for 13.16 USD
2023-04-30T05:50:05: [BUY] ADA for 13.16639 USD
2023-04-30T05:50:05: [BUY] BTC for 13.16 USD
2023-04-30T05:50:06: [BUY] CRO for 13.16639 USD
2023-04-30T05:50:06: [BUY] LINK for 13.1663 USD
2023-04-30T05:50:07: [BUY] MKR for 13.16 USD
2023-04-30T05:50:07: [BUY] SAND for 13.16639 USD
2023-04-30T05:50:08: [CHECK] BTC deviates 14.725753232689243 USD (9.50%) -> [OVERPERFORMING]
2023-04-30T05:50:08: [CHECK] CRO deviates 9.930500476522212 USD (6.41%) -> [OVERPERFORMING]
2023-04-30T05:50:09: [SELL] BTC for 14.725753232689243 USD
2023-04-30T05:50:09: [SELL] CRO for 9.930500476522212 USD
2023-04-30T05:50:10: [BUY] ADA for 4.71817 USD
2023-04-30T05:50:10: [BUY] XRP for 4.68783 USD
2023-04-30T05:50:11: [BUY] SAND for 4.29341 USD
2023-04-30T05:50:11: [BUY] MKR for 3.58 USD
2023-04-30T05:50:12: [BUY] MATIC for 3.36086 USD
2023-04-30T05:50:12: [BUY] ETH for 2.79 USD
2023-04-30T05:50:12: [BUY] LINK for 1.2163 USD
2023-04-30T05:55:04: [CHECK] Rebalance not necessary

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

No branches or pull requests

1 participant