Trading Dev AcademyFree quant education

Free lesson · Technical analysis

Moon phases: encode a calendar hypothesis and try to falsify it

Open interactive lessonPractice calculationsExplore labs

Start with the idea

A calendar cycle can be represented numerically. That representation does not establish a causal or profitable market effect.

Symbols, units & horizon
  • a_t: elapsed days since a chosen reference phase
  • T: assumed cycle length, 29.53059 days in the illustrative approximation
  • mod: remainder after complete cycles
  • θ_t: angle in radians
  • x_t: two dimensionless calendar features
  • π: circular constant

When and why to use this

Use the encoding as a controlled research variable when testing a proposed periodic effect against credible null models.

  • Study lunar timing as an empirical hypothesis, not a price law. Compare it with ordinary calendar and market controls.
  • A cycle wraps around: the end of one cycle is near the beginning of the next. Sine and cosine encode that continuity.
  • The mean synodic month is about 29.53059 days. A constant-period approximation is not a precise astronomical ephemeris.
  • For an actual study, obtain validated phase-event timestamps, specify the reference timezone and map them to the tradable session calendar.
  • Predeclare assets, phase windows, horizon and costs. Control weekday, month-end, trend and volatility effects where justified.
  • Use blocked or circular-shift placebos that preserve relevant time dependence. Correct for testing many cycles, windows and markets.
  • Report null and inconclusive results. A visually appealing phase overlay does not justify changing exposure.
θt=2πatmodTT,xt=(sin⁡θt,cos⁡θt)
Specified chart rule · derivation and arithmetic

Moon phases: encode a calendar hypothesis and try to falsify it

  1. At elapsed age T/4, the cycle fraction is 1/4.
  2. Multiply by 2π to obtain θ=π/2. The features are (1,0).
  3. At age T, remainder is zero and the features return to (0,1), matching the cycle start.
Work it by hand

The quarter-cycle age is 29.53059/4≈7.38265 days under this approximation. These are calendar coordinates, not predicted returns.

Use the rule

  • Fix the definition, units and information timestamp.
  • Compute the example and inspect the graph.
  • Compare with a simple baseline on untouched periods after costs.

Before moving on

Write the exact rule, its availability time, an invalidation condition and a fair out-of-sample test.

Research checkpoint · reviewed 12 September 2026

  • Status: Economics and Environment 4(95), 2025. Full-text methods, results and limitations reviewed.
  • Sample: eight Central/Eastern European equity indexes with complete data, January 2020–July 2024; 56 new-moon and 57 full-moon events. These correlated markets do not provide eight independent lunar calendars.
  • The study compares phase-event log returns with zero. That is not the same test as incremental returns over ordinary trading days, calendar controls and a matched strategy after costs.
  • Use a prospective, predeclared phase test with dependence-aware uncertainty and placebo timings. Findings from a selected high-volatility period do not establish a universal lunar edge.

Lisicki · Moon phases effect in the time of increased volatility (2025) ↗

Research sources, review dates and limitations

Extend the research question

Treat a named pattern as a hypothesis. Record every parameter tried and evaluate the full selection process after costs on a new time block.

Continue with the connected research module →

Python implementation

Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.

from math import sin,cos,pi

def lunar_features(age,period=29.53059):
    if period<=0: raise ValueError("Positive period required")
    angle=2*pi*(age%period)/period
    return sin(angle),cos(angle)

print(lunar_features(29.53059/4))

Continue learning

Technical Analysis: Geometry, Structure & Evidence — all lessons
  1. Support, resistance and reversal: start with a price zone
  2. Breakout detection, false breaks and retests
  3. Fibonacci retracements: anchors before ratios
  4. Harmonic patterns: ratio constraints and competing candidates
  5. Elliott Wave: count hypotheses, rules and invalidation
  6. Fair value gaps (FVG): three-bar geometry and fill measurement
  7. Heikin-Ashi: smoothed candles are synthetic prices
  8. Renko: price-driven bricks and the missing time axis
  9. Dynamic support, trend lines and Gann angles
  10. Momentum indicators, oscillators and divergence
  11. Volume, supply/demand zones and what OHLCV cannot reveal
  12. Market structure, BOS and CHOCH as a state machine
  13. Moon phases: encode a calendar hypothesis and try to falsify it

Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations