I Created a Trading Simulator
deandree.medium.com
deandree.medium.com
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.
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.
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.
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.
Yes, I got 6x returns compared with the market.
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.
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.
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.
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.
For technical analysis to be anything other than an abstract form of gambling, the efficient market hypothesis has to be flat out false.
Representing the market using brownian motion only applies in cases where the market is under the weak or strong forms of EMH.
That flies right past EMH and into the realm of pure numerology.
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 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..
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.
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.
https://www.investopedia.com/ask/answers/032615/what-are-dif...
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?
I'll note that investopedia is often not a good source. Here's an investopedia article that explicitly supports my position, for example: https://www.investopedia.com/terms/t/technicalanalysis.asp
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.
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.
[1]: https://www.investopedia.com/terms/d/double-top-and-bottom.a... [2]: https://www.investopedia.com/articles/active-trading/040914/... [3]: https://www.investopedia.com/terms/t/three_black_crows.asp
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.
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.
Also, here's my favorite counter argument to EMH - https://securityboulevard.com/2020/04/investors-buy-up-the-w...
(Inventing involves significant risks. You could lose all of your capital. Nothing I've writtend should be construed as investment advice)
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.
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.
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.
Best of luck in the future.
eventually, you go to the market, buy another share of stock, and give it back. if you sold high and bought low, you make money.
Anyway, size is on the feature list, will be added in following weeks.