Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Script to calculate BitAsset prices  (Read 676 times)

0 Members and 1 Guest are viewing this topic.

Offline speedy

  • Hero Member
  • *****
  • Posts: 1160
    • View Profile
  • BTS: speedy
Script to calculate BitAsset prices
« 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.


Offline crazybit

  • Sr. Member
  • ****
  • Posts: 416
    • View Profile
Re: Script to calculate BitAsset prices
« Reply #1 on: February 25, 2014, 08:19:18 AM »
it would be nice

Offline speedy

  • Hero Member
  • *****
  • Posts: 1160
    • View Profile
  • BTS: speedy
Re: Script to calculate BitAsset prices
« Reply #2 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.

Offline toast

Re: Script to calculate BitAsset prices
« Reply #3 on: February 25, 2014, 02:32:45 PM »
tip this guy
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.

Offline soniq

  • Full Member
  • ***
  • Posts: 181
    • View Profile
Re: Script to calculate BitAsset prices
« Reply #4 on: February 25, 2014, 05:42:11 PM »
tip sent, appreciate your efforts  :D
Pr7V9GUm59dtKWXG6RJSymPsyCaCKWwNEj
Soniq on Bitcointalk -- Verified
Bitshares btsx:soniq

Offline bytemaster

Re: Script to calculate BitAsset prices
« Reply #5 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.   
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 speedy

  • Hero Member
  • *****
  • Posts: 1160
    • View Profile
  • BTS: speedy
Re: Script to calculate BitAsset prices
« Reply #6 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.

Offline biophil

  • Hero Member
  • *****
  • Posts: 814
  • Incentives run the world
    • View Profile
    • Sign up for a Bitshares account!
  • BTS: zebulon
Re: Script to calculate BitAsset prices
« Reply #7 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.

Offline luckybit

Re: Script to calculate BitAsset prices
« Reply #8 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.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline Markus

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
Re: Script to calculate BitAsset prices
« Reply #9 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.

 

Google+