Bitcoin Forum
April 26, 2024, 11:40:35 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Economy / Trading Discussion / The Bot that was and will not ever be.... on: July 15, 2011, 10:08:26 PM
For clarification, this post has to do with me killing my trading bot project, and nothing to do with MiningMonitor itself.  MiningMonitor is doing very well for us, and if nothing else, we use it ourselves for our miners Smiley

After fiddling around, I think it's time to show off, then shelve my pet project.

For those who don't read the Mining boards, I am the lead developer behind MiningMonitor.com ( Board Post ).

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

Starting as a possible feature of MiningMonitor, I developed an advanced interface to MTGox:


( Yes, High Stop/Low stop aren't real terms... one is a plain sell order "dark" since it's not an outstanding order on MTGox, and and the other is a simple stop order )

Technically the screenshot above shows you a very simple bot.  If the price is above X or below Y, sell.


Going from there, it almost seemed logical to write a bot. Simple trading bots are a breeze to write... they are really just based around 4 rules

1) Check spot if time since last check is > window
2) If price is below x, buy one unit of btc, note actual price paid ( for easy math, you can buy 1.003btc so 1btc get put in your account )
3) If price is above Y , sell one unit of btc given that spot_price = pricepurchased + (pricepurchased * desired gain )
4) Set a stop to prevent unbound loss ( either overall, or on a per unit purchased basis )

With a little manipulation of X and Y, it's easy to turn a small profit...

A more complex bot makes buying and selling discussions based on various indicators, EMA, WMA, HMA, Ease of movement, the MACD, my personal favorite for the current market RSI, etc.  Using an indicator based bot allows for maximizing <edit>the margin since mins and maxs are identified by the signals</edit>

1) Assuming a certain timewindow ( could be a per trade window if you want ) , get low, high, total volume, open, close
2) Calculate indicators

Assuming for this example we are using RSI , though in reality, multiple combined indicators give you your buy and sell singnals

3) if RSI is < 30, buy a unit of btc  , note effective price paid

4) if RSI is > 70, sell unit of btc given that spot_price > pricepurchased + desired minimum gain per transaction

5) Set stops

---

Both of these examples are simplified for brevity.


---

So, once I had a simple bot, I started thinking of a more complex bot. But , given the number of possible signals, and the number of ways to tune them, what is a programmer to do?

Use a genetic algorithm of course Wink



And if you're doing that, you need a way to visualize the results Wink



----

Writing a higher level bot/genetic algorithm is again, not that difficult to do:

  

sub fitness {
   # load the data
   foreach my $trade (@$ref) {
      # determine the current values of your indicators
      # pass data to algorithm which decides what to do
      # perform action ( buy, sell, hold )
      # repeat
   }
   my $final_networth = $btc * $spot_price + $cash;
   my $performance = ($final_networth-$start_networth)/$start_networth*100;
   print "Genome: $genome Fitness: $final_networth Performance: $performace\%\n";
   return $final_networth;
}


With your algorithm, or trade bot, deciding what it should do based on the data passed in

I developed a number of different trading algorithms:

hurrr_i_am_a_bot
force_1btc
let_the_btc_hit_the_floor
tiny_bubbles
fuck_it_all_RSI_alone
kitchen_sink
( there were a couple of more, but I took them out back and shot them in the head ... they had fundamental flaws in their designs )

Each had it's strength and weaknesses.... for example fuck_it_all_RSI_alone loves a market like the one we are in... very small movements , lots of bouncing around in a constricted range.

kitchen_sink is the most adaptive, and can live in any market since it uses all the indicators, but it needs to be tweaked alot to stay profitable.

----

So the actual trading bot has two parts:

the_brain
the_brawn

Every hour or so , the_brain  takes the last 12 hours of trading data, uses genetic algorithms to decide which trading algorithm and settings for said algorithm works best, and tells the_brawn to use them.  This allows for automated switching based on current market conditions to a trading algorithm.

The_brawn just reads the live trading data, applies the various metrics to the data, and feeds the data, and settings to the algorithm the_brain decided on, takes back a market order ( buy, sell, twiddle thumbs ), pushes it off to mtgox if needed and repeats.

-----

What is the end result?  It's profitable... ~2.5% a day fully automated... but I'm killing off the project

-----

But Pete, that sounds great! Why kill the project?

Couple of reasons....

1) the_brain & the_brawn are a little fragile, it would take a decent amount of work to make it usable/shareable

2) Security, if I wanted to let people have access to the bot, they need to give me the MTGOX username/password ... so the original plan was to simply charge $XX per month and give each person their own VPS loaded with DB and software... that way even if one DB got penetrated, everyone's user/pass wasn't exposed

3) Bored now... I've taken it to the point where beyond this would require a much higher understanding of finance and signals

4) Value: Dudes, and dudettes, it's not worth it... the market is too small

---

Number 1 is laziness, 2 is paranoia, 3 is just a fact, but number 4 is the real reason.

The market for BTC has such low volume, and is of such a small size, that a bot that could make any real money would actually affect the market in doing so... since there are no Fill or Kills on MTGox , trying to buy/sell units of BTCs > ~5 at any certain times can move the price of BTC by pennies ( fractions of a percent ).

My personal bot running has been averaging around 2.5% a day, but that's peanuts... 2.5% of 300$ is $7.50 a day... an hour of freelance work makes me 6->14 TIMES that ...  

And since I've satisfied my intellectual curiosity... I thought I would share with you folks a post mortem, and give some direction to people screwing around with the idea of a bot some pointers.


Hope you enjoyed reading,

Peter Azuolas

tl;dr: Developed interface to MTGox, built simple trade bot, built genetic algorithm test bed for trading algoritms, turned it into a live bot, make 2.5% a day, killing project because intellectually satisfied and not worth it anymore Wink






 





  




2  Bitcoin / Mining / MiningMonitor.com - Monitoring - SMS Notifications - Analytics[Monthly+CSV] on: June 24, 2011, 02:40:24 AM
We are proud to announce the launch of MiningMonitor.com!

MiningMonitor allows you to monitor your workers and pool accounts, provides notifications via email and SMS in case of failure and provides detailed analytics about your performace at the worker level, pool level, and overall.

Currently supporting DeepBit , Bitcoin Pooled Mining ( Slush's ), BitcoinPool, Bitclockers, BTCGuild, MTRed, Arsbitcoin, ABCPool.co, BTCPool24, OZCO.in, rfcpool.com, and Eligius (Luke-Jr's pool) and are planning on added other pools upon request.


Over the last few weeks, we have built and tested the most advanced monitoring and analytics platform available.

Getting started is simple, visit http://www.miningmonitor.com , take a tour and signup!

Join for free, or get a paid account for faster updates, more workers/pools, free SMS credits and better stats!



Some screenshots to wet your appetite.



Partial Overall Stats View



Partial Pool Stats View



Partial Worker Management Page



Partial Pool Management Page







MiningMonitor Pricing Finalized!



Based on feedback from our users, the finalized pricing for MiningMonitor has been released.

Major changes:

The Silver account can now monitor 6 workers, double from before.  Now the majority of the smaller miners can use a silver account and watch all of their workers.  

Gold Users can now monitor and get analytics for UNLIMITED workers and pools!  

Platinum is yearly only now. For 10btc you get 2 minute updates, 300 starting sms credits and refills of 200 sms for 0.5btc.  For the price of the original Gold yearly account, you get much, much more!  


Failover Support! ( Linked Workers )



Now, if you are using a client with automagic failover support ( such as SmartCoin or guiMiner ) , you can link monitored workers together so you only get a down worker notification if the linked workers are ALL down.

For example, if you link btc_1 and deepbit_1 , when your failover kicks in switching you from one to the other you will NOT receive a down worker notification!

Monthly Stats



Now, you can view your overall monthly stats.

Track your day by day performance and compare it to your historical data.

CSV Export



When viewing your overall monthly, or daily stats, you can now download a CSV export of the data.

Perform your own analysis on the data with shares,stales,uptime,hashrate, and earnings all broken down on an hour by hour basis.








We even have an affiliate program! MiningMonitor.com Affiliate Program



Have questions, you can check out the FAQ Page , or post them here and we will respond!

Hope to see you soon!

The MiningMonitor.com team
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!