Bitcoin Forum
April 25, 2024, 04:09:18 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 5 6 7 8 9 10 11 »  All
  Print  
Author Topic: ATP [Advanced Trading Platform]  (Read 20881 times)
Aido (OP)
Sr. Member
****
Offline Offline

Activity: 248
Merit: 250


1. Collect underpants 2. ? 3. Profit


View Profile
May 19, 2013, 10:06:02 AM
Last edit: May 19, 2013, 10:29:20 AM by Aido
 #1

I'm starting a new topic for a discussion on ATP development. This topic is a continuation of the discussion on IsisATP and AidoATP.

Ok, so back to the new design.  I think the idea of programmable logic is an admirable idea, but when someone is just setting up for the first time, there needs to be a logical set of defaults included.  In my fork, I've set the default logic to be VWAPCross, not because I believe it is in any way inherently better, but because it's the simplest and easiest to understand.  Last trade was below vwap we buy, above vwap we sell.  As it stands now if you don't put anything into the bid/ask logic fields it spits out a nasty stack trace and does nothing.  I've fixed that in my branch, but it's refusing to let me commit at the moment.  I'm sort of at a loss on that one and will try to massage it a bit tomorrow.

After we refactor to use the order book and limit orders, the next step will be to add in a proper AI.  Right now, all we are using are algorithmic traders.  The AI will be optional and until it's trained with a few weeks of data it runs a very real risk of making very expensive mistakes.  However it's "learning profile" is a stored data set that can be downloaded and updated regularly with new market information.

Because it will attempt to predict the market direction, it will necessarily be significantly different than the algo traders we have now. 

The AI is a predictive DSP with a genetic algorithm based on a project I wrote a few years back for a company that couldn't afford downtime (downtime meant lives lost not just dollars).  The AI would watch all systems globally and learn about which systems were failing.  At first it just watches everything and reports failures, then it begins to make predictions and give each prediction a weight based on if it comes true or not.  Eventually the strongest predictions survive and the weakest ones die out.
The goal here was to compile an alert of probabilities and send it as far in advance as possible. 
The longer it runs the smarter it gets.  With a failure rate of 1 machine per day it could predict up to 4 hours in advance with 90% certainty.

I've been running it against MtGox since I first created the Isis-ATP project and it's a bit novel in that it can deduce the lump sum direction of the algorithmic traders at play (after all that's what a DSP does it isolates signals from noise).

Since January it's been showing that the pricing structure is actually being supported by VWAPCross and someone somewhere appears to be running a stochastic oscillator and that someone has some serious dollars.  That's pretty much all the bots and it accounts for over 80% of the trading activity.  The remaining is human traders (random noise tends to be from human activity). 

This is MtGox data only.  I haven't tried it against any other exchange and the DDOS attacks a few weeks ago gave the poor thing brain damage for lack of a better word. I'm not sure how to reconcile the dataset so I'll start a new profile when I integrate it.

I will also be adding an internal wallet and a configurable "sweep" to allow you to get your profits out daily and still keep enough on hand for expected volume.

Finally I will also be adding peer to peer mode to allow nodes to specialize in exchanges and share resources.

If that doesn't make a lot of sense imagine this...
There is a significant arbitrage opportunity between btc-e & mtgox on BTC right now.  You can buy bitcoins cheaper on BTC-e and sell them for more on MtGox (feel free to check this).

Each node can be configured to specialize in a particular exchange and this is where the bulk of it's money is at. 

If we can predict the size and length of an arbitrage opportunity we can do the buying and selling individually and settle up the profits later.  This obviously only works if you are working with close friends and people you know.  But the fact is this can work in the right circumstances.

Imagine if I had $5000 USD on BTC-e and Aido (sorry you're volunteered), has a few hundred BTC on MtGox.  I can authorize my machine to spend the $5000 USD into BTC on BTC-e and Aido can authorize his machine to spend the BTC on MtGox into USD.  I am effectively lending him my USD while he in turn is loaning me his BTC.

Once the arbitrage window is over (or we run out of cash), then we settle and split the profits.

Obviously this system would require trust which is scare in the bitcoin community, but if the transactions were small enough and there were enough people running it and we added a "confidence" ranking of some sort based on previous interactions, this thing has real potential to make serious money for anyone who cares to participate while not requiring everyone to have a hundred thousand accounts everywhere to try and keep track of. 

It's optional and will be default disabled, but just be aware this is one really easy way to run arbitrage without so much risk from window expiry.
Hope you guys find it exciting.  There is quite a bit of work to do here, but I think it will all be worth it in the end.

Interesting Bash command line, try it Wink:
bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
"I'm sure that in 20 years there will either be very large transaction volume or no volume." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Nova!
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
May 19, 2013, 05:52:02 PM
 #2

I was thinking TAP (Trader's Advanced Platform) would be a good name too.

A Tap can mean a lot of things including, a poke on the shoulder, a faucet or connection to a main line, or a song they play at your funeral Smiley
I'm interested in other names too.


Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
daybyter
Legendary
*
Offline Offline

Activity: 965
Merit: 1000


View Profile
May 19, 2013, 05:56:01 PM
 #3

I would consider a name with 'framework' in it.

MTF = modular trading framework, or so.


Aido (OP)
Sr. Member
****
Offline Offline

Activity: 248
Merit: 250


1. Collect underpants 2. ? 3. Profit


View Profile
May 19, 2013, 06:11:55 PM
 #4

I would consider a name with 'framework' in it.

Traders Advanced Pframework (the 'P' is silent like in Michelle Pfeiffer)? Cheesy

Interesting Bash command line, try it Wink:
bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
daybyter
Legendary
*
Offline Offline

Activity: 965
Merit: 1000


View Profile
May 19, 2013, 06:20:44 PM
 #5

Framework for advandced trading => FAT !  Cheesy

BTW: on the pants in your sig, Aido: you saw, that someone here actually sells used panties for btc? I guess, he has seen your sig...

Nova!
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
May 19, 2013, 06:26:26 PM
 #6

I would consider a name with 'framework' in it.

Traders Advanced Pframework (the 'P' is silent like in Michelle Pfeiffer)? Cheesy

Just some more ideas off the top of my head.

Framework for Arbitrage on Real Money (FARM)?

Friendly Actor for Relational Transactions (probably not)

Open Payment & Escrow Network (OPEN)

I'll probably have more later.  Maybe we should re-title the thread to something along the lines of "Help us name our bot trading framework", to attract more attention to the fact we need a name. Smiley

Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
daybyter
Legendary
*
Offline Offline

Activity: 965
Merit: 1000


View Profile
May 19, 2013, 06:32:38 PM
 #7

Open Framework for Arbitrage with Cryptocoins  => OFAC (pronounced: oh, fu...)  Cheesy

Aido (OP)
Sr. Member
****
Offline Offline

Activity: 248
Merit: 250


1. Collect underpants 2. ? 3. Profit


View Profile
May 19, 2013, 06:43:17 PM
 #8

on the pants in your sig, Aido: you saw, that someone here actually sells used panties for btc? I guess, he has seen your sig...

Oh dear. I feel I must explain where the business plan in my sig comes from.....Gnomes (South Park)


PLatform for Advance Trading (PLATR - pronounced Platter)

Professional/Programmers Framework for Intelligent Trading (ProFIT)

Interesting Bash command line, try it Wink:
bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
Nova!
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
May 19, 2013, 06:57:29 PM
 #9

on the pants in your sig, Aido: you saw, that someone here actually sells used panties for btc? I guess, he has seen your sig...

Oh dear. I feel I must explain where the business plan in my sig comes from.....Gnomes (South Park)


PLatform for Advance Trading (PLATR - pronounced Platter)

Professional/Programmers Framework for Intelligent Trading (ProFIT)

Oooh I like that last one.
Some others though that have been knocking around in the back of my mind....

PROgramed Professional Heterogeneous Exchange Trader (PROPHET)
  
Even just FIT would be good too.

Also Framework for Intelligent eXchange (FIX, which is also a financial protocol name and could lead to some minor confusion but I would have it using FIX as a base communication method anyways).
 
Anyone wanna chip in and search these things for trademarks, domains & products that could cause confusion?

Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
ewibit
Legendary
*
Offline Offline

Activity: 2955
Merit: 1049


View Profile
May 19, 2013, 11:29:51 PM
 #10

Professional/Programmers Framework for Intelligent Trading (ProFIT)
+1  Grin
this meets all...
Nova!
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
May 20, 2013, 12:44:27 AM
 #11

I'm going to make this quick because I don't have much time right now and I've got to head out for a couple of days.
24hr performance with the Arbitrage bot was terrible, so much so that I decided to debug the algorithm step by step and realized several key assumptions in it are in fact invalid.  I think it will probably need to be scraped.

Now for the good news.  The vwapcross algo actually has decent performance and regular revenue generation in a static market.
You need to set the algorithm to high risk (when the market is flat like it's been), set the minimum currency trade size to 0.01, the minimum BTC to the exchange minimum for MtGox this is 0.001, the max local currency to 1, the max BTC to 0.1 ($10 is a lot of money to me and BTC is currently $120ish). Max loss tolerance of 0.25 (this translates to a risk of between 1 penny and 1 quarter).
Then you need to enable trading across multiple currencies such as GBP, EUR & USD. (I've got all currencies enabled, but performance seems to be in those 3).

With this setup I made ~10% today trading into and out of the various currencies.

I may be incommunicado for a few days.  We're in the process of moving and the new place doesn't have internet yet, but I can at least check this thread a couple times a day.

Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
Nova!
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
May 20, 2013, 02:58:59 AM
 #12

I'm seeing an arithemetic exception being thrown in the syncrhonized ticker block of the trendobserver.  This occured when I was offline for an hour or two and then the internet came back.  Aido or someone can you please look into that code and see if it's possible for it be doing something funky with the math like not null checking values or dividing by 0 or something.  There wasn't any sort of logging.  I have the thing running in Eclipse and I just noticed that the thread had stuck and popped open indicating an exception had occured, but not really giving me much else to go on.

The rest of the app kept chugging along, but made some very interesting trades that I'm concerned about and trying to look at now.

Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
Aido (OP)
Sr. Member
****
Offline Offline

Activity: 248
Merit: 250


1. Collect underpants 2. ? 3. Profit


View Profile
May 20, 2013, 09:08:19 AM
 #13

I'll have a look at it later, weekend is over and got the day job to attend to first.

Interesting Bash command line, try it Wink:
bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
Aido (OP)
Sr. Member
****
Offline Offline

Activity: 248
Merit: 250


1. Collect underpants 2. ? 3. Profit


View Profile
May 20, 2013, 09:07:13 PM
 #14

I'm seeing an arithemetic exception being thrown in the syncrhonized ticker block of the trendobserver.

Not sure what's causing it. The code seems to be doing all the correct checks before doing a calculation. It makes sure the ticker ArrayList isn't empty if the connection has dropped for more than an hour. It also checks that each of shortMASize, shortMACDSize and longMACDSize are not bigger than tickersize so that it doesn't try to access a negative index in the ticker ArrayList.

Can you check in your config that your ShortMA value is set according to the suggested value i.e. ShortMA =  Minimum ticker size + 1.

If this is the cause then we can enforce the suggested value.

Try running atp with STDERR redirected to a file: java -jar aidoatp.jar 2> aidoatp.err. Kill your internet connection for more than an hour and then reconnect again and see what the error message is.

Meanwhile I'll try and reproduce the error.
         

Interesting Bash command line, try it Wink:
bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
paulthetafy
Hero Member
*****
Offline Offline

Activity: 820
Merit: 1000


View Profile
May 20, 2013, 11:47:50 PM
 #15

Hi guys,

Is this available for anyone to try out or only private?  I've read through the previous topics and it all seems very interesting!

Cheers
Paul
Nova!
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
May 21, 2013, 04:46:47 PM
 #16

Hi guys,

Is this available for anyone to try out or only private?  I've read through the previous topics and it all seems very interesting!

Cheers
Paul

Yes it is, it's an open source project.  Aido's version is on github under Aido and the OpenPay one is on github under OpenPay/ATP although I'm having difficulty getting a commit to my own repo work right now (Probably because I removed my basis version (Isis-ATP) and then forked Aido's updated version into my own repo).  Use Aido's for the time being, they're basically identical at this point.  Just make sure to disable the Arbitrage Trader because it has some major issues.

Also, pro-tip don't trust it with money you can't afford to lose.  I had a thread lock the other day and when I resolved it in the debugger I was flooded with a bunch of buy & sell market orders that essentially wiped my position out because they had been piling up for a few hours.  I'm actually going to have to buy more bitcoins just so I can keep testing.

Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
mccoyspace
Full Member
***
Offline Offline

Activity: 237
Merit: 101


View Profile WWW
May 21, 2013, 08:33:42 PM
 #17

Hello,
trying to run Aido, but I get this:

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/aido/atp/Application : Unsupported major.minor version 51.0

java -version gives me this:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06-451-11M4406)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01-451, mixed mode)


on a mac 10.7.5 with the latest java d/l'ed from oracle.

I'm guessing is wants 1.6.0_51? and I've got _45.....

(btw, the old version of Isis started up no problem)
Aido (OP)
Sr. Member
****
Offline Offline

Activity: 248
Merit: 250


1. Collect underpants 2. ? 3. Profit


View Profile
May 21, 2013, 09:51:56 PM
Last edit: May 22, 2013, 10:20:16 AM by Aido
 #18

Hi mccoyspace,

For some reason I can't remember now when I forked the original isisATP to aidoATP I decided to use Java 1.7.  I'm not a Mac person but I believe Java 1.7 is not available on Mac OS X. Although Ianwhitbread has reported that he has aidoATP running on a Mac using Java 1.7. I'm not sure what version of OS he is running.

Currently aidoATP source code will not build with < Java 1.7. However, with a few minor changes I think aidoATP can be modified to be built with Java 1.6. When Nova raised this issue in the other thread I did a quick check. A simple change to 3 or maybe 4 lines of code is all that is needed.

I was trying to use this thread for discussion on future development of ATP and issues like deciding on a suitable name etc. And use the other IsisATP and AidoATP thread for issues with the existing versions.....like this issue  Wink.

Interesting Bash command line, try it Wink:
bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
Aido (OP)
Sr. Member
****
Offline Offline

Activity: 248
Merit: 250


1. Collect underpants 2. ? 3. Profit


View Profile
May 21, 2013, 10:09:32 PM
 #19

I now remember why I decided to use Java 1.7.

Before forking IsisATP to AidoATP I had never programmed in Java before. So, I was just playing around with a few things, trying to learn. One of the things I experimented with was the proposed Java 7 Elvis operator "?". As it turned out the proposal was never accepted into Java 7 so my playing around with it failed. I just decided to keep building with Java 7 and used one of its new features, multi-catch statements, in 3 places.

Basically AidoATP has no real reason for using Java 1.7 over Java 1.6.

Interesting Bash command line, try it Wink:
bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
mccoyspace
Full Member
***
Offline Offline

Activity: 237
Merit: 101


View Profile WWW
May 22, 2013, 02:25:37 AM
 #20

Cool, thanks for the explanation. and sorry for mis-filing the post. I have about 5 tabs of ATP discussion threads open and it looks like i didn't keep it straight.

I know just enough java to try to look for those multi-catch statements. maybe the code can be 'devolved' back to 1.6 (or i can get 1.7 running)
Pages: [1] 2 3 4 5 6 7 8 9 10 11 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!