I just now pushed a new bot I wrote ...
For those that have been familiar with goxtool
(
http://prof7bit.github.io/goxtool/) [scary reference to some long forgotten
centralized service] -- that bot should basically do the same as the 'portfolio rebalancing'
strategy of goxtool. (
https://bitcointalk.org/index.php?topic=181584.0)
I haven't compared the code though!
Related theory:
http://en.wikipedia.org/wiki/Rebalancing_investments#Rebalancing_bonusSources:
https://github.com/xeroc/btsx_bots/blob/master/bots/market_balance.pyIt's "supposed" to keep the wealth split evenly among two assets and trades
when the market moves into either direction ..
{
"bot_type": "market_balance", // bot name (fixed)
"account_name": "balance.bot.account", // your account name (should be used ONLY by this bot)
"spread_percent": 0.05, // trades on prices moves +-5%
"asset_pair": [
"USD", "BTSX" // trades in USD/BTSX in this case (first is quote, second is base)
],
"min_base_balance": 10, // minimum BTSX to keep
"min_quote_balance": 10 // minimum USD to keep
},
The code is supposed to work on any assets as long as the market is open and
the base asset has a lower id on the blockchain
The bot requires an initial equal distribution and would order @ market prices
if this is not the case (asks for manual confirmation of orders for the initial trades)
After that, the bot places orders at +-SPREAD and allocates an amount such that
after the (complete) trade has been filled, both assets hold the "same" wealth.
DISCLAIMER:
- I used this to learn how to write a bot in python
- don't use with serious money unless you know what you are doing and checked the code
- I currently run one bot for USD/BTSX and CNY/BTSX with low volume to check trades
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.