Script to calculate BitAsset prices

Started by speedy, February 25, 2014, 04:29:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Markus

Quote from: luckybit on March 04, 2014, 11:18:34 AM
Quote from: bytemaster on February 25, 2014, 06:19:33 PM
Now we just need to identify an automated trading algorithm that can do the following:

Calculate the average price of BTS normalized across all assets (weighted) and then sell the assets above the average and buy the ones below.  This trading engine should be open source and throughly reviewed. 

I think we should discuss potential algorithms and try it out.   If things work as I expect then the ratio of BitGLD to BitUSD to BitSLV should mirror the real world ratios and any discrepancy should indicate a buying or selling opportunity.

This should be built into the Bitshares client itself.

If everybody used the same trading algorithm you would get thousands of identical orders. You need some kind of randomisation for this to work as a standard.

luckybit

Quote from: bytemaster on February 25, 2014, 06:19:33 PM
Now we just need to identify an automated trading algorithm that can do the following:

Calculate the average price of BTS normalized across all assets (weighted) and then sell the assets above the average and buy the ones below.  This trading engine should be open source and throughly reviewed. 

I think we should discuss potential algorithms and try it out.   If things work as I expect then the ratio of BitGLD to BitUSD to BitSLV should mirror the real world ratios and any discrepancy should indicate a buying or selling opportunity.

This should be built into the Bitshares client itself.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

biophil

Brilliant, I've been thinking we'll want something like this. Instant visual feedback on where to buy and where to sell.
Support our research efforts to improve BitAsset price-pegging! Vote for worker 1.14.204 "201907-uccs-research-project."

speedy

Quote from: soniq on February 25, 2014, 05:42:11 PM
tip sent, appreciate your efforts  :D

Thank you very much :)

Bytemaster yes as soon as the network is running and my wallet can pull in some order book data, an average from all the assets will be a good way to calculate the price of BTS. That will save me from having to get it from Cryptsy or somewhere.

bytemaster

Now we just need to identify an automated trading algorithm that can do the following:

Calculate the average price of BTS normalized across all assets (weighted) and then sell the assets above the average and buy the ones below.  This trading engine should be open source and throughly reviewed. 

I think we should discuss potential algorithms and try it out.   If things work as I expect then the ratio of BitGLD to BitUSD to BitSLV should mirror the real world ratios and any discrepancy should indicate a buying or selling opportunity.   
For the latest updates checkout my blog: [url="http://bytemaster.bitshares.org"]http://bytemaster.bitshares.org[/url]
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.

soniq

Pr7V9GUm59dtKWXG6RJSymPsyCaCKWwNEj
Soniq on Bitcointalk -- Verified
Bitshares btsx:soniq

toast

Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

speedy

Ok here you go:
http://pastebin.com/R6faJ3zN

Tested on linux. Only extra things it needs is PyQt4 and ystockquote.
sudo pip install ystockquote

Later I will fill those BID/ASK columns with the results of RPC orderbook calls to the BTS client for each asset.

crazybit


speedy

I wrote a python script that pulls in $ prices of various BitAssets from Yahoo finance, and automatically prices them in terms of BTS. This should help the prediction market come to consensus, and let you know if an asset is overbought/sold. If anyone thinks this is cool/useful, I can post the source.