BitShares Forum

Main => General Discussion => Topic started by: speedy on February 25, 2014, 04:29:36 am

Title: Script to calculate BitAsset prices
Post by: speedy on February 25, 2014, 04:29:36 am
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.

(http://i.imgur.com/nww60NK.png)
Title: Re: Script to calculate BitAsset prices
Post by: crazybit on February 25, 2014, 08:19:18 am
it would be nice
Title: Re: Script to calculate BitAsset prices
Post by: speedy on February 25, 2014, 02:30:46 pm
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.
Title: Re: Script to calculate BitAsset prices
Post by: toast on February 25, 2014, 02:32:45 pm
tip this guy
Title: Re: Script to calculate BitAsset prices
Post by: soniq on February 25, 2014, 05:42:11 pm
tip sent, appreciate your efforts  :D
Title: Re: Script to calculate BitAsset prices
Post by: 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.   
Title: Re: Script to calculate BitAsset prices
Post by: speedy on February 27, 2014, 12:07:33 am
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.
Title: Re: Script to calculate BitAsset prices
Post by: biophil on February 27, 2014, 12:13:06 am
Brilliant, I've been thinking we'll want something like this. Instant visual feedback on where to buy and where to sell.
Title: Re: Script to calculate BitAsset prices
Post by: luckybit on March 04, 2014, 11:18:34 am
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.
Title: Re: Script to calculate BitAsset prices
Post by: Markus on March 04, 2014, 11:38:50 am
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.