Author Topic: Price Feed Difference  (Read 2337 times)

0 Members and 1 Guest are viewing this topic.

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Price Feed Difference
« on: September 25, 2014, 10:32:22 pm »
There are 2 widely used price feed scripts.
Alt's and Xeroc's version.
They produce different results due to additional exchanges added by xeroc.
However the volume on these exchanges is much lower and some might argue their weight in the price calculation should be reduced.
See the volume for yourself at http://coinmarketcap.com/currencies/bitshares-x/#markets.
I'd say mean price weighted by volume might be the best choice here.
Other suggestions ?

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
Re: Price Feed Difference
« Reply #1 on: September 25, 2014, 10:55:34 pm »
Always have been of the same opinion.
Shouldn't be a rocket science to be done in the script. Even the use of historic volumes will be better than non-weighted average/median.
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12903
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Price Feed Difference
« Reply #2 on: September 26, 2014, 06:56:54 am »
*agreed* ... my script was a first shot and probably will change (improve) over time .. thanks for pointing it out!

But I am not so sure if it fits to "building the median over all exchange prices" :|
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Re: Price Feed Difference
« Reply #3 on: September 26, 2014, 07:04:03 am »
*agreed* ... my script was a first shot and probably will change (improve) over time .. thanks for pointing it out!

But I am not so sure if it fits to "building the median over all exchange prices" :|
Yes it is not exactly like that.
However, even though it accounts for specific currency pairs and does additional conversions it still accounts for the price derived from low volume exchanges the same as the price derived from high volume exchanges.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
Re: Price Feed Difference
« Reply #4 on: September 26, 2014, 07:12:59 am »
*agreed* ... my script was a first shot and probably will change (improve) over time .. thanks for pointing it out!

But I am not so sure if it fits to "building the median over all exchange prices" :|
Yes it is not exactly like that.
However, even though it accounts for specific currency pairs and does additional conversions it still accounts for the price derived from low volume exchanges the same as the price derived from high volume exchanges.

Is it really that hard to provide weighted price feed? Give me a break... I, myself, can probably learn enough python (or whatever) to change it in a day or 3.....
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12903
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Price Feed Difference
« Reply #5 on: September 26, 2014, 07:15:35 am »
It is not difficult ... but at the end you will have the choice between

1) average over weighted-by-volume exchange prices
2) median over exchange prices

right?
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Re: Price Feed Difference
« Reply #6 on: September 26, 2014, 07:16:29 am »
Is it really that hard to provide weighted price feed? Give me a break... I, myself, can probably learn enough python (or whatever) to change it in a day or 3.....
It is not about writing the script. It is about convincing everyone to use that technique.
It is useless to provide such script if noone uses it.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
Re: Price Feed Difference
« Reply #7 on: September 26, 2014, 07:25:49 am »
It is not difficult ... but at the end you will have the choice between

1) average over weighted-by-volume exchange prices
2) median over exchange prices

right?

I do not care about the median if 95% of the trade volume is at some other price.

right?
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12903
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Price Feed Difference
« Reply #8 on: September 26, 2014, 07:29:11 am »
conclusion: we should go by 1)

makes sense!
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
Re: Price Feed Difference
« Reply #9 on: September 26, 2014, 07:32:30 am »
conclusion: we should go by 1)

makes sense!

YES it does!

Which on is easier? - To manipulate the price  at 9 exchanges with 5 trade volume or at one with 100 trade volume?
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12903
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Price Feed Difference
« Reply #10 on: September 26, 2014, 07:35:59 am »
Which on is easier? - To manipulate the price  at 9 exchanges with 5 trade volume or at one with 100 trade volume?
That's why I am polling multiple exchanges and derive the MEDIAN ...

however you are right as the whole median thing only makes sense if I polled like 20 exchanges and not only 3-4 ..
Gonna pimp my script towards volume-based averaging .. this evening
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline cryptillionaire

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: Price Feed Difference
« Reply #11 on: September 26, 2014, 08:27:25 am »
http://www.xe.com/datafeed/ Has anyone considered using a professional source of currency data?
It actually looks quite expensive:
Quote
Daily: US $540 / year
Hourly: US $2,160 / year
Quarter Hour: US $4,320 / year
Minute: US $6,480 / year

Any alternatives? I could see the quarter hour being justified once delegates are earning above that, but for now it's a massive expense..

Alternatives:
http://www.xignite.com/forex/product

...Think one of us could grab said feeds and distribute it? Kinda a breach of ToS.. hmm : /
« Last Edit: September 26, 2014, 08:33:23 am by cryptillionaire »

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Re: Price Feed Difference
« Reply #12 on: September 26, 2014, 08:30:16 am »
http://www.xe.com/datafeed/ Has anyone considered using a professional source of currency data?
It actually looks quite expensive:
Quote
Daily: US $540 / year
Hourly: US $2,160 / year
Quarter Hour: US $4,320 / year
Minute: US $6,480 / year

Any alternatives? I could see the quarter hour being justified once delegates are earning above that, but for now it's a massive expense..

Only if BitsharesX blockchain was legal entity able to purchase the above-mentioned feed....
It could pay for the bills from the fees.

Offline cryptillionaire

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: Price Feed Difference
« Reply #13 on: September 26, 2014, 08:39:07 am »
http://www.xe.com/datafeed/ Has anyone considered using a professional source of currency data?
It actually looks quite expensive:
Quote
Daily: US $540 / year
Hourly: US $2,160 / year
Quarter Hour: US $4,320 / year
Minute: US $6,480 / year

Any alternatives? I could see the quarter hour being justified once delegates are earning above that, but for now it's a massive expense..

Only if BitsharesX blockchain was legal entity able to purchase the above-mentioned feed....
It could pay for the bills from the fees.
Well.. delegates could individually purchase said feeds.. perhaps all of the delegates could create a corporation (perhaps establishing itself as a single entity) and get a single license for an expensive price feed and allow everyone to use it?

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12903
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Price Feed Difference
« Reply #14 on: September 26, 2014, 08:52:48 am »
I am here, on this forum that is, for several proposes (self appointed, btw).... One of them is to post the below regarding your bolded text:

...
what tonyk wants to say is: Cooperation of delegates is a NO-GO!!
« Last Edit: September 26, 2014, 10:10:50 am by testz »
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline cryptillionaire

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: Price Feed Difference
« Reply #15 on: September 26, 2014, 09:06:32 am »
http://www.xe.com/datafeed/ Has anyone considered using a professional source of currency data?
It actually looks quite expensive:
Quote
Daily: US $540 / year
Hourly: US $2,160 / year
Quarter Hour: US $4,320 / year
Minute: US $6,480 / year

Any alternatives? I could see the quarter hour being justified once delegates are earning above that, but for now it's a massive expense..

Only if BitsharesX blockchain was legal entity able to purchase the above-mentioned feed....
It could pay for the bills from the fees.
Well.. delegates could individually purchase said feeds.. perhaps all of the delegates could create a corporation (perhaps establishing itself as a single entity) and get a single license for an expensive price feed and allow everyone to use it?

I am here, on this forum that is, for several proposes (self appointed, btw).... One of them is to post the below regarding your bolded text:

...
Woah! Very hostile man, check yourself before you wreck yourself.
So to what degree do you massively disagree with delegate relations? Are we allowed to talk to each other, are we allowed to use the same professional/paid for fiat price feeds, are we not allowed to establish a foundation?
« Last Edit: September 26, 2014, 10:11:06 am by testz »

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12903
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Price Feed Difference
« Reply #16 on: September 26, 2014, 09:10:16 am »
So to what degree do you massively disagree with delegate relations?
Are we allowed to talk to each other, are we allowed to use the same professional/paid for fiat price feeds, are we not allowed to establish a foundation?
What sense does it make to have an median price feed on the exchange if delegates use the same external source?

what if mining pool operators in bitcoin would collude?

It's not forbidden to talk to each other .. but once you start ... things up and trick the network, the stakeholders will find out and propose a downvote ... that will work much more efficiently than a ghash poll on reddit ..
« Last Edit: September 26, 2014, 10:12:11 am by testz »
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline cryptillionaire

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: Price Feed Difference
« Reply #17 on: September 26, 2014, 09:34:59 am »
So to what degree do you massively disagree with delegate relations?
Are we allowed to talk to each other, are we allowed to use the same professional/paid for fiat price feeds, are we not allowed to establish a foundation?
What sense does it make to have an median price feed on the exchange if delegates use the same external source?

what if mining pool operators in bitcoin would collude?

It's not forbidden to talk to each other .. but once you start ... things up and trick the network, the stakeholders will find out and propose a downvote ... that will work much more efficiently than a ghash poll on reddit ..
Are we not moving towards a similar scenario with there only being two(?) python scripts for delegates to publish feeds with? Of which many delegates just use the default feeds, putting power into the hands of the exchanges to manipulate our market.
« Last Edit: September 26, 2014, 10:12:30 am by testz »

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12903
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Price Feed Difference
« Reply #18 on: September 26, 2014, 09:44:07 am »
we don't want the exchange to be able to manipulate our markets.. thus:
each delegate should:
 - poll a different set of exchanges
 - run the script at slightly different times
 - have a individual script/set of rules!

this is also something that can be used to market a delegate ..
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline liondani

  • Hero Member
  • *****
  • Posts: 3732
  • Inch by inch, play by play
    • View Profile
    • My detailed info
  • BitShares: liondani
  • GitHub: liondani
Re: Price Feed Difference
« Reply #19 on: September 26, 2014, 11:01:28 am »
1.It's very important to have more big exchanges that trade BTSX

2.What about if the 101 first standby delegates are allowed to publish feeds too, and of course will get paid for their service ;)
   After all bytemaster is considering seriously to pay stand by delegates because they are "working" too... Have ready online servers in case they get active,update the client version like all of us, and perhaps now publish also   feeds...After all if they get paid they have the motive to contribute  and be prepared in case they get active.

So what I am saying is to give to standby delegates some responsibilities (like publishing feeds) and pay them  for their work, of course !
It would be also easier to identify serious stand by delegates and vote them up to the active delegates ...   ;)


PS It will be more accurate to have price feeds from 202 potential delegates instead of 101...
« Last Edit: September 26, 2014, 11:03:53 am by liondani »

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12903
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Price Feed Difference
« Reply #20 on: September 26, 2014, 11:05:19 am »
It would be also easier to identify serious stand by delegates and vote them up to the active delegates ...   ;)
+5% .. there are currently a lot of lazy (ie, unserious) delegates in the top101 that do not publish feeds at all :(

Quote
PS It will be more accurate to have price feeds from 202 potential delegates instead of 101...
not necessarily .. it just leads to more variance (higher deviation)
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
Re: Price Feed Difference
« Reply #21 on: September 26, 2014, 12:20:00 pm »
http://www.xe.com/datafeed/ Has anyone considered using a professional source of currency data?
It actually looks quite expensive:
Quote
Daily: US $540 / year
Hourly: US $2,160 / year
Quarter Hour: US $4,320 / year
Minute: US $6,480 / year

Any alternatives? I could see the quarter hour being justified once delegates are earning above that, but for now it's a massive expense..

Only if BitsharesX blockchain was legal entity able to purchase the above-mentioned feed....
It could pay for the bills from the fees.
Well.. delegates could individually purchase said feeds.. perhaps all of the delegates could create a corporation (perhaps establishing itself as a single entity) and get a single license for an expensive price feed and allow everyone to use it?

I am here, on this forum that is, for several proposes (self appointed, btw).... One of them is to post the below regarding your bolded text:

...
Woah! Very hostile man, check yourself before you wreck yourself.
So to what degree do you massively disagree with delegate relations? Are we allowed to talk to each other, are we allowed to use the same professional/paid for fiat price feeds, are we not allowed to establish a foundation?

The current situation with only 2 feed scripts is far from ideal...suggestions to make this undesirable situation permanent, with all of them paying /receiving the same feed, is nothing short of outrageous....
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Re: Price Feed Difference
« Reply #22 on: September 26, 2014, 12:26:23 pm »
The current situation with only 2 feed scripts is far from ideal...suggestions to make this undesirable situation permanent, with all of them paying /receiving the same feed, is nothing short of outrageous....

No but it could be possible to buy multiple feeds. However this is significant legal trouble...

Offline cryptillionaire

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: Price Feed Difference
« Reply #23 on: September 26, 2014, 12:33:00 pm »
The current situation with only 2 feed scripts is far from ideal...suggestions to make this undesirable situation permanent, with all of them paying /receiving the same feed, is nothing short of outrageous....

No but it could be possible to buy multiple feeds. However this is significant legal trouble...
Yeah, I even posted two options we could use. IMO, I'd think that these paid for services would be more reliable than say yahoo's finance tickers, because there's already thousands of forex traders using these services. Do what you want man, i'll be doing this when delegate income can cover the expenses.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12903
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Price Feed Difference
« Reply #24 on: September 26, 2014, 12:40:25 pm »
If I see this correctly, the biggest difference is latency!?! is it?

As I see it, feeds will be useless (can be deactivated) once the volume is high enough to exploit the delay .. or am i mistaken?
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Re: Price Feed Difference
« Reply #25 on: September 26, 2014, 12:41:00 pm »
The current situation with only 2 feed scripts is far from ideal...suggestions to make this undesirable situation permanent, with all of them paying /receiving the same feed, is nothing short of outrageous....

No but it could be possible to buy multiple feeds. However this is significant legal trouble...
Yeah, I even posted two options we could use. IMO, I'd think that these paid for services would be more reliable than say yahoo's finance tickers, because there's already thousands of forex traders using these services. Do what you want man, i'll be doing this when delegate income can cover the expenses.

You should carefully read the license because you are essentially redistributing the feed. I'm not sure if that is permitted.

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Re: Price Feed Difference
« Reply #26 on: September 26, 2014, 12:42:00 pm »
If I see this correctly, the biggest difference is latency!?! is it?

As I see it, feeds will be useless (can be deactivated) once the volume is high enough to exploit the delay .. or am i mistaken?

Currently feeds hold the peg by preventing shorting at lower prices. I doubt they will be removed unless significant confidence in the peg is accumulated.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12903
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Price Feed Difference
« Reply #27 on: September 26, 2014, 12:44:24 pm »
.... unless significant confidence in the peg is accumulated.
That's what I am hoping for :) (plus some few millions in liquidity at the peg (or very close to it)
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
Re: Price Feed Difference
« Reply #28 on: September 26, 2014, 12:49:44 pm »
The current situation with only 2 feed scripts is far from ideal...suggestions to make this undesirable situation permanent, with all of them paying /receiving the same feed, is nothing short of outrageous....

No but it could be possible to buy multiple feeds. However this is significant legal trouble...
Yeah, I even posted two options we could use. IMO, I'd think that these paid for services would be more reliable than say yahoo's finance tickers, because there's already thousands of forex traders using these services. Do what you want man, i'll be doing this when delegate income can cover the expenses.

Do as you wish... just do not suggest something like this:


perhaps all of the delegates could create a corporation (perhaps establishing itself as a single entity) and get a single license for an expensive price feed and allow everyone to use it?
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Re: Price Feed Difference
« Reply #29 on: September 26, 2014, 12:58:17 pm »
Do as you wish... just do not suggest something like this:
perhaps all of the delegates could create a corporation (perhaps establishing itself as a single entity) and get a single license for an expensive price feed and allow everyone to use it?

No issues in suggesting stuff as long as it is discussed and evaluated (and possibly rejected with hatred...). I'm curious how will you establish a legal entity where everyone could be voted out at an instant and new possibly anonymous entities could be included.

Offline cryptillionaire

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: Price Feed Difference
« Reply #30 on: September 26, 2014, 01:13:24 pm »
The current situation with only 2 feed scripts is far from ideal...suggestions to make this undesirable situation permanent, with all of them paying /receiving the same feed, is nothing short of outrageous....

No but it could be possible to buy multiple feeds. However this is significant legal trouble...
Yeah, I even posted two options we could use. IMO, I'd think that these paid for services would be more reliable than say yahoo's finance tickers, because there's already thousands of forex traders using these services. Do what you want man, i'll be doing this when delegate income can cover the expenses.

Do as you wish... just do not suggest something like this:


perhaps all of the delegates could create a corporation (perhaps establishing itself as a single entity) and get a single license for an expensive price feed and allow everyone to use it?
That's just like your opinion man, you don't own this DAC and nor do I. Your opposition is noted on this subject.

Offline bytemaster

Re: Price Feed Difference
« Reply #31 on: September 26, 2014, 01:15:07 pm »
I have been thinking of alternatives to a "price feed" that are more decentralized and harder to manipulate.

So far what I have come up with involves creating an unrestricted prediction market on the "error" in the moving average.

If we have a moving average and we have an "error" metric then we can estimate what the price feed would have produced.

The benefit of an "error" metric is that it should hover around -5% to 5%.  This is critical because you can speculate in an error market without losing exposure to BTSX price movements.   It also means that there is never a need to have margin calls in the error market.

This would guide the short wall without delegates having to publish a feed... instead arb bots would correct the feed price relative to the moving average.

The other alternative is of course a market that sets the required collateral ratio... this simultaneously decrease new shorts and put pressure on existing shorts to cover or risk a fee. 

The primary risk in these markets is that the markets can be manipulated and that is the moral equivalent of the "feeds being bought". 

For now a "price feed" is simple, works, and is relatively low trust. 
   

For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Re: Price Feed Difference
« Reply #32 on: September 26, 2014, 01:26:15 pm »
I've been thinking of another idea:
What if an entity has high balances in most of the exchanges and exploits the difference in price.
Simultaneously buying/selling on the exchange and on BTSX blockchain.