r4lph.io

Free code Mars-Jupiter aspects

My AI Tests Famous Trading Systems

Mars-Jupiter aspects, free for TradingView and Python

My AI coding agent rebuilt the Mars-Jupiter aspects of financial astrology from public sources. It found every aspect in NASA's public ephemeris, wrote its test plan before the first run, tested the aspects on 50 markets against 1,000 shifted calendars, and checked its own work. This is the code it wrote: a TradingView indicator and the full Python test.

Download the code (zip, 149 KB) Source on GitHub

Free, with no sign-up. This is an experiment in what AI agents can build and verify, not trading advice.

The honest result

Mars-Jupiter aspects did no better than random dates. Across 50 markets, the average aspect trade lost 0.36% after costs, worse than 84% of 1,000 shifted calendars. As one portfolio, it lost 1.1% a year after costs. SPY, bought and held, made 8.7% a year, price only.

−0.36%

average trade after costs, all 50 markets. The shifted calendars averaged +0.01%.

16%

of 1,000 shifted calendars did worse than the real aspect dates. A real edge needs 95%.

−1.10%

a year after costs. Equal-weight portfolio of all 50 markets. SPY, bought and held, made +8.7%.

0 of 50

markets beat 95% of their own shifted calendars. Luck alone gives 2 or 3.

GroupAverage trade after costsShifted calendars, meanCalendars beaten
All 50 markets−0.36%+0.01%16%
Stock ETFs (30)+0.14%−0.03%67%
Bond ETFs (8)−0.04%−0.09%68%
Commodities (7)−0.52%−0.08%15%
Crypto (5)−3.62%+0.58%3%

Load it in TradingView

About two minutes. You do not need to code.

  1. Open a chart at tradingview.com. A free account is enough.
  2. Load the symbol SPY and set the timeframe to daily (1D).
  3. Leave dividend adjustment off. The ADJ button at the bottom right of the chart must not be highlighted.
  4. Open the Pine Editor tab at the bottom of the screen and delete the text in the editor.
  5. Open mars-jupiter-aspects.pine in a text editor, copy all of it, and paste it into the Pine Editor.
  6. Click Save, then click Add to chart.

The indicator shades the bar of each aspect and labels it with the exact time in UTC. Dashed lines mark the next four aspects ahead of price, and a table at the top right shows the test trade. On SPY daily, the table shows about 142 closed trades, an average trade of about 0.0% after cost, and about 49% winners. spy-check.md in the zip lists the dates to expect.

What is in the zip

mars-jupiter-aspects.pine
The TradingView indicator in Pine Script v6. It marks every Mars-Jupiter aspect from 1990 to 2035 and can test the trade on any chart.
README.md
How to load the indicator, read the marks and change the settings. It lists every source.
spy-check.md
The aspect dates and the test numbers to expect on SPY.
python/
The full test: the aspect dates from NASA's ephemeris, the data download, the test plan, the shifted calendars and the checks.

Run the Python backtest

From the python/ folder, with Python 3.12 or later:

pip install -r requirements.txt
python fetch_data.py data
python run_tests.py .
python posthoc.py .
python benchmarks.py .
python validate.py .
python spy_check.py SPY

How the agent checked its work

The aspects are the standard five: conjunction 0°, sextile 60°, square 90°, trine 120° and opposition 180°. The planet positions come from NASA JPL's public DE440s ephemeris, computed with Skyfield. The README lists every source, including the claims from Raymond Merriman, David Williams and Matlock.

The video

My AI Tested Mars-Jupiter Aspects on 50 Markets

The video is not live yet. The link appears here when it is.

The channel on YouTube

Download the code All free code

This is an experiment in what AI agents can build and verify, not trading advice. The code is free to use, change and share.