There are many kinds of technical analysis. In the breakroom at work, I heard that the wildest folks have even tried predicting prices based on moon phases. At first, the idea sounds absurd, but on the other hand, it’s known that lunar phases can affect people’s sleep and behavior. Since market behavior is partly a psychological game, it’s not entirely out of the question that moon phases could somehow influence decision-making in stock trading.
Last Friday evening, while thinking about this in the sauna, I figured that with the help of AI, this hypothesis could be tested with a reasonable amount of effort. That would make for an interesting weekend project. I decided that the testing program should be ready by Sunday; I couldn’t be bothered to spend any more time on such a silly project. After two days of relentless vibe coding, the program was ready on Sunday evening.
So, the program backtests a trading strategy based on lunar phases against historical price data. It includes all S&P 500 and Nasdaq 100 companies against which the strategy can be tested. Price data spans the last ten years. At times during the project, I got more serious and added all the common technical indicators—like RSI, MACD, SMA Crossover, etc.—whose performance as a trading strategy can also be tested. Here is the link to the program if anyone wants to check it out: https://tickrun.net (free, no registration required, no ads)
Based on preliminary tests, the performance of the moon strategy is mixed… For some stocks, it doesn’t seem to work, while for others, it does. It could be purely a coincidence. Later on, when I discussed this with an AI, it turned out that the effect of lunar phases on the stock market has actually been studied in legitimate academic research:
- “Are Investors Moonstruck? Lunar Phases and Stock Returns”, link: https://personal.lse.ac.uk/yuan/papers/lunar.pdf
• Researchers: Kathy Yuan, Lu Zheng, and Qiaoqiao Zhu (Published in the Journal of Empirical Finance, 2006).
• Data sample: A large global dataset covering stock market indices across 48 countries over several decades.
• Key findings: The researchers found strong global evidence that stock market returns are significantly lower around the full moon than around the new moon. On an annualized basis, the return difference between new moon and full moon periods was about 3–5 percent. The anomaly remained statistically significant even after controlling for market volatility, trading volumes, or other known calendar anomalies (such as the January effect or day-of-the-week effects).
- “Lunar Cycle Effects in Stock Returns”, link: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=281665
• Researchers: Ilia D. Dichev and Troy D. Janes (2001 / SSRN).
• Data sample: Major US stock market indices over more than 100 years, as well as the main indices of 24 other countries over roughly 30 years.
• Key findings: The study confirmed that stock returns earned during the 15 days around the new moon were, on average, approximately double those earned during the 15 days around the full moon. This finding was remarkably consistent across all major US indices over the long term.