我们知道STEEM体系中,在处理STEEM和SBD之间转换时,使用的价格是median_history_price or feed price
比如说以下场景:
- 在钱包中将SBD转化成STEEM
- 系统发放文章奖励
- 钱包中显示账户估值
使用这个价格的原因在于,这个价格相对而言比较稳定,不会大起大落,比较适合用于处理以上任务。
(图源:pixabay)
但是,有时候,median_history_price 与内部市场的价格偏差比较大,比如我写作本文时
Feed price
Bid orders & Ask orders
不难看出,这两个价格偏差极大。
于是我们就有了, 发文时选择Power UP 100% 是否合算的问题?
为了方便自己和他人,我特意给微信公众号加了一个辅助大家判断的小功能。
老生常谈,是否100% Power UP? 公众号新功能!
以100SBD的作者奖励来比较,在当前价格下:
- Power UP 100% 获得的奖励,市场价值约:113.036 SBD
- 50%/50% 情况下获得的奖励, 市场价值约:106.518 SBD
我们据此给出判断:发文建议: Power Up 100%
问题所在
一切似乎都很正常,直到有一次我测试时发现,偶尔出现了 Market Price: 1.000 或者 Market Price: 2.000这样的数据。
在这两天市场价格一直在1.2 - 1.6之前徘徊的情况下,无论是1.000的极低价格还是2.000的极高价格都是不合理的。莫非是我抓的数据有错?看了一下内部市场的成交历史,竟然发现类似这样的数据:
我不清楚内部市场交易撮合的规则,但是既然这样的交易数据实实在在的存在,那么由此可见并非是我的错。
但是,无论是谁的错,这样毛刺数据,都是不可接受的,一旦出现这样的毛刺数据,我的辅助判断就可能出现极大的错误!
如何解决
找出问题,不是我们的目的。找出并解决问题,才是我们要做的。
既然毛刺数据会影响我们的判断,那么我们就要想办法消除毛刺,用我做平衡车姿态分析啥的时候常用的术语叫做滤波。
我们之前采取的方法是,get_ticker,从中我们可以获得:
最高买单价格,最低卖单价格,以及最后一笔成交价格等
我们之前辅助判断功能中采取的就是Last price,因为最后一笔交易可能是成交量极小的毛刺交易,所以偶尔会导致这个价格极度失真。
那么都有哪些方式可以解决这个问题呢? 我大致想到如下方法:
- (Highest bid+Lowest ask)/2 的方式
- 多获取一些Trade History,并用成交数据中的SBD/STEEM来判断价格
- 获取N档order book,用其中的价格或数量来计算参考价格
对于第一种方式,由于steem内部市场不是很活跃,有时候还好,但有时候Highest bid以及Lowest ask差额巨大,单单取中间值,不是很合理。
对于第二种方式,同样steem内部市场不是很活跃,可能之前一笔成交订单已经过去了好长时间,这样取N比订单,计算参考价格,可能数据会比较陈旧。
第三种方式,相对比较合理,通过当前的买单和卖单来计算出参考价格,无疑是相对比较合理的。
以获取五档order book为例,我们会得到类似如下数据:
我们有几种选择
- 将所有price数据平均
- 对买单的'base'与'quote'求和并计算出买单价格,同理计算出卖单价格,取平均值
- 对所有买单以及卖单的'base'与'quote'求和,直接计算出价格
- 对所有卖单以及卖单的sbd以及 steem求和,计算出价格
通过测试,发现在不同场景下,以上几种方案计算出去的数据,差额极大。
以上述数据为例,后三种方案算出的价格分别为:
- 1.4533425349381701
- 1.4611225385999593
- 1.4621550046265275
可见,计算出来的价格更倾向于反应买卖双方的期望价格。当市场价格趋于平稳时,这个三个计算出来的价格均在Highest bid与Lowest ask之间,差异不大。当市场暴涨或者暴跌时,这个三个计算出来的价格会有严重的倾向性,甚至会超出Highest bid与Lowest ask的范围。超出Highest bid与Lowest ask的范围是否代表不合理,也不尽然。但是上述计算出的数据显然不合理。或许我们根据卖单与买单的量,以及历史成交价格,据此判断出上涨或者下跌的趋势,进而对上述结果进行修正,才会得出趋于合理的数据吧。
再回头看,我们不过要一个市场价格的参考价格,用于判断是否适合Power UP 100%, 有必要搞这么复杂吗?心累!
那就随便用一种方式好了,毕竟都差不多嘛。以后请叫我差不多先生。😭
😂差不多先生的赔本程序。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Great topic for a new competition, I really like it.
Upvote and resteem.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Very good post
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
好复杂
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
😭把自己都搞迷糊了,哭
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
原来不止我迷糊
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
O哥绝对的Steem专家,关于这个问题,你已经思考了很多细节了,不止于思考,还开发了工具。佩服的我四脚朝天!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
其实我还开发出来一个专业赔钱的内部市场交易机器人
一直在帮我赔钱呢😭
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
真的嗎?你找到金礦了!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
土豪O哥,说不定很快就会扭亏为盈哦!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
改個正負號,應該會馬上賺錢?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
这个姿势很新颖
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@oflyhigh, very valuable and informative post in which statistic of trade history and other informations. good work.
UPVOTED
FOLLOWED
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
太复杂了 O哥让我佩服,公众号已经很完善了。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
距离完善十万八千里呢
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
你好,差不多先生。:)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
😭
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
今天這泳池挺好的,很寬敞,水很滿,水溫並不燙,舒服~~~ 剛剛好~~~ 還有一些妹子來游泳哪~~~ 不錯不錯。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
淹死你 😡
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Nice unique photo, i follow you.
feel free to visit my indigo photo:
https://steemit.com/colorchallenge/@keybelle/colorchallenge-today-indigo-butterfly
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
这个帖子好认真哦。技术感挺强的。感谢你的分享。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
谢谢夸奖
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
我认真读了一遍,虽然读不懂。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
谢谢
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
内部市场交易的量比较小。以后steem代币多了,他们可以好好搞搞这个市场,一个新的交易所就起来了。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
交易量小,不够活跃
基本上而言,都是几个机器人倒来倒去的
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
thank you !
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
谢谢你的信息
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
只拿系統掛單的幾個機器人數據來分析行不行,又好像太過粗糙...
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
结尾亮了 囧
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
hello, @oflyhigh
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
nice photo
graet
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
awesome post :) i followed you
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
这个的确很难有比较完美的方式。而且如果交易量不大,在市场价格波动比较大的时候,7天钱和7天后的状态会完全不一样。这个非常类似于数字货币的短线交易,压涨还是压跌。个人建议另一种方式就是:积累近一段时间的数据,判断base和quote之间哪个更高出现的概率,通过概率给予建议。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
差不多先生,你好。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @oflyhigh! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
You published a post every day of the week
Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
内部市场跟实时价钱差好多的样子。原来100% Power Up和50/50是由于内部价差产生的偏差啊……总算是搞明白了,O哥这个工具帮助很大 👍
感觉前一阵价真低啊,我在1.0左右换了好几次Sbd/Steem
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Follow me
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
帮助很大啊,good post!!!!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @oflyhigh!
Your post was mentioned in the hit parade in the following category:
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
已暈暈 ~~ XD
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit