BitShares Forum

Main => General Discussion => Topic started by: bytemaster on November 19, 2014, 05:36:03 pm

Title: Feed Statistics
Post by: bytemaster on November 19, 2014, 05:36:03 pm
Could someone please create a histogram of FEED price vs REALTIME price for BTC/BTSX?   

It would be great if we had historical data as well.   I would like the sample rate to be on the order of every minute or every 5 minutes.   

Once we know the error distribution we can calculate the risk profile for market makers.
Title: Re: Feed Statistics
Post by: wasthatawolf on November 21, 2014, 02:39:41 am
I put this together using Google Sheets, updates every 5 minutes using data from coinmarketcap and bitsharesblocks.com scraped via Kimonolabs API (script can easily be modified to use a more stable API).

https://docs.google.com/spreadsheets/d/1OqL3ysiSblO3PZgUX4vYcM78yUD4kt4tBF8rfQTpQLg/edit?usp=sharing

The Google Charts class is somewhat limited and won't allow creation of a Histogram chart via script.  I created two full sheet charts for histograms of the bid variance and ask variance from median feed price.  For up to date charts, you just need to modify the chart data to include the latest row.
Title: Re: Feed Statistics
Post by: yangsbo on November 21, 2014, 03:49:34 am
@bytemaster

I suggest using Chinese system of stock market
1  10% daily price fluctuation limit and T+1 transaction。
2  Cancel the feed price
3  after a period of time, if the prices trading steady on great scale of transaction ,cancel  these restrictions。
Title: Re: Feed Statistics
Post by: wasthatawolf on November 21, 2014, 04:15:55 am

Could someone please create a histogram of FEED price vs REALTIME price for BTC/BTSX?   

It would be great if we had historical data as well.   I would like the sample rate to be on the order of every minute or every 5 minutes.   

Once we know the error distribution we can calculate the risk profile for market makers.

Hahaha just re-read what you were asking for, I wasn't even close!

BTS/BitUSD data is still interesting though...
Title: Re: Feed Statistics
Post by: abit on November 21, 2014, 05:26:16 am
Blocksharesblocks.com may have this data.
@svk
Title: Re: Feed Statistics
Post by: bytemaster on November 21, 2014, 10:12:49 am
Bump
Title: Re: Feed Statistics
Post by: svk on November 21, 2014, 10:23:31 am
Bump

I'm not sure I get what you want in your histogram. One could make a histogram using the delta between the feed and the real price over a given period, 1hr for example. So the x-axis would be the delta range, the y values the count for each range of delta values over the period.

Is that what you want?

@wasthatawolf I could provide an API for you, but may not have time to do so over the weekend..
Title: Re: Feed Statistics
Post by: bytemaster on November 21, 2014, 10:24:35 am
Bump

I'm not sure I get what you want in your histogram. One could make a histogram using the delta between the feed and the real price over a given period, 1hr for example. So the x-axis would be the delta range, the y values the count for each range of delta values over the period.

Is that what you want?

@wasthatawolf I could provide an API for you, but may not have time to do so over the weekend..

Yes that is what I would like.   Potentially on a per-delegate basis.   
Title: Re: Feed Statistics
Post by: svk on November 21, 2014, 10:28:04 am
Bump

I'm not sure I get what you want in your histogram. One could make a histogram using the delta between the feed and the real price over a given period, 1hr for example. So the x-axis would be the delta range, the y values the count for each range of delta values over the period.

Is that what you want?

@wasthatawolf I could provide an API for you, but may not have time to do so over the weekend..

Yes that is what I would like.   Potentially on a per-delegate basis.

Ok, I'll have to start tracking historical data for feeds to implement this, and increase the sampling time for price data. Added to my TODO list..
Title: Re: Feed Statistics
Post by: xeroc on November 21, 2014, 10:59:03 am
I do have a current snapshot:
http://coins.die-schuhs.de/feed-stats.txt

updated every 30 minutes ..

script:
https://github.com/xeroc/pytshares/blob/master/publishedfeedsstats.py
Title: Re: Feed Statistics
Post by: wasthatawolf on November 21, 2014, 02:09:55 pm
@wasthatawolf I could provide an API for you, but may not have time to do so over the weekend..

Thanks! No rush, whenever you have a chance would be great.

Though not what BM had originally asked for, for anyone that's interested I created another sheet for BITBTC/BTS which tracks Median Feed price vs BitShares Asset Exchange bid and ask.  Histograms auto update on both BITBTC and BITUSD spreadsheets now.

https://docs.google.com/spreadsheets/d/1rwQrzCMlKAzU5bMfBW-OnfrhRSercDQiI4YmVYfqfVQ/edit?usp=sharing
Title: Re: Feed Statistics
Post by: wasthatawolf on November 21, 2014, 02:46:50 pm
Here we go, I think this is in line with what BM is was originally looking for...

median feed price for bitbtc vs. btsx/btc current price (from coinmarketcap)

https://docs.google.com/spreadsheets/d/1gkXcRmpxFXv485A4ppIC0meG7DRyjBu8hQnpj6nuNxE/edit?usp=sharing
Title: Re: Feed Statistics
Post by: wasthatawolf on November 21, 2014, 05:27:01 pm
Histogram showing data from the past three hours...

(http://i.imgur.com/WStUPGZ.png)
Title: Re: Feed Statistics
Post by: svk on November 21, 2014, 06:04:33 pm
Histogram showing data from the past three hours...

(http://i.imgur.com/WStUPGZ.png)

Good job! I'll see if i can get a feed going tomorrow for you cause that scraper is throwing off my google analytics stats..
Title: Re: Feed Statistics
Post by: Riverhead on November 21, 2014, 06:16:18 pm
Your graph is flipping us off. I hope that's not an omen  :o
Title: Re: Feed Statistics
Post by: wasthatawolf on November 21, 2014, 06:51:40 pm
Good job! I'll see if i can get a feed going tomorrow for you cause that scraper is throwing off my google analytics stats..

Sweeeet, my wishlist for the API is...

-current median price feed for BitBTC and BitUSD
-current bid and ask for BitBTC and BitUSD
Title: Re: Feed Statistics
Post by: wasthatawolf on November 22, 2014, 04:18:03 pm
Here's a link to the live chart, updated every 5 min:
 
https://docs.google.com/spreadsheets/d/1gkXcRmpxFXv485A4ppIC0meG7DRyjBu8hQnpj6nuNxE/pubchart?oid=313553473&format=interactive

Last 24hrs...

(http://i.imgur.com/Nf68AfQ.png)
Title: Re: Feed Statistics
Post by: wasthatawolf on November 24, 2014, 04:21:55 pm
Thanks to @svk I have a much more reliable data feed from the BTS blockchain.  I've also modified the price feed from Coinmarketcap.  The two feeds now capture live data every 5 minutes within seconds of one another.

I've reset the data and it's now running comparison data for BTC and USD.

BTC live histogram
https://docs.google.com/spreadsheets/d/1gkXcRmpxFXv485A4ppIC0meG7DRyjBu8hQnpj6nuNxE/pubchart?oid=313553473&format=interactive (https://docs.google.com/spreadsheets/d/1gkXcRmpxFXv485A4ppIC0meG7DRyjBu8hQnpj6nuNxE/pubchart?oid=313553473&format=interactive)

USD live histogram
https://docs.google.com/spreadsheets/d/1gkXcRmpxFXv485A4ppIC0meG7DRyjBu8hQnpj6nuNxE/pubchart?oid=805422327&format=interactive (https://docs.google.com/spreadsheets/d/1gkXcRmpxFXv485A4ppIC0meG7DRyjBu8hQnpj6nuNxE/pubchart?oid=805422327&format=interactive)

Data
https://docs.google.com/spreadsheets/d/1gkXcRmpxFXv485A4ppIC0meG7DRyjBu8hQnpj6nuNxE/edit?usp=sharing (https://docs.google.com/spreadsheets/d/1gkXcRmpxFXv485A4ppIC0meG7DRyjBu8hQnpj6nuNxE/edit?usp=sharing)
Title: Re: Feed Statistics
Post by: bytemaster on November 24, 2014, 07:56:43 pm
This is great data and shows the feed can be off by up to 2% in either direction (so far). 

Title: Re: Feed Statistics
Post by: wasthatawolf on November 25, 2014, 04:27:47 pm
I've created live normal distribution curves for both BTC and USD data sets... 

BTC - Normal Distribution Curve
https://docs.google.com/spreadsheets/d/1gkXcRmpxFXv485A4ppIC0meG7DRyjBu8hQnpj6nuNxE/pubchart?oid=587515421&format=interactive (https://docs.google.com/spreadsheets/d/1gkXcRmpxFXv485A4ppIC0meG7DRyjBu8hQnpj6nuNxE/pubchart?oid=587515421&format=interactive)

USD - Normal Distribution Curve
https://docs.google.com/spreadsheets/d/1gkXcRmpxFXv485A4ppIC0meG7DRyjBu8hQnpj6nuNxE/pubchart?oid=421419303&format=interactive (https://docs.google.com/spreadsheets/d/1gkXcRmpxFXv485A4ppIC0meG7DRyjBu8hQnpj6nuNxE/pubchart?oid=421419303&format=interactive)
Title: Re: Feed Statistics
Post by: wasthatawolf on December 01, 2014, 02:41:19 am
Calculated min and max feed to market price variances based on this past week's data...

https://docs.google.com/spreadsheets/d/1gkXcRmpxFXv485A4ppIC0meG7DRyjBu8hQnpj6nuNxE/pubhtml?gid=813917438&single=true (https://docs.google.com/spreadsheets/d/1gkXcRmpxFXv485A4ppIC0meG7DRyjBu8hQnpj6nuNxE/pubhtml?gid=813917438&single=true)
Title: Re: Feed Statistics
Post by: wasthatawolf on December 01, 2014, 04:05:10 pm
Looks like there's an issue with the feed from bitsharesblocks.com so I stopped the trigger from updating any further.  There's just about a weeks worth of data.

@Bytemaster - let me know if you think this Google Sheet and script is useful and I can send you over the original project.
Title: Re: Feed Statistics
Post by: svk on December 01, 2014, 04:38:07 pm
Looks like there's an issue with the feed from bitsharesblocks.com so I stopped the trigger from updating any further.  There's just about a weeks worth of data.

@Bytemaster - let me know if you think this Google Sheet and script is useful and I can send you over the original project.

What's the issue? Seems to be working for me.
Title: Re: Feed Statistics
Post by: wasthatawolf on December 01, 2014, 05:29:01 pm
Looks like there's an issue with the feed from bitsharesblocks.com so I stopped the trigger from updating any further.  There's just about a weeks worth of data.

@Bytemaster - let me know if you think this Google Sheet and script is useful and I can send you over the original project.

What's the issue? Seems to be working for me.

BTC and GOLD feeds are missing, http://joelooney.org/btsblocks/test.php

Title: Re: Feed Statistics
Post by: svk on December 01, 2014, 05:56:13 pm
Looks like there's an issue with the feed from bitsharesblocks.com so I stopped the trigger from updating any further.  There's just about a weeks worth of data.

@Bytemaster - let me know if you think this Google Sheet and script is useful and I can send you over the original project.

What's the issue? Seems to be working for me.

BTC and GOLD feeds are missing, http://joelooney.org/btsblocks/test.php
Indeed, found an issue and fixed it, should work now.
Title: Re: Feed Statistics
Post by: santaclause102 on December 01, 2014, 07:27:22 pm
This is great data and shows the feed can be off by up to 2% in either direction (so far).
Can that be a problem (in that traders or shorters could profit from this without risk) or does the feed only serve as rails here to not allow to short bitusd to zero?
Title: Re: Feed Statistics
Post by: CLains on December 01, 2014, 09:54:02 pm
Love the stats  +5%
Title: Re: Feed Statistics
Post by: Mysto on December 01, 2014, 10:21:25 pm
Your graph is flipping us off. I hope that's not an omen  :o
LOL I died! XD
Title: Re: Feed Statistics
Post by: Mysto on December 01, 2014, 10:25:18 pm
Love the stats  +5%
+5%
Title: Re: Feed Statistics
Post by: wasthatawolf on December 02, 2014, 12:47:25 am
Looks like there's an issue with the feed from bitsharesblocks.com so I stopped the trigger from updating any further.  There's just about a weeks worth of data.

@Bytemaster - let me know if you think this Google Sheet and script is useful and I can send you over the original project.

What's the issue? Seems to be working for me.

BTC and GOLD feeds are missing, http://joelooney.org/btsblocks/test.php
Indeed, found an issue and fixed it, should work now.

Great!  I've started collecting data again in a new spreadsheet...

https://docs.google.com/spreadsheets/d/170QMcBj35e84h3TMogo61fFIeeCpZ7T57TS9fDvRP1k/edit?usp=sharing


Last week's data can be found here:
https://docs.google.com/spreadsheets/d/1gkXcRmpxFXv485A4ppIC0meG7DRyjBu8hQnpj6nuNxE/edit?usp=sharing