This is pretty cool, and seems like it would be fun to mess around with. I loathe to be overly negative since I realize I'm probably not the smartest person in the room so I might have overlooked something, but...
1) My findings are that you can't ever predict future stock performance based on historical data, no matter how many tests/trials/algorithms you run. The reason for this is because we, as mere mortal humans, just simply can't predict the future -- no matter how much we try to obfuscate this fact with math and data science, unless you're modeling every single thing that's happening on the planet at the same time and have created a singularity or something, you just can't. This means there is always something potentially lurking around the corner that can absolutely destroy your returns. Now, can you have success in the short/medium term? Maybe. You have a chance to come out a winner in Vegas too.
2) The difference between simulated trades and real trades is actually quite significant. Every real trade you make on the market, no matter how small and/or insignificant you think it is, actually does have a real impact on the market. This is where I find it typically goes sideways when people come up with algorithms based on historical data. An analogy for this is voting -- you might feel that your one single vote doesn't matter, but the fact that everyone voted is everything. You can't easily simulate this as far as I can think of.
Thank you very much! I don't see the feedback as negative, as what I've seen so far has been 95% overwhelmingly positive. My thesis has proven true - this tool is helping people. While HN might not be the most appropriate audience, I'm still grateful for the comments made here. Always good to see things from different perspective.
As for your points:
1) Trading is a game of probabilities and risk management. None of the best traders I know are trying to predict anything. They are merely reacting to situations where they have calculated advantage. They know their edge, they know their odds, and they are placing their bets when it's skewed in their favor.
2) For most retail trading styles and portfolio sizes, real trades will have an impact, but not significant enough for it to worry about too much. Unless asset your're trading is really illiquid.
I'm not sure it is required that we become able to predict the future perfectly. Some technical patterns for some asset classes in some situations (such as belonging to a strong industry group) do, in fact, give an advantage. Here's an example:
If a securities chart has been trending downward and the price is below its 50-period moving average (50PMA), the price action cannot change to a rapid and significant upturn without crossing above the 50PMA . Although this does not mean that all crosses above the 50PMA will result in rapid and significant gains, a system such as this could be used to test whether such a strategy provides enough of an advantage over time. It can also be used to test one's reflexes to make the trade at the proper time. AND also used to test one's reflexes to get out of the trade if it does not continue moving in the anticipated direction.
On my first try I got a return of 34% over a month of trading, while the Buy & Hold got 5%.
But I'm not going to quit my day job.
It's quite easy to keep afloat if you're trading on something like BitCoin that mostly just goes up and up, with the occasional downward blip. But since you don't know when it all might come crashing down, you may as well be doubling your bet every time you lose at roulette -- that also feels like you keep winning, until you don't.
One thing that would probably be good is to have people create accounts, and ensure all their sessions are logged. That will make it so that people can't just forget their losses and pretend to themselves that they usually win.
"you may as well be doubling your bet every time you lose at roulette" - in trading it's called DCA or Dollar Cost Averaging. Works ok/good for very long term investments in stable assets like SP500 Index Funds. But for daytrading the rule of thumb is "don't add to your losers". There's a good reason for that.
DCA isn't a panacea. It performs well in some scenarios and poorly in others (e.g. if by some means you're somehow certain the market will have a large dip and recovery but you don't know anything about the timing then dollar cost averaging will outperform many alternatives). Applying a rule of thumb as simple as "for long term investments in stable assets" misses enough nuance to lead people astray.
Sure, but investing on a rule of thumb is neither an exercise in probability nor risk management. I'm advocating for using the information you have to choose an appropriate strategy, and I only brought it up at all because of how many people I've seen using DCA inappropriately because they don't understand when it performs well and when it doesn't.
It's easy to pick a winning strategy when everything is going up. If that's the assumption you're using for your investments though (everything has been going up, so it'll keep going up) then DCA still probably isn't what you want -- it'll underperform even dead simple strategies like a diversified buy and hold nearly always. My point is that when choosing investments if you have any theory at all as to what the market might do (and if you don't, why are you investing?), you ought to choose a strategy which based on that information brings you close to your goals, and secondarily it's worth pointing out that in a broad variety of pretty ordinary market conditions DCA is not a good choice.
Exactly. That theory is that the market will always go up long term (because capitalism is inherently inflationary) and historically, DCA plus holding has always given returns over a > 20y period with any reasonably mixed basket.
A “diversified buy & hold” assumes you have your entire 20y investment capital available at the outset, which is rarely the case.
> A “diversified buy & hold” assumes you have your entire 20y investment capital available at the outset, which is rarely the case.
If you don't then you're effectively implementing DCA because you don't have better alternatives available -- regardless of the strategy you use, if you immediately invest spare funds as soon as they're available from a source of evenly distributed recurring income then it'll look a lot like DCA.
That's still consistent with my position of using the data you have to pick the best option you can. If you have options other than DCA (e.g., a sizable percentage people get some kind of windfall in their life), then carefully evaluate whether DCA is the right way to treat that capital. It usually won't be, even compared with dead simple strategies like a diversified buy-and-hold.
As an aside: Ignoring any kind of extreme luck, in a field like tech with rapid raises, no matter which investment strategy you choose your nest egg will almost entirely be comprised of funds from your last 5-10yrs of work.
Nothing is "100% guaranteed". There are lots of reasons that the returns of investing in index funds using DCA may dry up, or even fall over the long run—for instance, it's not inconceivable that a significant enough market downturn could bankrupt a lot of Fortune 500 companies, bringing the indexes down significantly for a long period of time. Even though these types of scenarios seem extremely unlikely, it's incredibly inaccurate to say that any such returns are "100% guaranteed".
Yes, you can argue that, but it’s statistics, and includes the three big crashes the market has lived through. It’s a 20 year period for a reason - it’s how long it would have taken you to recover from 1929 if you bought at the peak just before the crash.
> It’s a 20 year period for a reason - it’s how long it would have taken you to recover from 1929 if you bought at the peak just before the crash.
You've cherry-picked an arbitrary window based on historical returns, but there is no reason that this will hold in the future. You can come up with lots of strategies with arbitrary conditions that would have given you great returns throughout the past century, but completely fail after you implement them. I don't see why dollar cost averaging is any different.
> it’s statistics
Exactly. And nothing in statistics is guaranteed. The fact that it's worked well 100% of the time in the past does not imply that it will work 100% of the time in the future. Does it seem highly unlikely that DCA will stop being an effective investment strategy in the foreseeable future? Yes. But I take issue with the "100% guaranteed" claim, and everyone should realize that no investment strategy is completely risk-free.
Well, down here in the real world, a 100% statistical chance is as good as it gets. Why would you try any other strategy with historical success < 100%, or more likely, unknown?
I have this strategy where I put all of my money into the stock market on the 32nd year of the century, then sell it all off 10 years later. So far it's had huge returns 100% of the time. Is it a good strategy?
Obviously this is a wacky example and I'm trying to make a point, but you could overfit lots of different investment strategies that would have been 100% successful in the past; that doesn't mean they are guaranteed to work in the future.
And for the record, I'm not advocating for any other investment strategy. I'm just pointing out that you cannot possibly claim that any strategy is going to be 100% effective in the future, because you can't predict everything that will happen. The conditions under which DCA is effective may not hold forever, and no investment fully protects you from all risks.
If you place stop orders at predictable places (most traders do), they can be the sole reason why you lose money. Overall the market is expert in triggering your stoploss. And no, it's not manipulation or exchanges trying to make you broke - beginner stoplosses are usually super obvious and free money lying around.
I believe that stop orders are not effective during the after-hours period. This might be because they require a market-maker to actuate, but I'm not sure.
If you need any more help dissuading yourself from becoming a day-trader, I made a Matt Levine Insider Trading Game.
You're given 4 quarters of a stock's history and earnings for the current quarter. Then you are presented 1 of 2 opposite paths (just actual and -actual daily movements). You then have to pick the correct path.
What sort of skill are you supposed to be training when you don't even know the time period or security you're trading? Just by staring at the brownian motion really hard?
It's well known that returns are both not normally distributed (obviously) and not even log-normally distributed (slightly less obvious, but still readily apparent). Moreover, it's pretty obvious that while markets don't conform to any form of EMH, they often trend towards efficiency over time.
This is easy to see in the massive consolidation in the market making space in traditional finance over the last decade and also you can watch it in real-time right now in the crypto space. Even two years ago, it was pretty trivial to be successful as a market maker using quite naive models and a system glued together in Python in a couple days. Today, things have gotten significantly more competitive: many single man operations have become uncompetitive and even larger (3-10 man) and more sophisticated firms are feeling the heat from behemoths like Susquehanna, Jane St, and Jump Trading.
It's amazing how you can feel the crypto market getting more efficient in front or your eyes. It's like running on a treadmill, and you're always terrified it will start going faster than you and your team can run.
Contrary to popular belief, many growth stocks begin their periods of greatest growth at a time when they have reached an all-time high . This was true of TSLA in April, 2013 and NVDA in April, 2016 (No claim on the significance of April is implied) This observation, along with other technical AND fundamental screening techniques may at least be used to generate a short-list of candidated securities deemed more likely to succeed as investments than others. Yet, none of this negates the responsibility to follow sound portfolio management practices.
(Inventing involves significant risks. You could lose all of your capital. Nothing I've writtend should be construed as investment advice)
People who strongly believe in EMH are usually theorists. There are way too many people who's practical track record is way too good to be attributed to chance. I believe markets are random most of the time, but there are moments when they are not. That's where the best traders place their bets.
Surely even the most ardent EMH opponent would at least agree that information is relevant, even if it hasn't been fully absorbed by the market yet, right? I've never met any proponent of technical analysis who maintains that they can divine patterns purely from the shape of the candles, without knowing what they're trading or what day it is?
That flies right past EMH and into the realm of pure numerology.
Honestly, I have no idea. I don't know any proprietary traders who use candlesticks/TA. The one or two people I know who use TA are hobbyists who watched some videos on youtube.
I might be in the wrong here, but all my experience points at TA being something that's used to sell online courses/generate advertising revenue rather than being a legitimate way to trade.
> I've never met any proponent of technical analysis who maintains that they can divine patterns purely from the shape of the candles, without knowing what they're trading or what day it is?
I have. The theory is that the fundamentals of the security are reflected in it's price movements, so reading its price action is roughly analogous to reading news relevant to the instrument. Also it's not really about looking at the "shapes of candles." That's a frankly primitive approach to technical analysis, and one of the biggest reasons that people keep drawing comparisons to astrology, numerology, divination, etc..
>For technical analysis to be anything other than an abstract form of gambling, the efficient market hypothesis has to be flat out false.
Technical analysis is predicated upon the assumption that the efficient market hypothesis is true, and that all investor sentiment and other relevant information is all already priced in.
Whether TA is actually valid or if it's just drawing random foofy lines on a chart remains up for debate.
No, for technical analysis to work, EMH needs to be false.
If EMH is strongly true, then the price of a security will always be priced to the intrinsic value of the underlying. For TA to work, the price needs to be divorced from the intrinsic value because the change in intrinsic value of an asset doesn't follow any pattern.
If EMH is strongly true, even fundamental analysis should yield no alpha since all public information would be integrated into the price. That's why there's a distinction between strong and weak EMH.
Ever wonder why decades after the EMH was postulated it's still a Hypothesis? and not considered a Theory or something stronger? There are far too many people with far too good and consistent a trading record, who's style of trading uses only or primarily price and time data for any reasonable claim that technical analysis doesn't work. This doesn't mean that a typical investor can access investment pools run by these traders, just like the typical investor cannot access the best VC funds or the hottest startups. They typically have tightly binding capacity limits and once the track record is clear, they can pick and choose who to let in.
People pushing technical analysis do believe that it's pointless to look at fundamentals because all (or most) fundamental information is already in the price and hence it's pointless to look at fundamental data. In my opinion this discussion is about as pointless as a religious war.
In the real world specifics and details matter. In general, the weak form of the EMH does hold, as in if you think something is worth twice what the market says it is and you don't have a really good reason why the market doesn't realize this, you are almost certainly wrong. This of course makes a weak form of the claim that all fundamental information is in the price also true.
>No, for technical analysis to work, EMH needs to be false.
The way it was explained to me is that if the EMH is true, then looking at fundamentals is pointless because all the fundamentals are already priced-in, which leaves nothing but price and volume data left to analyze.
How could EMH be anything other than true in that case?
> The way it was explained to me is that if the EMH is true, then looking at fundamentals is pointless because all the fundamentals are already priced-in, which leaves nothing but price and volume data left to analyze.
So, TA proponents believe that market forces, economics, political and social trends, etc, are all instantaneously absorbed by the market - but "double tops"[1] and "hanging mans"[2] and "three black crows"[3] are all low-hanging fruit that the elite can take advantage of?
I'm usually pretty open-minded, but I can't make myself see anyone believing this non-ironically.
The same claims about TA/EMH are made as part of the CFA study materials that are made in the investopedia I linked.
I'm afraid I don't know what else to tell you, there's no public links to CFA Institute study materials and they're a pretty definitive certification authority in finance.
The idea is that stock graphs show patterns. That when it's rising you can stare at the shape of it and intuit whether it is going to rise or fall within the next short period of time. People get very into specific patterns, and books are written about these patterns.
To a certain extent, if a lot of people are doing this this can turn out to be a self-fulfilling prophesy, because lots of people are looking at the same charts and saying "it's bound to fall now" and so sell their assets.
The problem is, this only makes any kind of sense with assets that have very little "real world value" grounded in reality. Why does the price of BitCoin going up? Because people expect it to go up. So they buy it. So it goes up.
Patterns are an oldschool Technical Analysis fallacy that blindly believes that X means up and Y down. More practical and successful approaches (Price Action) focus on statistical significance and recognizing market context and supply/demand imbalances.
Self-fulfilling prophecy is not a real thing - take any chart and you can find 10 patterns that say up and 10 that say down. Big players move the markets and they don't use retail trader Technical Analysis patterns.
It's all about price and price action. A lot of trading styles don't require much history and don't care about the news - it's all calculated in before you know. A lot of traders believe price reflects all you need to know - everything else is just noise.
Almost a year ago I've had pretty much an identical idea. Ultimately I got discouraged by the thought that historical data does not correlate with actual stock performance.
Nonetheless, I'm very proud of you for managing to release this product, regardless of the critique you get in this thread.
Thanks! I've now had 20+ people tell me they had this idea or even started it, or even launched it and got no traction. I needed this for myself, so was going to build this anyway. If this helps anyone else (already has, we have solid stable user base), even better for me. We have quite active Discord and tons of ideas what to build next.
I miss Quantopian.com for messing with algorimic trading (most especially for the decades of tick-level data, the community, and back-testing!!). It was sold to Robinhood last month. John Fawcett is an interesting guy & he probably still lurks HN (Hi!).
My brother was a daytrader in the late 90s on Wall Street at a small firm. He said they didn't hire him for his degree (elite university) but for his ability to play a music instrument at a high level. They looked for people with a strong ability in a specific, nontrivial "skill." There were a lot of athletes, it didn't have to be analytical or related to trading. He didn't do well there and left after a short while, but this trading simulator makes me think of zeroing on just that narrow ability to stare at the charts and suss out patterns from the noise.
Successful traders come from very different backgrounds and use very different methods. There are a million ways to make money in this, but they all are very hard to find. Most of successful traders have very unique skillset. This is a performance sport. Lot's or similarities with pro athletes.
I had a couple of interviews at trading firms and the largest ones required skill tests such as clicking buttons within a specific time period, riddles, etc.
From what I know, there is basically only one thing they care about. Proven track record of making money and beating the market. Nothing else really counts. Except for young graduate quants - you need a degree from top tier school.
This looks great! Congrats on launching. We used to be in this space too. The most tricky part is performance, especially if you are backtesting against an algorithm instead of manual trading. Having to wait for the results on 30 years of trading data can get rather annoying at times. If you do implement support for algorithmic trading, it might be helpful to rewrite the core in WebAssembly.
Thanks! This tool focuses specifically on Price Action style daytrading. For algotrading there are many other tools that are way better suited for this task.
"Go short" means you sell first, then buy it back later. If you think AAPL is going lower, you can borrow shares from your broker and sell those. And when it goes down, you buy back shares at lower price and return them to broker with interest.
To simplify - when you long, you bet on price going up. When you short, you bet on price going down. If you went short and price dropped 5%, your profit is 5% (minus commission, slippage, and some other stuff).
Does it really impact your practicing experience that significantly? This is an abstraction over market, it also doesn't have slippage and hundred other things.
Anyway, size is on the feature list, will be added in following weeks.
If averaging down is the key to your daytrading strategy, I suggest you rethink your strategy. There is a good saying - "never add to a losing position".
I've been doing a fair bit of promotion and marketing, because "you build it and they will come" rarely works, even if your stuff is good. But I'm sure any dev who has launched anything already knows that.
I posted this here with close to 0 expectations, because my posts in HN usually don't get much attention. If you've seen this on Reddit, you should know it was very well received in multiple subs, so getting a bit more than 20 upvotes here wouldn't be something out of the ordinary.
The rank of the post got affected by the flamewar detector, not because of voting abnormality.
Please don't break the HN guidelines by insinuating this kind of thing without evidence—they're quite explicit about that (https://news.ycombinator.com/newsguidelines.html), for good reason because most such insinuations are just pure perception. The internet is a bit Rohrshcach diagram that way.
If you're worried about vote manipulation, that doesn't mean you should do nothing! But what you should do is email hn@ycombinator.com so we can investigate. We always do.
Your post got like 30 upvotes in 30 minutes (paid for) which made it rocket up to the front page. The HN mod team then manually removed it from the front page due to vote manipulation. Notice how after your paid votes ran out nobody else gave it many more additional votes - still hovering around 30.
1) My findings are that you can't ever predict future stock performance based on historical data, no matter how many tests/trials/algorithms you run. The reason for this is because we, as mere mortal humans, just simply can't predict the future -- no matter how much we try to obfuscate this fact with math and data science, unless you're modeling every single thing that's happening on the planet at the same time and have created a singularity or something, you just can't. This means there is always something potentially lurking around the corner that can absolutely destroy your returns. Now, can you have success in the short/medium term? Maybe. You have a chance to come out a winner in Vegas too.
2) The difference between simulated trades and real trades is actually quite significant. Every real trade you make on the market, no matter how small and/or insignificant you think it is, actually does have a real impact on the market. This is where I find it typically goes sideways when people come up with algorithms based on historical data. An analogy for this is voting -- you might feel that your one single vote doesn't matter, but the fact that everyone voted is everything. You can't easily simulate this as far as I can think of.