Tribler / Dollynator

Autonomous self-replicating code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Market Strategies

andrebreis opened this issue · comments

This post will serve as a discussion of market strategies to implement.

Chosen strategies will then be implemented in this sprint.

Strategies

  • Save all for the last day and sell enough for the VPS chosen as best

Strategy 2

Accumulate MB's during the whole month and in the last day sell enough for the two best VPS choices

Reasoning

This approach is a little greedier than buying just one VPS at the end of the month but it allows for faster replication and learning (more entries of the QTable being filled per unit of time).
This strategy can have a safety net, i.e: instead of selling everything in the same day, try to sell in the day before the last one for two and if it can't, on the last day sell for just one. Another way would be in the first X hours of the last day sell for two, if it can't, after that time, sell for just one

Edit: This strategy can be implemented together with Strategy 1, allowing for the desired number of vps to be configured in the plebnet settings file. This allows for more configuration (1,2,3,... desired vps)

Strategy 3

Constantly try to sell our MB's for the price of one VPS

Reasoning

This strategy seems the most efficient from the "blind" ones. It has none of the problems of the first two (high market fluctuations in the end of the month don't affect this strategy as much as the other two) and it has a "higher ceiling", since if the MB token is worth enough bitcoin, this strategy is not capped at maximum 1 or 2 VPS purchases per month.

Strategy 4

Analyze the price of current asks/bids and sell or hold depending on how many times it would be able to replicate at the end of the month and how many times it would be able to replicate at the current time.

Reasoning

This approach can be place orders as a speculator, trying to get the market to flow our way and adding volume to the market by creating new bids for bitcoin or just analyzing the current asks for bitcoin and fulfill one, removing volume from the market.
This strategy could, using a (linear) regression try to calculate how many times it could replicate if it sold everything at the end of the month, and from that it can make a decision if it's better to wait or to sell now.

The biggest advantage of this strategy, without any market speculation, is that if our MB's are worth enough, we don't need to waste extra MB's by selling them all for enough BTC for one replication, we can sell the exact amount of MB's needed and keep the rest for a future sale.

This strategy could be designed to act as strategy 3 if there are no orders in the market

@synctext @BloodyFool @MattSkala @rpytel1 @Jaapp- @HusainKapadia

Feel free to discuss the current strategies or suggest new ones

Would combine 2 and 3 into another one:

  • Continuously offer during month for 2 VPS instances plus 2 VPN.
  • measure of last resort on last day: sell for 1 vps and vpn

Would combine 2 and 3 into another one:

  • Continuously offer during month for 2 VPS instances plus 2 VPN.
  • measure of last resort on last day: sell for 1 vps and vpn

Adding the VPN price is a good point for all of them. But for strategy 3 isn't it irrelevant if it is selling for 2 instead of one? If it tries for 2 it just means the bot will wait a little longer (while being more risky because 2 is more unlikely to be achievable). I.e: if we get enough for 1 VPS per day, the new strategy 5 would, at the end of two days replicate itself to 2 VPS (with VPN). The strategy 3 would do the same with less risk, by replicating once in the first day and the second time in the second day.

Of course, selling MB's in two different days is different than selling twice the MB's in the same day.

Do you still think there this new strategy can be relevant?

Strategy 1 or 2 would be good for a kick-off, but there is always a risk of it not being able to sell its MBs for BTC in the last few days. Shouldn't this possibility be considered?

Strategy 1 or 2 would be good for a kick-off, but there is always a risk of it not being able to sell its MBs for BTC in the last few days. Shouldn't this possibility be considered?

Yes, that's why other strategies try to sell over the month

Is creating 2 equal orders on the Tribler market worse than creating an order for double the amount?
Can orders be partially matched on Tribler market? (like in crypto exchanges)

Is creating 2 equal orders on the Tribler market worse than creating an order for double the amount?
Can orders be partially matched on Tribler market? (like in crypto exchanges)

Tribler Market supports order Partial Matching. This is a real weakness in current strategies since they don't consider the amount of btc already owned. I think fixing this should be the next step in the market strategy implementation.

Also, the pairs of strategies: 1-2 and 3-"5" (suggested by @synctext ) were implemented as one strategy each with a configuration parameter for the desired number of vps to acquire for the strategy.

Smart Strategy

This strategy should spread the volume of token (MB) sales throughout the month. The principle would be selling a day's worth of token production every day. However this wouldn't take advantage of market variations neither of market spikes.

So the strategy would be:

  • If the current market price is below the average, we accumulate tokens until maximum n (n=3 or 5 seems reasonable) days' worth of tokens. After n days' worth of tokens we sell at the same rate we produce (production rate).

  • If the current market price is above the average:

    • We use a Simple Moving Average analysis to understand if the market is spiking
    • If it is, we sell an extra portion of the accumulated tokens (based on the size of the spike)
    • If it is simply above the average without spiking we just sell at production rate

All orders on the market shouldn't be market orders but limit orders so we can get a little more profit out of the trades. Orders should have a timeout equal to the plebnet check schedule time (currently 5 minutes), so we can update them accordingly to the market if needed.

Notice that this strategy doesn't try to get 1 or N replications, it just tries to get the best market trades possible in order to accumulate as much bitcoin as possible (and with this, the maximum amount of replications)