Friday 20 June 2014

XMM Utilities.

sourcecode: https://github.com/ripplerm/XMM-utilities

The page contains some basic tools that I had developed to perform tasks related to XMM. Currently there's only two on the list.


1. Holder Statistic: (http://ripplerm.github.io/XMM-utilities/holders.html)

This will show a simple statistics of XMM holders, categorised with holding-size . For those who are not familiar with maths language,  an " [100 -1000) " expression means 'greater-or-equal to 100, and less than 1000'.

The "List All Holders" checkbox, if ticked, will return a full list of holder's account, together with their number of holdings in XMM units.


2. XMM's value Estimation: (http://ripplerm.github.io/XMM-utilities/nav.html)
The tool do a simple calculation of the NAV (Net-Assets-Value) of XMM units.

It's performing the task in three simple steps:

  1. sum up the assets from all accounts of XMM. 
  2. check with RippleCharts.com the prices of USD, CNY, and BTC measured in XRP.
  3. measure values of XMM's assets with the exchange rates, and hence NAV per XMM.


Several thing worth pointing out here -- 

First, we are using 1-hr-average exchange-rates from RippleCharts.com (see RippleData-API ). In my opinion, average prices over certain time-range is the more suitable figures than spot prices for measuring the value of assets. I think one-hour-average is a good reference given the high volatility of XRP, but people may have different arguments regarding the best range.

Then, though we understand that same kind of IOUs by different issuers may have different market value, for sake of simplicity I use only single price for each assets class. (to be particular, prices of USD.Bitstamp, BTC.Bitstamp and CNY.RippleChina are used for USD, BTC and CNY). And for those IOUs of low trading volume (EUR, XAG, etc), their market rates in Ripple are sometimes absent or too volatile due to thin-volume and high-spread. Hence their prices in XRP are instead calculated with price of USD and a given exchange-rates (this is what those input-boxes are there for). 

I hope this tool could help some XMM holders to evaluate the underlying-value of our Fund. A similar codes were used by the bot that's performing our automatic redemption/new-issue offers. 


Warning:
I'm newb in codings... So, please be aware that these tools may contain tons of bugs and unpredictable behaviour. Do not expect them to always provide accurate result.


Thanks:
to hmalmedal (https://github.com/hmalmedal), whose ripple-utilities codes helped me a lots in learning basic javascript with ripple-lib.

and also Steven Zeiler, whose videos on Youtube is another great resource!
https://www.youtube.com/playlist?list=PLtDBLDfob7PNhdvhl4Gy2zPkK4z3rPBxR

Tuesday 10 June 2014

Moving towards Automation.


Automation of Buyback-Mechanism
Date of Commencement: 18-June-2014, Wednesday.

Since the beginning of this project, the buy-back mechanism of our Fund was being done manually, which consumed lots of my time and energy.

Recently I managed to build a bot for monitoring the NAV (net asset value) of our Fund, and adjusting buyback price accordingly. I had been testing the bot for more than two weeks and it seems to work quite well. Hence, I had made a decision to put the buy-back mechanism of XMM into automation.

Starting from the next Wednesday, the tasks of updating buy-back/new-sell quotes from Hotwallet will be done by a bot on my computer.

Configurations of the Bot.
Spread: 
The buy-back and new-issue prices will be quoted with a spread of ~5%,
i.e. selling new units at ~2.5% premium, and buying-back at ~2.5% discount to NAV.

Volume: 
The volume quoted on each side will be equivalent to about 5% of total unit-in-circulation.

Update interval: 
The bot will be adjusting the prices every one hour. However, this 1-hour-interval is not a guarantee since it may be impacted by many factors... e.g. the bot may not be able to update XMM prices when queries to Rippled-servers/RippleCharts fail, when facing slow network connection, power-failure, insufficient fund in hotwallet, etc.


More Bots for market-making.
Others bots had been developed to help performing some market-making tasks for our Fund.

As a test start, we had already automated our support for XAG/XRP pair with a bot few days ago. If everything proceed smoothly, more bots will be deployed for other currency pairs from next week onwards.

We hope that with the automation processes, our Fund could perform the tasks more efficiently, and be able to provide more liquidity for more currencies pairs in Ripple ecosystem.

Wish that my workload will decrease significantly thereafter, and I shall move on to other projects.
-------------------------------------------------------------------------------
signature: H5ylrp9CO0a9uhCNjevsIVZB9vgt3jFEkpaRcDfHaKjIxslptqz1dsdAna/8WlEjh28CLPhOfBCyhm77071nSS4=

Wednesday 4 June 2014

Monthly Report, May-2014.


Unit Value and Return Rate
Historical NAV of XMM unit, measured in different currencies:




(exchange rate)^

XMM/XRP XMM/USD* XMM/BTC* USD/XRP BTC/XRP
28/02/14 1.000 0.01420 0.00002481 70.44 40,300
31/03/14 1.426 0.01306 0.00002755 109.14 51,761
30/04/14 2.590 0.01370 0.00003103 188.98 83,466
31/05/14 3.084 0.01243 0.00002057 248.08 149,903

* Calculated based on the exchange-rates listed on the right columns.
^ exchange-rates are vwap of IOU.Bitstamp on the last day of each month (source: ripplecharts.com).

Montly return rate, measured in different currencies:


~XRP ~USD ~BTC average
Mar-2014 42.6% -8.0% 11.0% 15.2%
Apr-2014 81.6% 4.9% 12.6% 33.0%
May-2014 19.1% -9.3% -33.7% -8.0%

3-months return
(28/2 ~ 31/5)
208.4% -12.4% -17.1% 59.6%

Review and Comment:
In May, NAV of our fund appreciate 19% against XRP. However, it depreciated 9% against USD, and losing 34% as compared to BTC. Taking the average, our fund was suffering a loss of 8% during the month.

Reasons for the poorer performance in May:
  • Increase in Fund size. (profitability tends to drop with bigger size of fund).
  • Fund manager was on vacation during the last 10 days of the month, hence no trading or market-making activities during that period.
  • I was spending more time on learning API and coding skill for developing some trading bots, hence less time was allocated for monitoring the markets and performing trades.

For the 3-months period ended 31st-May, our Fund recorded a +59.6% total return in average.


Market Making Activities
For BTC/XRP markets (about half of our assets was allocated for BTC/XRP) -- Our main focus was on Bitstamp and btc2ripple, and smaller support on Justcoin and The Rock Trading.

For Fiats-IOUs -- our main focus were still in USD and CNY, for the gateways Bitstamp, SnapSwap, RippleChina and RippleCN, with smaller amount of support for USD.RippleSingapore. We are considering to allocate some little resources for the IOUs of new members on IRBA list, namely Coinex and Bitso.

About 8% of our asset was allocated for silver market of XAG.RippleSingapore.
It's likely to add gold (XAG.RippleSingapore) into our portfolio in near future.


Units and Holders Analysis


Unit in Circulation
28/02/14 111,042
31/03/14 167,198
30/04/14 245,885
31/05/14 424,209


Number of holders on 31st-May
< 10 unit8
[10 – 100)7
[100 – 1000)22
[1k – 10k)30
>= 10k10
TOTAL77


Buy-back and New Issue
About 178k new units of XMM was issued during the month, represent an increase of >70% units-in-circulation as compared to end of April. The buy-back and new-issue prices were quoted with spread of ~7% most of time.

After some efforts learning nodejs and ripple-lib, I manage to develop a simple bot for monitoring NAV of our Fund and adjusting the buyback price automatically. The bot is still in beta and I'm testing it with a personal trading account. If everything work out smoothly, then the buyback mechanism of our Fund will probably be made fully automated soon (an official announcement will be made through this blog-page before any change taking effect).

If the automation of buyback mechanism is implemented successfully, XMM will then choose to stay in its current profit-accumulated model. Anyway, since we had seen a strong demand for dividend-payment fund from the discussions on xrptalks.org, I may consider to launch a new fund in profit-payout model (provided that I got extra time/energy for it).


Others
Recently I'm spending more time and effort in coding, for the automation of market-making activities. I hope that with the help of some trading bots, my workload may be decreased significantly. Then our Fund would be able to provide liquidity for more currency pairs and more gateways in the future.

There are also ideas of launching some low-risk funds (only trading single currency) in which market-making processes are totally automated with bots, and profit are being distributed through dividends.

And I'm happy to see that we got competitor now -- FMM fund operated by RippleFox.
Some dicussions and references about FMM:
https://xrptalk.org/topic/2567-ripplefox-market-making-fund/
https://xrptalk.org/topic/2738-ripplefox-fmm-updates/

Wish there will be more market-makers joining Ripple, for better health of the ecosystem.