The decentralization of Bitcoin is what enabled it to become so successful, but the concept behind it was much more complex than most of the currencies that came before it. For people just learning about digital currencies, the idea behind no centralized intermediary is hard to grasp. Instead of having a single entity handle all transactions on the network, there is a virtual ledger of each transaction that is handled peer to peer, known as the blockchain. Blockchain technology not only eliminates the need for centralization, but it also enables Bitcoin users to mine the coin. The blockchain is made up of individual blocks that are just a handful of pending transactions. When the coin is mined, the information of each transaction is encrypted and decrypted by computers that are doing the mining. Eventually the pending transaction will become confirmed and added to the blockchain. The process of mining rewards users for confirming transactions. Each time a sender makes a payment, there is a transaction fee that goes to the miner, which perpetuates the growing incentive to participate in mining. There is also a small portion of newly generated Bitcoin that is awarded to the miner as well, which has caused more people to be skeptical about mining for profit. At the beginning of the year, there were approximately seventeen million coins in circulation out of a possible total of twenty-one million (Statista 1). With Bitcoin’s recent success, more people are using it which means more transactions are being generated daily. But because each miner is profiting with Bitcoin that is brought into circulation, the amount that they receive must diminish over time. Satoshi Nakamoto foresaw this problem, and to handle it he programmed the reward rate to diminish based on the total number of coins in circulation, making the profitability a function of time; therefore, if one were to mine Bitcoin five years ago, they would be rewarded significantly more than if they were mining today (Eduardo 7). On top of that, the hardware that actually manages the encryption is becoming more expensive. ASICs, application specific integrated circuits, are designed for specific use. In the case of Bitcoin, these circuits are designed to maximize the efficiency of solving the algorithms required to mine. The manufacturers of these chips have recognized how profitable their product actually is, and because of that they are able to fluctuate the price of the entire mining industry. Graphics card, another piece of hardware used for mining, have also become increasingly expensive due to the surge in cryptocurrency users. In April of 2017, the Nvidia GeForce GTX 1060 was set at a retail price of $200, but just one year later, the price of that graphics card have more than doubled due to its high demand. The company that manufactures the card is failing to keep up with the demand because the mining industry purchases over half of their supply (Martindale 5). This has resulted in most enthusiasts to veer away from mining and investing in cryptocurrency, leaving wealthy businesses and server companies to mine in mass quantities. Most people who still have an interest in mining turn to renting out hardware from a mining company. These companies usually have large server farm with dedicated hardware and ASICs for the most efficient mining, but it still is a very expensive alternative.
With mining becoming impractical for a majority of crypto enthusiasts, people are investing in smaller cryptocurrencies known as altcoins. Altcoin investing is much more recent than Bitcoin, but it has proven to be just as profitable as Bitcoin was when it first started. An altcoin is essentially any cryptocurrency that is not Bitcoin, hence the name “alternative coin”. These coins, like Bitcoin, are all a form of digital cash that (generally) serve a more niche industry. For example, Basic Attention Token, a cryptocurrency priced at approximately twenty cents, is a blockchain-based altcoin that is used to sell advertisements on the Brave browser (BAT 2). The company that owns the browser made this coin in order to sell advertisements on their browser, but it also is used as a commonly traded coin. There are thousands of these coins listed on multiple exchange websites, and each has a unique purpose like Basic Attention Token. The appeal to these coins is not necessarily the technology behind it, though. Instead, investors purchase these coins due to the price per coin. Many altcoins are listed under a dollar for a single unit, making them analogous to penny stocks. However, those who invest large amounts into these coins believe that they are much safer because the technology behind each coin is progressive and will have some function in the world, which arguably makes them safer than penny stocks. Beyond that, decentralized coins immediately stand out because blockchain technology can potentially have many more uses in the future. This makes it a safer long term investment. The other component that makes altcoins profitable is the volatility for each cryptocurrency. In one day some coins can see a rise of five hundred percent while other days it can fall five hundred percent. Large risks like these deem the coins profitable with proper chart analysis and trading techniques. This is where the algorithmic trading bot comes into use.
For as long as I can remember, I’ve always been interested in computers and programming. When I was twelve, I built my first computer which really helped to further my interest in programming and computing hardware. About a year later, in 2013, I heard about Bitcoin through a geeky online forum that I’m an active member of. Many of the people that I knew from that site were involved in cryptocurrency, so I did more research and found myself trading with it that year, during which the price ranged from twenty to two-hundred dollars (BuyBitcoinWorldwide 1). Because so many members of that community had invested in Bitcoin, it was largely accepted as a form of payment for freelance work on that website. At the time I had been putting a majority of my birthday and Christmas money into Bitcoin and using it as an acceptable form of payment for my freelance graphic design work. During the same year, my dad was using his computer to mine Bitcoin because it was much more profitable and required less intensive hardware. I was able to learn the ins and outs of mining and became heavily involved in online communities that speculated the future of Bitcoin. The blockchain technology behind it rendered it to be a potentially successful coin, and I stuck with it for the years to follow. Eventually more cryptocurrencies were being launched following the success of Bitcoin’s traction. Exchange websites like Bittrex were being made to trade altcoins and the cryptocurrency industry skyrocketed with the
recent surge in Bitcoin’s price. The crypto world is slowly becoming more mainstream, and its untapped potential is just starting to be recognized throughout the world. This causes websites like exchange sites to grow faster, which makes trading easier and more accessible. As the exchange site that I use grew, they began to offer support for trading based on a script, similar to the bot that I am programming. The script would trade a certain coin based on a parameter that is chosen. For example, it could trade on six hundred second intervals and trade according to the moving average. These scripts led the most used exchange sites to support trading bots, which provide a lot more functionality and customization. The site that I’m using offers a precoded API that I can use in my code, and it also has instructions on how to implement the API for the most efficient means of generating profit.
I have been investing in alt coins for a little over a year, so I am very familiar with trends in altcoin and how it is affected by Bitcoin. There is a direct correlation between the price of Bitcoin in altcoin, making the trading of altcoin more predictable. The price of each altcoin is not measured in USD. Instead, each coin’s price is measured by its value compared to Bitcoin. Going back to the example of Basic Attention Token, the price of one coin is equivalent to twenty cents, but its really worth 0.00002813 BTC. By taking this number and multiplying it by the price of Bitcoin in USD, the USD price of Basic Attention Token can be calculated. Because of this, the altcoin and Bitcoin price are directly related. If Bitcoin were only worth a dollar, then Basic Attention Token is only worth 0.00002813 dollars. So when Bitcoin is doing well, the entire altcoin market does well (and vice versa). The algorithm that I am using to trade these coins is heavily influenced by this concept and trades more profitably when Bitcoin is doing well. The surge to twenty-thousand dollars in December was seen as an unhealthy growth for Bitcoin. The traction that it gained had carried over into its price per coin, and most traders knew it was only a matter of time before it bounced back down to the expected support level. But during the time that Bitcoin was experiencing record high prices, the altcoin market was flourishing. Many altcoins that were under a dollar jumped over ten dollars, proving that the altcoin market is just as profitable, if not more profitable, than Bitcoin itself.
With Bitcoin recovering from the unhealthy jump back in December, most altcoins have stayed stagnant over the recent months. The volatility of the coins has stayed constant, but there is yet to be any long term progression. The coins are still volatile, so programming an algorithmic trading bot can take advantage of this. Instead of having to manually purchase a bulk of some altcoin, the bot can purchase for me and calculate the most efficient time to make the purchase based on past trends.
The algorithm for the bot is essentially just the strategy that it uses to do the trading. When I first began programming the bot, I was unsure about how I would go about determining the algorithm for trading. I am very familiar with chart analysis strategies and indicators, but I hardly ever do short term trades of this length. Most trading bots deal in intervals of six hundred to nine hundred seconds, which in the grand scheme of trading is a very short amount of time for a coin to fluctuate in price. For this reason, the bot also mainly trades cheaper coins, especially for the amount of money that I play to invest into it once it is finalized. After researching a significant amount of websites and talking to people from different online communities that I am a part of, there was never a consensus on the most efficient algorithm to use, mainly due to the limbo state that altcoin is currently in. To try to gain a better understanding of short term trading, I began to diversify my trading portfolio and set it up with short term trades. I did more research on appropriate indicators and what to look for when trading in intervals under a day. Though I was largely unsuccessful in profiting, it was not a total misstep. On top of the knowledge I gained about different forms of chart analysis, I was attempting to simulate what my bot would be doing with multiple different strategies. Even though I did not find the most profitable strategy, I could eliminate strategies that I priorly thought had potential to work. For the time being, I am using a strategy that was only truly successful before the Bitcoin spike. As of now, the bot trades over an interval of six hundred seconds, and it trades based on the average candlestick price and the moving average of the coin. By the end of the six hundred seconds, if the candlestick average for those ten minutes is less than the moving average for that time, then it will buy the coin at that price. Likewise, if the candlestick average over the ten minute period is less than the moving average, then it will sell the coin. I have only just gotten the backtesting to be fully functioning, and it seems to have a stronger success rate if I backtest for coins in 2017. The backtesting simulates the bot over a period of time of my choosing, and it will determine how much the bot would have made (or lost) over that time period. The implementation of the API has been harder than I initially thought, so the program cannot yet trade on the exchange site. However, the backtesting has been very beneficial in helping to determine the strategy that I’m going to use and will surely help me improve upon it in the future. In terms of the actual code, I am going to have to streamline the code and take out bits that I am not longer using, as well as comment certain parts that I may find unclear in the future. I have yet to find myself tripping over my own shoelaces, but as I am trying to develop a more complex algorithm, I worry that it may became an issue in the near future. But for now, the results of the bot are better than I initially expected for altcoins in 2017. In 2018, only some altcoins that have been simulated turned a profit. I absolutely believe that it will be successful by the time I’m fully finished with it and I am very excited to see the results.
...(download the rest of the essay above)