Author Topic: Script to calculate BitAsset prices  (Read 2753 times)

0 Members and 1 Guest are viewing this topic.

Offline Markus

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
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.

Offline luckybit

  • Hero Member
  • *****
  • Posts: 2921
    • View Profile
  • BitShares: Luckybit
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 biophil

  • Hero Member
  • *****
  • Posts: 880
  • Professor of Computer Science
    • View Profile
    • My Academic Website
  • BitShares: 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."

Offline speedy

  • Hero Member
  • *****
  • Posts: 1160
    • View Profile
  • BitShares: speedy
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 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: 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 soniq

  • Full Member
  • ***
  • Posts: 181
    • View Profile
tip sent, appreciate your efforts  :D
Pr7V9GUm59dtKWXG6RJSymPsyCaCKWwNEj
Soniq on Bitcointalk -- Verified
Bitshares btsx:soniq

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
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 speedy

  • Hero Member
  • *****
  • Posts: 1160
    • View Profile
  • BitShares: 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.

Offline crazybit


Offline speedy

  • Hero Member
  • *****
  • Posts: 1160
    • View Profile
  • BitShares: 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.