# Last edited on 2014-04-07 03:10:56 by stolfilocal [b]How much would God make by trading bitcoin?[/b] God is the best day trader because, being omniscent, He can see all the way into the future, and thus He knows when to buy and sell for maximum profit. (Being omnipotent, He could also manipulate the price at will, but being omnihonest He would not do it. On the other hand, being omnisubtle, He can buy and sell as much as He wants without disturbing the order book.) Suppose that God decided to start trading BTC versus USD on Nov/29, 2013 00:00, a little before the all-time high. Suppose that He started with 1000 USD, and (out of habit) did at most one trade per day, at the day's weighted mean price (total USD traded that day, divided by total BTC traded). If He aimed to maximize his USD account at 2014-04-01 23:59, what would He do, and how much would He have at the end? Unless the Devil put bugs in my code, this would be His strategy: [url=http://www.ic.unicamp.br/~stolfi/temp/2014-04-07-btc-opt/2013-11-29--2014-04-01-BSTP-USD-01d-opt.png][img width=600]http://www.ic.unicamp.br/~stolfi/temp/2014-04-07-btc-opt/2013-11-29--2014-04-01-BSTP-USD-01d-opt.png[/img][/url] This plot shows how much USD (green) or BTC (orange) He would have at the start of each day. By this strategy, He would end up with about [b]8,901.88 USD[/b], that is, almost 9 times his starting capital -- even though the BTC price went mostly down from that day. If he started instead with just [b]one[/b] dollar on Dec/24, 2011 00:00 (when my Bitstamp data file begins), he would do this: [url=http://www.ic.unicamp.br/~stolfi/temp/2014-04-07-btc-opt/2011-12-24--2014-04-01-BSTP-USD-01d-opt.png][img width=600]http://www.ic.unicamp.br/~stolfi/temp/2014-04-07-btc-opt/2011-12-24--2014-04-01-BSTP-USD-01d-opt.png[/img][/url] and He would end up with a bit more than [b]8.672 million USD[/b]. Of course He could make MUCH higher profits if He traded once every hour, or every minute. Figuring out how much is left as a penance for the sinners. [url=http://www.ic.unicamp.br/~stolfi/temp/2014-04-07-btc-opt/00-Notebook.txt]Recipe (for GNU/Linux)[/url] [url=http://www.ic.unicamp.br/~stolfi/temp/2014-04-07-btc-opt/]Scripts and data files[/url]