6 ms·
Cryptocurrency Analysis with Python – Buy and Hold
- minimaxir 9y agoUnless you can include the complete irrationality of the users fueling the crypto bubble to get rich into the statistical model, any statistical analysis of those prices will be misleading. Traditional historical trend analyses of stock prices assume the market is somewhat rational. (but not 100% efficient, which is where money can be made)
- AlexCoventry 9y agoIt's not irrational. It's an asset whose price is rising. If you want to make money, it's a good asset to trade. Just avoid hodling the bag when the music stops...
- thisisit 9y ago> Just avoid hodling the bag when the music stops... and how do you know exactly when the music has stopped?
- pertsix 9y agoa lot more people sell than buy cryptocurrency
- diogofranco 9y agoHow would that work? Any coin that is bought is also sold, so you're saying that the buys come from a few people buying big amounts? But all those sellers were buyers at some point...
- pertsix 9y agobuyers are willing to trade USD for more bitcoins. the price might never go to zero, but it will approach it.
- jcoffland 9y agoIt's easy to tell when the music has stopped. The hard part is anticipating the stopping.
- lr4444lr 9y agoWhat do you think of the "buy low, sell high" strategy? ;-)
- huphelmeyer 9y agoIs it that easy? The Nasdaq bubble took roughly 6 years to inflate and 3 years to "pop". The real estate bubble took about 11 years to inflate and 6 years to fully deflate. Even Enron took the better part of a year to fully deflate. Maybe balloon is a better word than bubble.
- shrimpx 9y agoPeople who can't tell it has popped are the ones keeping it on life support for years. :-)
- empath75 9y agoWhen you’re broke.
- deleted 9y ago[deleted]
- sillysaurus3 9y agoI've told people to buy at $3,800, $5,900, and $14,000 and got shouted down each time. All of these were after major crashes, so of course the price was about to bounce back. Even if you know when the music hasn't stopped yet, it's very hard to get anyone to listen.
- ascom 9y agoOh boy... I told my dad to buy at $8, $27, $200, $2000, $3000, $6000, and $12000. None of these times has he actually taken any action. :( If only I turned 18 a couple years earlier...
- shuaib 9y agoYour dad is a wise man!
- sillysaurus3 9y agoOn the other hand, if he had put in $8 at $8, he'd have $16,000 today.
- yason 9y agoBuying at $8 would be easy. Not selling at $200 would be hard. Not selling at $2000 would be even harder.
- sean2 9y agoIt's easy to see in retrospect that the beginning of bitcoin would've been a good place to throw in some meaningless quantities of cash, but I think once you divide by the number of small, potential investments you could make that wouldn't have made you money, and subtract the amount of time commitment to keep track of those investments, the outcome is less appealing. (Obviously, some people knew it was about explode, but I'm looking at everything you hear your kid, or a co-worker giving you hot tips about, which was the boat I was in and it sounds like this kid's dad was in).
- 9y ago
- AlexCoventry 9y agoIt crashes during scandals like Mt Gox, and the big crash will come when a major nation-state decides to crack down on it. Full disclosure: I don't own any Bitcoin, but I own other cryptocurrencies.
- bdcravens 9y agoGood question. Many thought the music had stopped in 2014, when the price crashed from $1200 to less than $200. (Previously in 2011-2012 it crashed from $35 to less than $2, which was pre-ASICs, so you really couldn't mine at a profit)
- cortesoft 9y agoIf the assumption is that the price will crash, then every dollar made by someone on bitcoin is a dollar lost by someone on bitcoin, since the underlying asset had no intrinsic value at all. Given that there are a lot of people who have more resources than me, and can do better research and better market manipulation, I am pretty sure I have a better chance of being in the group that loses the money.
- heurist 9y agoLong-term it is hard to justify a conclusion that cryptocurrencies will fail as a technology. It's too big of a leap forward in too many industries. Short term, bitcoin might move too slowly and be surpassed by a competitor, or big money might manipulate the market and take advantage of people who have no idea what they're doing. I see these as issues that will diminish and fade over time as the technology matures. The solution is to stay attentive, invest with caution and hold on through the booms and busts. Not hard to do, all said and done, though I understand why many fear it.
- AlexCoventry 9y agoCryptocurrencies generically, sure. Permissioned blockchains are going to be huge. Medium to long term, decentralized validation mechanisms are going to get hit hard by double spends, and decentralized currencies will fall drastically when that happens.
- eksemplar 9y agoConsidering banks have taken to use ripple, crypto obviously has it’s place. Bitcoin doesn’t really seem like it’ll have much of a future though. Well unless people keep pretending the naked emperor has clothes, which they might.
- down 9y agoif Gold can be irrational for 2k years, I don't see why not bitcoin can't, the only think gold has going for "longer history", yet HN folk love to say "past performance are not an...bla bla", yes it also has the 5% - 10% industrial use, but bitcoin has that too by being able to transfer it without third party, so will also not go to zero because will be useful as transfer of value.
- 24gttghh 9y agoAren't 'miners' the third party?
- davewritescode 9y agoGold has a price floor because it has some industrial utility and is useful for making jewelry. All that has to happen to destroy bitcoin is a flaw in the implementation. Seriously, look at OpenSSL and tell me the same issues aren’t possible in bitcoin. When did we get so trusting of software that we decided it’d be a good idea to base currency on a distributed algorithm?
- throwaway30yo 9y agoThe project can always fork if major issues are found. Bitcoin is very very far from a perfect solution, but it is a solution to many problems currencies have.
- UncleMeat 9y agoGiven how hard it is for the community to do something as simple as increase the block size a tiny bit, I'm not confident that a fork could fix such a problem.
- down 9y agomaking jewelry is in the store of value spectrum, with only industrial use, would be at 5% - 10% of current price.
- htormey 9y ago
- Kinnard 9y agoAre you sure it's complete?
- zitterbewegung 9y agoAt our local Chicago Python User group chapter (chipy.org) one of the organizers of the Financial Group did a similar analysis. HODL is extremely hard to beat if not impossible. See https://github.com/Chipy-Finance/CryptoTechnicals/blob/master/FinSIG%20Dec%202017%20-%20Technical%20Crypto%20Strategy.key https://github.com/Chipy-Finance/CryptoTechnicals/blob/maste... https://github.com/Chipy-Finance/CryptoTechnicals/blob/master/Buy%20and%20Hold.ipynb https://github.com/Chipy-Finance/CryptoTechnicals/blob/maste... There is more in the github directory also.
- HIP_HOP 9y agothank you. Gonna look at it
- HIP_HOP 9y agoMy next step is to implement strategy testing. I would like to end this series with a classifier that predicts buy or hold. Follow me on Twitter to get the latest updates: https://twitter.com/romanorac https://twitter.com/romanorac
- minimaxir 9y agoA classifier that flips a coin would probably have higher accuracy.
- HighlandSpring 9y agoGive the coin a bias towards long and you've got a winner!
- HIP_HOP 9y agoI am going to try. I am not saying I developed it.
- brndnmtthws 9y agoI think you meant HODL.
- hendzen 9y agoDon't work with closing prices for statistical analysis. Work with returns (really log returns). This would have simplified some of the code, and made the plots in the same units rather than requiring separate axes. More detail: https://quantivity.wordpress.com/2011/02/21/why-log-returns/ https://quantivity.wordpress.com/2011/02/21/why-log-returns/
- HIP_HOP 9y agoThx... I intend to use it next time. This is going to be a series of blog posts about cryptocurrency analysis.
- turnersr 9y agoWhat do you mean by those plots currently have different units? Don't they consider the price in dollars as the unit?
- HIP_HOP 9y agoThey have the dollar as a unit, just y-axis scale is different. For BTC is from $4000 to $20000 and for LTC is from $50 to $350. This is a useful technique to check if curves move together or not.
- viridian 9y agoThis may be a bit pedantic, but the phrase the author uses in his disclaimer "Experts agree that cryptocurrencies are a bubble." bothers me because it's kind of misleading. The actual fact at hand is ~96% of economists think that the crypto market has been subject to a massive speculation bubble as of November. While that's sort of close to Roman's disclaimer, there is some nuance that ought to be given, since a) 4% of professionals dissent, and b) the question asked of economists had a temporal element to it, and they might have answered differently if the market hadn't tripled in value in as many months. It's the difference between 'the housing market is in a bubble currently', and 'housing is a bubble'.
- HIP_HOP 9y agoI agree, I just wanted to make sure some noob doesn't think he'll invest and make a guaranteed profit.
- tbrownaw 9y agothere is some nuance that ought to be given, since a) 4% of professionals dissent, and b) That's roughly the same % of professionals that I've heard dissent about global warming, yet dissenting about that will get you labeled as stupid and/or corrupt. So what makes it worth calling out for nuance here?
- dperfect 9y agoI ran some tests of my own with simulated automated trading strategies over the past few years of historical Bitcoin price data. I used a genetic algorithm to encode a range of time parameters for MACD, along with different trading triggers and amounts. After a day or two of running it against a huge number of permutations and generations optimized for highest overall return, I came to a similar conclusion: the fittest configurations could do fairly well in automated trading (the more active ones were highly sensitive to trading fees [which were simulated] and market depth [was not simulated]), but over the span of more than a few months, a simple buy and hold strategy produced better returns in almost any time window.
- jonny_eh 9y agoIs that another way of saying "the bubble hasn't burst yet"?
- dperfect 9y agoWell, the data did include Bitcoin's first rise above $1000 and subsequent crash (which most people called "a bubble"). If you had bought right before that one "popped", yes - you would have waited a while to be back in positive territory, so that's one time window where you might have lost money compared to the algorithm, but only if you were impatient.
- granitosaurus 9y agoYou and OP have the same mistake - you trade exchange, when you should trade margin. In trading exchange bots will lose in unregulated market. Only the best bots can benefit where insider information is a common thing. In margin trading however what you do is extend your overal capital, i.e. by having 10k usd you can make profits of holding 10k and trading 100k (at 10x margin). However of course margin is more dangerous but nevertheless you'll most likely end up with positive in the long run.
- adjkant 9y agoDepending on the automated strategy, they can dramatically reduce risk though. That has value well beyond the simple return of buy and hold, where if you don't time the sell perfectly, it's all useless. I think that's the big advantage automated trading strategies can have if designed well.
- bhaak 9y agoIt's an open secret that "buy and hold" is hard to beat. This is the reason why ETFs and other unmanaged asset options have become so popular in recent years. But that insight is not new. The phrase "time in the market beats timing the market" goes way back and also popular stock market participants like Buffet or Kostolany have been saying this for decades. With regards to cryptocurrencies, we are seeing in a condensed time frame the same development that for example the stock market went through. Cryptocurrencies might become a new asset class but that doesn't mean that it works financially differently than the other asset classes. So it should be no surprise that the same trading strategies end up being the most profitable.