Author Topic: Probability Density Curves for BitAsset feed, bid and ask vs. market price  (Read 5655 times)

0 Members and 1 Guest are viewing this topic.

Offline wasthatawolf

I just removed the bad row of data.  Modifying the script to try and prevent that from happening again.

Offline arhag

  • Hero Member
  • *****
  • Posts: 1214
    • View Profile
    • My posts on Steem
  • BitShares: arhag
  • GitHub: arhag
@wasthatawolf, there is a problem with item 563 in the data (for both BitUSD and BitBTC). The feed/bid/ask prices are given as 0. This throws off the calculation of the mean and standard deviation.

I fixed the problem on my end by filtering out the erroneous data. You can compare the change by comparing http://jsfiddle.net/wb45otcd/2/ to http://jsfiddle.net/wb45otcd/3/.

Offline wasthatawolf

I built the visualization tools I was talking about. Check it out here: http://jsfiddle.net/wb45otcd/.

It scrapes the data off your website by the way, hope you don't mind.

Awesome!  This is great.  No need for a fixed window. 

Feel free to scrape, I'll put together a json API to make the data more accessible.

Offline arhag

  • Hero Member
  • *****
  • Posts: 1214
    • View Profile
    • My posts on Steem
  • BitShares: arhag
  • GitHub: arhag
I built the visualization tools I was talking about. Check it out here: http://jsfiddle.net/wb45otcd/3.

It scrapes the data off your website by the way, hope you don't mind.
« Last Edit: December 23, 2014, 04:17:36 pm by arhag »

Offline wasthatawolf

Edit: By the way, do you think you could calculate these statistics in a moving window of the data and use it to generate an animated plot (or a live generated plot using Javascript that can adjust the plots using a slider representing time)? It would be interesting to see how these curves evolve with time.

Interesting idea, an animation or slider would be a great way to visualize how the data changes over time.  An easier way might be to create line charts of each variance vs time and use the standard deviation to create confidence bands.

Once I've collected enough data, my plan is to generate these plots with the most recent 672 data points (one week's worth of data).  This will help to keep the probability functions relevant when evaluating the current market.

Offline davidpbrown

Very interesting.. it would be useful to see CNY and perhaps Gold.. and later any other markets of consequence.
฿://1CBxm54Ah5hiYxiUtD7JGYRXykT5Z6ZuMc

Offline arhag

  • Hero Member
  • *****
  • Posts: 1214
    • View Profile
    • My posts on Steem
  • BitShares: arhag
  • GitHub: arhag
Wow, this is great stuff.

I find it interesting that the mean of the feed price curve for both BitAssets is shifted to the right. I'm speculating this has to do with the asymmetry in how quickly delegates update feed prices depending on whether it is going up vs going down. If cmc_bts value drops (which means the price of BTS relative to the BitAsset, such as BitUSD, goes up) the bts_feed value can lag a bit without any worry. While if cmc_bts value increases, the lag until the bts_feed value updates should be much shorter so that the correct price information can be quickly updated in the blockchain to properly handle margin calls when the price is falling quickly. Anyone see a mistake with this interpretation or perhaps a different explanation for the data?

Having the bid and ask curves peak to the left of the feed mean in the case of BitUSD also makes sense to me. People selling actual BitUSD to get back into BTS need to compete with the superbulls short sellling BitUSD at the price feed by offering better asks. But the bid and ask curves for BitBTC are pretty surprising, although it is consistent with the order book I usually see in the BTS/BitBTC market (barely anyone shorting, and the actual BitBTC holders only willing to sell for an overvalued price). Perhaps that market is just too small currently to make any meaningful interpretations from the data.

And finally, the variance difference between the various curve peaks is still so high for the BitUSD market. It shows how bad the liquidity is currently in even our most liquid BitAsset. Can't wait to see those curves squeeze sharper, the peaks get closer together, and the peaks all move closer to zero.


Edit: By the way, do you think you could calculate these statistics in a moving window of the data and use it to generate an animated plot (or a live generated plot using Javascript that can adjust the plots using a slider representing time)? It would be interesting to see how these curves evolve with time.
« Last Edit: December 21, 2014, 11:45:27 pm by arhag »

Offline wasthatawolf

I setup a site to analyze the USD and BTC price pegs by comparing the asset feed, bid and ask prices to the market price of BTS on Coinmarketcap.  The price variance mean and standard deviation are calculated to produce Probability Density Curves.  Data is recorded every fifteen minutes.

http://delegate.ninja/assets/?t=bitbtc

http://delegate.ninja/assets/?t=bitusd