Author

Topic: Image of my Trading Bot (and it's low power!) (Read 5036 times)

member
Activity: 84
Merit: 10
has anyone made a trading bot available to everyone?
will this one be open at somepoint?

There are some bitcoin bots available (I think I stumbled upon a python script one time), have a look on this forum and on pastebin... Thing is the more you share your trading bot the less efficient it it...
hero member
Activity: 695
Merit: 502
PGP: 6EBEBCE1E0507C38
has anyone made a trading bot available to everyone?
will this one be open at somepoint?
member
Activity: 84
Merit: 10
I know the OP mentioned buying the device for another purpose originally, but what about using one of those plug computers? No graphics capability but much cheaper in many cases, like under $50. They all seem to have 1.2 Ghz ARM processors.

Plug computers are perfect for this application!
full member
Activity: 154
Merit: 100
I know the OP mentioned buying the device for another purpose originally, but what about using one of those plug computers? No graphics capability but much cheaper in many cases, like under $50. They all seem to have 1.2 Ghz ARM processors.
member
Activity: 84
Merit: 10
I totally agree with you.
newbie
Activity: 40
Merit: 0
Can his bot adapt automatically? What if he runs it for a long time but the strategy used is no longer appropriate to changing bitcoin circumstances?

My bot is very very simple and there is nothing dynamic about it.  Ignoring all of the code for talking with the server, my bot is about 80 lines of code.

I think that there isn't enough market data for a bot to be really complicated.  We are really only working with about 3 months of data.

The market is also extremely small, making it very volatile and random.  A few days ago, someone sold like $23k worth of BTC and it caused the market to drop about $3.  This randomness and lack of data makes calculating trends difficult.  I gave up trying to figure out the little swings and I mostly just look at whats in the ticker feed.

Plus, the small hourly swings are very hard to take advantage of because there isn't that much market volume.  So with small swings, there might not be enough coins to purchase at that price.

I have absolutely no expertise in trading, so I really don't know what I am doing.
member
Activity: 84
Merit: 10
We don't know what kind of algos he used in it. And as you might know, it's not polite to ask about algos  Grin

However you can implement many scenarios to manage pretty much any situation and still get a decent execution time. The bitcoin activity has nothing to compare with the density of the Forex.

I have also optimized my code to go from 3 minutes to a few seconds.
legendary
Activity: 1190
Merit: 1004
Can his bot adapt automatically? What if he runs it for a long time but the strategy used is no longer appropriate to changing bitcoin circumstances?
member
Activity: 84
Merit: 10
The OP has been successful with a simple script. I think at this stage it's the way to go. There is not enough volatility, nor volume to make it more complicated. This is what I get looking at many successful bot related stories...
legendary
Activity: 1190
Merit: 1004
Database? No idea why that is needed.

All I can say is my algorithm is supposed to do lots of computations to create the best results but my tests are making me disappointed so far. It's by no means supposed to be a simple algorithm set to follow one simple strategy.

It's in early stages though.
member
Activity: 84
Merit: 10
30 secs of computing seems a lot to me for a simple bot. Are you running a db (like SQL) or something? Mine takes almost nothing to compute the algo with a few hundreds mysql queries per minute. I run it on a core 2 duo CPU.

But maybe you are running a Monte-carlo simulation on it... I don't want to go in the secret of your algorithm  Smiley
legendary
Activity: 1190
Merit: 1004
Downloading the data takes about 2 seconds maximum and the rest takes almost 30 seconds to compute. My algorithm runs on a single thread when I could separate tasks out to 50 cores including the 48 cores the GeForce 320M apparently has.
member
Activity: 84
Merit: 10
I could increase the performance by taking advantage of GPU parrellel computing. The performance increase could be massive. I will look into it.

I don't think so. You are still limited by your connection to mtgox via internet. Could you elaborate on this?
legendary
Activity: 1190
Merit: 1004
I could increase the performance by taking advantage of GPU parrellel computing. The performance increase could be massive. I will look into it.
newbie
Activity: 40
Merit: 0
If you trade on mtgox, why don't you use mtgox data?

MtGox only gives you recent trades (I think?).  They don't have the nice start/end time params that bitcoin charts has.  For my bot, I need to look some distance in the past.
member
Activity: 84
Merit: 10
If you trade on mtgox, why don't you use mtgox data?
newbie
Activity: 40
Merit: 0
By training I mean refining your algos. I make them better all the time, and improve the speed to. My bot is now multi-threaded and reacts in 3 seconds, with a giant database to store the history.

Speaking of bitcoin charts not beign reliable... the site went down for a little bit today lol.

What language did you write your bot in?

---------------------

The performance data listed previously was over this range:

http://bitcoincharts.com/charts/mtgoxUSD#rg30zczsg2011-06-18zeg2011-07-11zvztgSzm1g10zm2g25

What site? I am using Mtgox data. I started the bot in php and I am now slighty converting it to python. Php is not the fastest language but for a network application it's ok.

Bitcoin charts was down for about 10 mins.  my algo isn't very resource intensive, so I haven't really had any probs with efficiency.  I am debating on whether or not to add a slicker interface to help me analyze the data better.

I don't like how there isn't a good way to determine what the actual cost per coin was for a completed (or incomplete) order.  So I am just guessing that every order was filled at the expected price.
member
Activity: 84
Merit: 10
By training I mean refining your algos. I make them better all the time, and improve the speed to. My bot is now multi-threaded and reacts in 3 seconds, with a giant database to store the history.

Speaking of bitcoin charts not beign reliable... the site went down for a little bit today lol.

What language did you write your bot in?

---------------------

The performance data listed previously was over this range:

http://bitcoincharts.com/charts/mtgoxUSD#rg30zczsg2011-06-18zeg2011-07-11zvztgSzm1g10zm2g25

What site? I am using Mtgox data. I started the bot in php and I am now slighty converting it to python. Php is not the fastest language but for a network application it's ok.
newbie
Activity: 40
Merit: 0
By training I mean refining your algos. I make them better all the time, and improve the speed to. My bot is now multi-threaded and reacts in 3 seconds, with a giant database to store the history.

Speaking of bitcoin charts not beign reliable... the site went down for a little bit today lol.

What language did you write your bot in?

---------------------

The performance data listed previously was over this range:

http://bitcoincharts.com/charts/mtgoxUSD#rg30zczsg2011-06-18zeg2011-07-11zvztgSzm1g10zm2g25
member
Activity: 84
Merit: 10
By training I mean refining your algos. I make them better all the time, and improve the speed to. My bot is now multi-threaded and reacts in 3 seconds, with a giant database to store the history.
legendary
Activity: 1190
Merit: 1004
My bot is supposed to figure out everything in roughly 30 seconds with 4 days of price data. I don't have to train it over time. I hoped it would adapt to the flatter prices and stop making poor signals but I have run the algorithm very long, so I will see what happens over a bit more time...
member
Activity: 84
Merit: 10
How is it performing now, since the bitcoin price has become rather flat?

I'm sure my bot will pick better trades if prices become more volatile again. It's easy to make false signals when it is flat.

The thing is I am not sure it will become again as volatile as before again. I am from now 'training' my bot to perform on a flatter market...
legendary
Activity: 1190
Merit: 1004
How is it performing now, since the bitcoin price has become rather flat?

I'm sure my bot will pick better trades if prices become more volatile again. It's easy to make false signals when it is flat.
newbie
Activity: 40
Merit: 0
Do you use the bitcoincharts.com API? It says I shouldn't rely on it, so I collect and cache prices myself.

Yeah, I saw that it said that too.  I think they don't want people accidently DDOSing their servers.  I just collect the most recent (3 days back) data from bitcoin charts.  It is just easier and I haven't had any problems with it.
legendary
Activity: 1190
Merit: 1004
Do you use the bitcoincharts.com API? It says I shouldn't rely on it, so I collect and cache prices myself.
newbie
Activity: 40
Merit: 0
so you don't use a database?

A database for what? I didn't do any fancy genetic algorithms (in fact my entire program is only about 300 lines of code).  Although that would be cool to do.  I just don't have the time to figure out how to do it.  I am just a college student that taught myself some programming.
newbie
Activity: 42
Merit: 0
If your interested in sharing  pm me and we can talk price
member
Activity: 84
Merit: 10
so you don't use a database?
newbie
Activity: 42
Merit: 0
Sounds awesome


  I would love to see that ... ?
member
Activity: 84
Merit: 10
Congrats. Wonderful bot.
legendary
Activity: 1190
Merit: 1004
I had a GUI and I removed it. It makes little difference actually but it crashed a few times so I reverted to file and command line UI.

I do cache the data. You use a service which contains more data than the APIs from Mt Gox, Trade Hill or other places? With those APIs you have to download all the data available an then select and append data to the cached data.

You've used python I see. I have used python as well but I will likely try to convert it to C to try and get as much out of it as possible. I use pysco to improve performance.

If I increase performance I can also increase the complexity of the algorithm.
newbie
Activity: 40
Merit: 0
Maybe I didn't give it chance but I made what I believed to be two improved versions which I'm testing now. I have to wait for the simulated results since the algorithm can't be sped up very much.

I can't really use many more than about 8 days of data for performance reasons. Wink I should hopefully increase performance however. I also need to do more tests.

I wrote mine on a 4 year old laptop with 2GB RAM.  A few things I did to speed everything up is:

  • Take the trade data and save it to the HD (grabbing from server takes forever...)
  • Don't write anything to the interface.  Having to wait for the UI thread significantly increases processing time.
  • Pre-process as much of the data as possible.  So you don't have to re-calculate everything with each trial
legendary
Activity: 1190
Merit: 1004
Maybe I didn't give it chance but I made what I believed to be two improved versions which I'm testing now. I have to wait for the simulated results since the algorithm can't be sped up very much.

I can't really use many more than about 8 days of data for performance reasons. Wink I should hopefully increase performance however. I also need to do more tests.
legendary
Activity: 2058
Merit: 1462
mind sharing its algorithm?
newbie
Activity: 40
Merit: 0
I'm making a bot and it's annoying because I run my Macbook 24/7 which isn't convenient.

My tests so far have been negative. Sad One version made a simulated loss of 25% in only about 2 days.

You need to look at more data than just 2 days worth.  I back tested about 40 different strategies (98% of them were no profit or loss).

When backtesting, I chose the range of data from June 11 - present, because that Gizmodo spike isn't something I can realistically expect to happen again.
legendary
Activity: 1190
Merit: 1004
I'm making a bot and it's annoying because I run my Macbook 24/7 which isn't convenient.

My tests so far have been negative. Sad One version made a simulated loss of 25% in only about 2 days.
newbie
Activity: 40
Merit: 0
Cool.  Cool

How much does the entire setup cost to make?

+1
We want the "how to build" Cheesy

As far as hardware, the Chumby is as-is.  Using the previous link, I installed that version linux on there with the python package.

A Chumby One (pictured) costs $129.95 (new). http://store.chumby.com/chumby-CHB802XXXX-one/dp/B0030QUU4M?ie=UTF8&id=chumby%20CHB802XXXX%20one&field_product_site_launch_date_utc=-1y&field_availability=-1&field_browse=2619998011&searchSize=12&searchNodeID=2619998011&searchPage=1&class=quickView&refinementHistory=brandtextbin%2Csubjectbin%2Ccolor_map%2Cprice%2Csize_name&searchRank=salesrank

Writing the trading algorthm just took a lot of time.  I compiled the log data from June 19, 2011 until today and this is what I got:

Starting USD: $4000

# of Trades: 5
Net Profit: $861.13
Average Profit: $172.xx
Average Profit %: 3.45%

Winning Trades: 4
Win Rate: 80.xx%
Gross Profit: $974.xx
Average Profit: $243.xx
Max consecutive wins: 3

Losing trades: 1
Loss rate: 20.xx%
Gross Loss: $113.xx
Average Loss: $113.xx
Average Loss %: -2.27%
Max consecutive losses 1

If I just bought and held:
Net Profit: -$694.xx

I don't know if I mentioned this before, but I trade on MtGox.

Not sure what a chumby is, but it's very geeky with the exposed wires and breadboard, I like it

The breadboard is just another project I was working on.  The chumby is a digital alarm clock (see link in previous post).
hero member
Activity: 938
Merit: 501
Not sure what a chumby is, but it's very geeky with the exposed wires and breadboard, I like it
+1
We want the "how to build" Cheesy
newbie
Activity: 56
Merit: 0
Not sure what a chumby is, but it's very geeky with the exposed wires and breadboard, I like it
newbie
Activity: 40
Merit: 0
Why not run the trading bot on a Linux server, such as Ubuntu? I don't get it.

You can also get money quickly by gambling heads/tails.

it is a linux server?  And its what I had sitting around.
full member
Activity: 196
Merit: 101
Why not run the trading bot on a Linux server, such as Ubuntu? I don't get it.

You can also get money quickly by gambling heads/tails.
newbie
Activity: 40
Merit: 0
Care to share or explain any more than that. Or are you just showing off or spreading fud?

I wrote a script in python (tested on my PC) and then I loaded it onto the chumby.

If you need advice for how to put python on a chumby, look here: http://wiki.chumby.com/index.php/Python.

I currently only trade on MtGox, but I plan on writing a program for TradeHill so I don't have all of my eggs in one basket.
newbie
Activity: 35
Merit: 0
Care to share or explain any more than that. Or are you just showing off or spreading fud?
newbie
Activity: 40
Merit: 0
I just wanted to share a picture of my trading bot.  It has been online for about 2 weeks now and has gotten me more money than my mining equipment.




I wrote my script in Python and moved it to the Chumpy via USB.  It's the only computer I have that I can leave on 24/7. :-/
Jump to: