Codaone / DEXBot

Trading Bot for the BitShares Decentralized Exchange
Other
247 stars 127 forks source link

Diversified-Portfolio Rebalancer #685

Open PermieBTS opened 5 years ago

PermieBTS commented 5 years ago

Diversified-Portfolio Rebalancer:

Users would be able to set parameters for a diversified portfolio. DEXBot will buy/sell components of the user-chosen basket of assets to maintain their portfolio at the user-set ratios.

This feature will aid the bts price by buying bts when the price goes down, and selling bts when the price goes up. Dampening volatility and increasing the stability of bts price growth. The portfolio balancer will allow market makers to hold a diversified portfolio which is a proven strategy to reduce risk. Market makers who hold reserves in a diversified portfolio are more able and willing to provide liquidity as they can feel more comfortable about the risk of price volatility in the markets they choose to provide liquidity to.

User could have the option in the config to choose up to 10 DEX assets to be included in the portfolio, plus 3 CEX assets to also be included via the upcoming ccxt engine. These 3 CEX assets would ideally always be BTS, USDT and BTC. These 3 assets are chosen because bts is most heavily traded against USDT and BTC on CEX's. If the portofolio rebalancer includes CEX markets for BTS:USDT and BTS:BTC then it can be used to resist price movements on CEX's that affect the DEX price feeds which cause undesirable margin calls.

User Input: Select up to 10 DEX assets to be included in the rebalancer. (Beta version to include just 3 assets?)

User input: Option to select USDT:BTS and BTC:BTS on price-feed providing CEX's via ccxt engine.

User Input Portofolio % allocation for each asset: The total must reach 100% and perhaps a hard-coded minimum of 20% allocation to bts can be included so that all use of the portfolio rebalancer provides support to the bts price.

Execute a trade: When the (vs bts) price across the various chosen assets changes by a user defined minimum % - say 1%. DEXBot then rebalances by selling the assets that are now over their user-determined % of the portfolio and buying the assets that are now under their desired % of the portfolio.

A minimum market depth within 5% of the DEX can be added as a parameter so the user can avoid trading their assets vs bts in low-liquidity markets. However, portfolio rebalancer trading acitivty across a variety of ASSET vs BTS markets will encourage market makers to provide liquidity to these markets knowing that a rebalance trade is likely to take their offer if it is a fair price.

PermieBTS commented 5 years ago

Requesting feedback from @thehapax and @bitfag

This feature is on-hold indefinately but discussion can take place over the next few weeks

bitphage commented 5 years ago

Asset to use for portfolio valuation is supposed to be user-specified? Like USDT, BTC, or it's supposed to always be BTS?

Limiting number of assets to 3 or 10 looks artificial, since portfolio rebalancer will work with 3 assets, it should be able to handle N assets as well.

Hard-coded minimum of 20% to BTS is artificial too.

PermieBTS commented 5 years ago

That is true, but I would like for the feature to be steered towards being pro-bts

PermieBTS commented 5 years ago

The portfolio valuation could be in any user defined asset, but preferably bts. Perhaps bts would be the default but the user can change it if desired