Examples: financial astrology data in backtests

Real outputs of the engine, computed when this page was built, with the request and its SHA-256: send the same request to the API and you get the same hash. The strategies in the code show the mechanics of using a planetary line or an event as a feature; they are illustrations, not trading signals, and no performance figure is shown.

Install: pip install "astro-agents @ git+https://github.com/aidatatools-dev/astro-agents#subdirectory=clients/python" · all files: clients/python/examples

1. Gann planetary lines as a time series

250°300°350°400°450°202220232024geo.jupitergeo.saturngeo.mean_of_52022-01-01 geo.jupiter: 330.55° geo.saturn: 311.90° geo.mean_of_5: 266.00°2022-01-08 geo.jupiter: 331.95° geo.saturn: 312.68° geo.mean_of_5: 266.49°2022-01-15 geo.jupiter: 333.42° geo.saturn: 313.47° geo.mean_of_5: 267.01°2022-01-22 geo.jupiter: 334.95° geo.saturn: 314.29° geo.mean_of_5: 267.57°2022-01-29 geo.jupiter: 336.52° geo.saturn: 315.13° geo.mean_of_5: 268.14°2022-02-05 geo.jupiter: 338.14° geo.saturn: 315.96° geo.mean_of_5: 268.74°2022-02-12 geo.jupiter: 339.79° geo.saturn: 316.80° geo.mean_of_5: 269.35°2022-02-19 geo.jupiter: 341.45° geo.saturn: 317.63° geo.mean_of_5: 269.97°2022-02-26 geo.jupiter: 343.14° geo.saturn: 318.45° geo.mean_of_5: 270.61°2022-03-05 geo.jupiter: 344.83° geo.saturn: 319.25° geo.mean_of_5: 271.24°2022-03-12 geo.jupiter: 346.52° geo.saturn: 320.03° geo.mean_of_5: 271.87°2022-03-19 geo.jupiter: 348.21° geo.saturn: 320.77° geo.mean_of_5: 272.50°2022-03-26 geo.jupiter: 349.88° geo.saturn: 321.47° geo.mean_of_5: 273.12°2022-04-02 geo.jupiter: 351.53° geo.saturn: 322.13° geo.mean_of_5: 273.72°2022-04-09 geo.jupiter: 353.16° geo.saturn: 322.74° geo.mean_of_5: 274.31°2022-04-16 geo.jupiter: 354.74° geo.saturn: 323.29° geo.mean_of_5: 274.87°2022-04-23 geo.jupiter: 356.29° geo.saturn: 323.79° geo.mean_of_5: 275.41°2022-04-30 geo.jupiter: 357.78° geo.saturn: 324.22° geo.mean_of_5: 275.92°2022-05-07 geo.jupiter: 359.21° geo.saturn: 324.58° geo.mean_of_5: 276.40°2022-05-14 geo.jupiter: 360.58° geo.saturn: 324.86° geo.mean_of_5: 276.84°2022-05-21 geo.jupiter: 361.88° geo.saturn: 325.07° geo.mean_of_5: 277.24°2022-05-28 geo.jupiter: 363.09° geo.saturn: 325.20° geo.mean_of_5: 277.59°2022-06-04 geo.jupiter: 364.21° geo.saturn: 325.25° geo.mean_of_5: 277.90°2022-06-11 geo.jupiter: 365.22° geo.saturn: 325.22° geo.mean_of_5: 278.17°2022-06-18 geo.jupiter: 366.13° geo.saturn: 325.11° geo.mean_of_5: 278.38°2022-06-25 geo.jupiter: 366.91° geo.saturn: 324.93° geo.mean_of_5: 278.54°2022-07-02 geo.jupiter: 367.57° geo.saturn: 324.67° geo.mean_of_5: 278.65°2022-07-09 geo.jupiter: 368.08° geo.saturn: 324.35° geo.mean_of_5: 278.70°2022-07-16 geo.jupiter: 368.45° geo.saturn: 323.96° geo.mean_of_5: 278.70°2022-07-23 geo.jupiter: 368.66° geo.saturn: 323.53° geo.mean_of_5: 278.65°2022-07-30 geo.jupiter: 368.72° geo.saturn: 323.05° geo.mean_of_5: 278.54°2022-08-06 geo.jupiter: 368.61° geo.saturn: 322.55° geo.mean_of_5: 278.39°2022-08-13 geo.jupiter: 368.34° geo.saturn: 322.03° geo.mean_of_5: 278.19°2022-08-20 geo.jupiter: 367.92° geo.saturn: 321.50° geo.mean_of_5: 277.95°2022-08-27 geo.jupiter: 367.36° geo.saturn: 320.99° geo.mean_of_5: 277.68°2022-09-03 geo.jupiter: 366.67° geo.saturn: 320.50° geo.mean_of_5: 277.37°2022-09-10 geo.jupiter: 365.87° geo.saturn: 320.04° geo.mean_of_5: 277.05°2022-09-17 geo.jupiter: 364.99° geo.saturn: 319.63° geo.mean_of_5: 276.72°2022-09-24 geo.jupiter: 364.07° geo.saturn: 319.28° geo.mean_of_5: 276.38°2022-10-01 geo.jupiter: 363.13° geo.saturn: 318.99° geo.mean_of_5: 276.05°2022-10-08 geo.jupiter: 362.22° geo.saturn: 318.78° geo.mean_of_5: 275.75°2022-10-15 geo.jupiter: 361.36° geo.saturn: 318.64° geo.mean_of_5: 275.47°2022-10-22 geo.jupiter: 360.59° geo.saturn: 318.59° geo.mean_of_5: 275.22°2022-10-29 geo.jupiter: 359.93° geo.saturn: 318.62° geo.mean_of_5: 275.03°2022-11-05 geo.jupiter: 359.41° geo.saturn: 318.73° geo.mean_of_5: 274.88°2022-11-12 geo.jupiter: 359.05° geo.saturn: 318.93° geo.mean_of_5: 274.79°2022-11-19 geo.jupiter: 358.84° geo.saturn: 319.20° geo.mean_of_5: 274.76°2022-11-26 geo.jupiter: 358.81° geo.saturn: 319.55° geo.mean_of_5: 274.78°2022-12-03 geo.jupiter: 358.94° geo.saturn: 319.98° geo.mean_of_5: 274.87°2022-12-10 geo.jupiter: 359.24° geo.saturn: 320.48° geo.mean_of_5: 275.02°2022-12-17 geo.jupiter: 359.70° geo.saturn: 321.03° geo.mean_of_5: 275.23°2022-12-24 geo.jupiter: 360.32° geo.saturn: 321.65° geo.mean_of_5: 275.49°2022-12-31 geo.jupiter: 361.07° geo.saturn: 322.32° geo.mean_of_5: 275.81°2023-01-07 geo.jupiter: 361.96° geo.saturn: 323.03° geo.mean_of_5: 276.17°2023-01-14 geo.jupiter: 362.97° geo.saturn: 323.79° geo.mean_of_5: 276.59°2023-01-21 geo.jupiter: 364.10° geo.saturn: 324.57° geo.mean_of_5: 277.04°2023-01-28 geo.jupiter: 365.32° geo.saturn: 325.38° geo.mean_of_5: 277.53°2023-02-04 geo.jupiter: 366.63° geo.saturn: 326.21° geo.mean_of_5: 278.06°2023-02-11 geo.jupiter: 368.01° geo.saturn: 327.05° geo.mean_of_5: 278.61°2023-02-18 geo.jupiter: 369.47° geo.saturn: 327.90° geo.mean_of_5: 279.19°2023-02-25 geo.jupiter: 370.98° geo.saturn: 328.74° geo.mean_of_5: 279.79°2023-03-04 geo.jupiter: 372.54° geo.saturn: 329.58° geo.mean_of_5: 280.40°2023-03-11 geo.jupiter: 374.15° geo.saturn: 330.40° geo.mean_of_5: 281.02°2023-03-18 geo.jupiter: 375.78° geo.saturn: 331.21° geo.mean_of_5: 281.65°2023-03-25 geo.jupiter: 377.44° geo.saturn: 331.98° geo.mean_of_5: 282.27°2023-04-01 geo.jupiter: 379.12° geo.saturn: 332.73° geo.mean_of_5: 282.90°2023-04-08 geo.jupiter: 380.81° geo.saturn: 333.43° geo.mean_of_5: 283.52°2023-04-15 geo.jupiter: 382.50° geo.saturn: 334.09° geo.mean_of_5: 284.13°2023-04-22 geo.jupiter: 384.18° geo.saturn: 334.70° geo.mean_of_5: 284.72°2023-04-29 geo.jupiter: 385.86° geo.saturn: 335.26° geo.mean_of_5: 285.29°2023-05-06 geo.jupiter: 387.51° geo.saturn: 335.75° geo.mean_of_5: 285.84°2023-05-13 geo.jupiter: 389.14° geo.saturn: 336.18° geo.mean_of_5: 286.37°2023-05-20 geo.jupiter: 390.75° geo.saturn: 336.54° geo.mean_of_5: 286.86°2023-05-27 geo.jupiter: 392.31° geo.saturn: 336.82° geo.mean_of_5: 287.33°2023-06-03 geo.jupiter: 393.82° geo.saturn: 337.03° geo.mean_of_5: 287.75°2023-06-10 geo.jupiter: 395.29° geo.saturn: 337.16° geo.mean_of_5: 288.15°2023-06-17 geo.jupiter: 396.69° geo.saturn: 337.21° geo.mean_of_5: 288.50°2023-06-24 geo.jupiter: 398.03° geo.saturn: 337.18° geo.mean_of_5: 288.81°2023-07-01 geo.jupiter: 399.28° geo.saturn: 337.07° geo.mean_of_5: 289.07°2023-07-08 geo.jupiter: 400.45° geo.saturn: 336.88° geo.mean_of_5: 289.29°2023-07-15 geo.jupiter: 401.53° geo.saturn: 336.62° geo.mean_of_5: 289.47°2023-07-22 geo.jupiter: 402.50° geo.saturn: 336.29° geo.mean_of_5: 289.59°2023-07-29 geo.jupiter: 403.35° geo.saturn: 335.90° geo.mean_of_5: 289.67°2023-08-05 geo.jupiter: 404.08° geo.saturn: 335.46° geo.mean_of_5: 289.71°2023-08-12 geo.jupiter: 404.68° geo.saturn: 334.97° geo.mean_of_5: 289.70°2023-08-19 geo.jupiter: 405.13° geo.saturn: 334.46° geo.mean_of_5: 289.64°2023-08-26 geo.jupiter: 405.43° geo.saturn: 333.94° geo.mean_of_5: 289.54°2023-09-02 geo.jupiter: 405.57° geo.saturn: 333.41° geo.mean_of_5: 289.41°2023-09-09 geo.jupiter: 405.55° geo.saturn: 332.89° geo.mean_of_5: 289.23°2023-09-16 geo.jupiter: 405.36° geo.saturn: 332.40° geo.mean_of_5: 289.02°2023-09-23 geo.jupiter: 405.02° geo.saturn: 331.94° geo.mean_of_5: 288.78°2023-09-30 geo.jupiter: 404.52° geo.saturn: 331.53° geo.mean_of_5: 288.52°2023-10-07 geo.jupiter: 403.88° geo.saturn: 331.18° geo.mean_of_5: 288.24°2023-10-14 geo.jupiter: 403.12° geo.saturn: 330.90° geo.mean_of_5: 287.96°2023-10-21 geo.jupiter: 402.27° geo.saturn: 330.69° geo.mean_of_5: 287.67°2023-10-28 geo.jupiter: 401.35° geo.saturn: 330.56° geo.mean_of_5: 287.38°2023-11-04 geo.jupiter: 400.40° geo.saturn: 330.51° geo.mean_of_5: 287.12°2023-11-11 geo.jupiter: 399.46° geo.saturn: 330.55° geo.mean_of_5: 286.88°2023-11-18 geo.jupiter: 398.56° geo.saturn: 330.68° geo.mean_of_5: 286.67°2023-11-25 geo.jupiter: 397.73° geo.saturn: 330.89° geo.mean_of_5: 286.50°2023-12-02 geo.jupiter: 397.01° geo.saturn: 331.18° geo.mean_of_5: 286.39°2023-12-09 geo.jupiter: 396.42° geo.saturn: 331.54° geo.mean_of_5: 286.32°2023-12-16 geo.jupiter: 395.98° geo.saturn: 331.98° geo.mean_of_5: 286.32°2023-12-23 geo.jupiter: 395.69° geo.saturn: 332.50° geo.mean_of_5: 286.37°2023-12-30 geo.jupiter: 395.58° geo.saturn: 333.07° geo.mean_of_5: 286.49°2024-01-06 geo.jupiter: 395.64° geo.saturn: 333.70° geo.mean_of_5: 286.66°2024-01-13 geo.jupiter: 395.87° geo.saturn: 334.38° geo.mean_of_5: 286.89°2024-01-20 geo.jupiter: 396.26° geo.saturn: 335.11° geo.mean_of_5: 287.18°2024-01-27 geo.jupiter: 396.80° geo.saturn: 335.87° geo.mean_of_5: 287.52°2024-02-03 geo.jupiter: 397.49° geo.saturn: 336.67° geo.mean_of_5: 287.90°2024-02-10 geo.jupiter: 398.32° geo.saturn: 337.49° geo.mean_of_5: 288.33°2024-02-17 geo.jupiter: 399.26° geo.saturn: 338.33° geo.mean_of_5: 288.80°2024-02-24 geo.jupiter: 400.33° geo.saturn: 339.18° geo.mean_of_5: 289.30°2024-03-02 geo.jupiter: 401.49° geo.saturn: 340.04° geo.mean_of_5: 289.83°2024-03-09 geo.jupiter: 402.74° geo.saturn: 340.89° geo.mean_of_5: 290.38°2024-03-16 geo.jupiter: 404.07° geo.saturn: 341.73° geo.mean_of_5: 290.95°2024-03-23 geo.jupiter: 405.47° geo.saturn: 342.56° geo.mean_of_5: 291.54°2024-03-30 geo.jupiter: 406.93° geo.saturn: 343.37° geo.mean_of_5: 292.13°2024-04-06 geo.jupiter: 408.44° geo.saturn: 344.16° geo.mean_of_5: 292.73°2024-04-13 geo.jupiter: 409.99° geo.saturn: 344.90° geo.mean_of_5: 293.33°2024-04-20 geo.jupiter: 411.58° geo.saturn: 345.61° geo.mean_of_5: 293.92°2024-04-27 geo.jupiter: 413.19° geo.saturn: 346.28° geo.mean_of_5: 294.51°2024-05-04 geo.jupiter: 414.82° geo.saturn: 346.89° geo.mean_of_5: 295.08°2024-05-11 geo.jupiter: 416.47° geo.saturn: 347.45° geo.mean_of_5: 295.64°2024-05-18 geo.jupiter: 418.12° geo.saturn: 347.95° geo.mean_of_5: 296.18°2024-05-25 geo.jupiter: 419.77° geo.saturn: 348.38° geo.mean_of_5: 296.69°2024-06-01 geo.jupiter: 421.41° geo.saturn: 348.75° geo.mean_of_5: 297.18°2024-06-08 geo.jupiter: 423.04° geo.saturn: 349.04° geo.mean_of_5: 297.64°2024-06-15 geo.jupiter: 424.65° geo.saturn: 349.25° geo.mean_of_5: 298.08°2024-06-22 geo.jupiter: 426.23° geo.saturn: 349.38° geo.mean_of_5: 298.47°2024-06-29 geo.jupiter: 427.78° geo.saturn: 349.43° geo.mean_of_5: 298.84°2024-07-06 geo.jupiter: 429.29° geo.saturn: 349.40° geo.mean_of_5: 299.17°2024-07-13 geo.jupiter: 430.75° geo.saturn: 349.28° geo.mean_of_5: 299.45°2024-07-20 geo.jupiter: 432.15° geo.saturn: 349.09° geo.mean_of_5: 299.70°2024-07-27 geo.jupiter: 433.49° geo.saturn: 348.83° geo.mean_of_5: 299.91°2024-08-03 geo.jupiter: 434.75° geo.saturn: 348.50° geo.mean_of_5: 300.09°2024-08-10 geo.jupiter: 435.94° geo.saturn: 348.10° geo.mean_of_5: 300.22°2024-08-17 geo.jupiter: 437.03° geo.saturn: 347.66° geo.mean_of_5: 300.31°2024-08-24 geo.jupiter: 438.03° geo.saturn: 347.17° geo.mean_of_5: 300.37°2024-08-31 geo.jupiter: 438.91° geo.saturn: 346.65° geo.mean_of_5: 300.39°2024-09-07 geo.jupiter: 439.67° geo.saturn: 346.12° geo.mean_of_5: 300.37°2024-09-14 geo.jupiter: 440.30° geo.saturn: 345.58° geo.mean_of_5: 300.32°2024-09-21 geo.jupiter: 440.79° geo.saturn: 345.06° geo.mean_of_5: 300.24°2024-09-28 geo.jupiter: 441.13° geo.saturn: 344.56° geo.mean_of_5: 300.13°2024-10-05 geo.jupiter: 441.31° geo.saturn: 344.10° geo.mean_of_5: 300.00°2024-10-12 geo.jupiter: 441.33° geo.saturn: 343.69° geo.mean_of_5: 299.84°2024-10-19 geo.jupiter: 441.18° geo.saturn: 343.34° geo.mean_of_5: 299.67°2024-10-26 geo.jupiter: 440.87° geo.saturn: 343.06° geo.mean_of_5: 299.47°2024-11-02 geo.jupiter: 440.41° geo.saturn: 342.85° geo.mean_of_5: 299.27°2024-11-09 geo.jupiter: 439.80° geo.saturn: 342.73° geo.mean_of_5: 299.06°2024-11-16 geo.jupiter: 439.07° geo.saturn: 342.69° geo.mean_of_5: 298.85°2024-11-23 geo.jupiter: 438.23° geo.saturn: 342.74° geo.mean_of_5: 298.64°2024-11-30 geo.jupiter: 437.32° geo.saturn: 342.88° geo.mean_of_5: 298.45°2024-12-07 geo.jupiter: 436.38° geo.saturn: 343.09° geo.mean_of_5: 298.28°2024-12-14 geo.jupiter: 435.43° geo.saturn: 343.40° geo.mean_of_5: 298.14°2024-12-21 geo.jupiter: 434.51° geo.saturn: 343.78° geo.mean_of_5: 298.03°2024-12-28 geo.jupiter: 433.66° geo.saturn: 344.23° geo.mean_of_5: 297.96°
Geocentric longitudes (unwrapped degrees), weekly, 2022-2024: Jupiter, Saturn and the Mean of 5 (Jupiter..Pluto). The retrograde loops are visible as the dips. Hover a week for its values.
Table view
UTCgeo.jupitergeo.saturngeo.mean_of_5
2022-01-01330.5459°311.9028°266.0010°
2022-01-29336.5236°315.1254°268.1413°
2022-02-26343.1390°318.4534°270.6051°
2022-03-26349.8820°321.4706°273.1195°
2022-04-23356.2857°323.7873°275.4137°
2022-05-21361.8766°325.0706°277.2373°
2022-06-18366.1264°325.1145°278.3798°
2022-07-16368.4472°323.9636°278.7017°
2022-08-13368.3419°322.0287°278.1915°
2022-09-10365.8694°320.0434°277.0501°
2022-10-08362.2202°318.7812°275.7462°
2022-11-05359.4130°318.7302°274.8811°
2022-12-03358.9404°319.9804°274.8732°
2022-12-31361.0737°322.3195°275.8082°
2023-01-28365.3164°325.3797°277.5327°
2023-02-25370.9814°328.7408°279.7853°
2023-03-25377.4436°331.9819°282.2746°
2023-04-22384.1822°334.7023°284.7182°
2023-05-20390.7453°336.5389°286.8630°
2023-06-17396.6915°337.2103°288.4968°
2023-07-15401.5289°336.6155°289.4656°
2023-08-12404.6796°334.9742°289.6974°
2023-09-09405.5494°332.8902°289.2302°
2023-10-07403.8791°331.1794°288.2449°
2023-11-04400.4010°330.5137°287.1175°
2023-12-02397.0094°331.1750°286.3855°
2023-12-30395.5832°333.0689°286.4851°
2024-01-27396.8025°335.8744°287.5173°
2024-02-24400.3252°339.1809°289.3009°
2024-03-23405.4674°342.5636°291.5382°
2024-04-20411.5777°345.6144°293.9214°
2024-05-18418.1222°347.9523°296.1761°
2024-06-15424.6531°349.2462°298.0761°
2024-07-13430.7475°349.2837°299.4540°
2024-08-10435.9392°348.1015°300.2181°
2024-09-07439.6687°346.1188°300.3699°
2024-10-05441.3069°344.1004°299.9999°
2024-11-02440.4078°342.8539°299.2705°
2024-11-30437.3224°342.8751°298.4520°
2024-12-28433.6591°344.2326°297.9642°
{"start": "2022-01-01", "end": "2024-12-31", "interval": "1w", "bodies": ["jupiter", "saturn"], "perspective": "both", "averages": ["mean_of_5"], "unwrap": true}

POST /v1/finance/planetary-lines · result_sha256 3cf4463614a1eddd640ec73c9603bd85f666e8739a5d87903d115518869cbacd

2. A feature for vectorbt: the heliocentric Jupiter-Saturn angle

20°40°60°80°100°120°within 30° of a square202220232024helio Jupiter-Saturn angle2022-01-01 helio Jupiter-Saturn angle: 24.37°2022-01-08 helio Jupiter-Saturn angle: 24.78°2022-01-15 helio Jupiter-Saturn angle: 25.19°2022-01-22 helio Jupiter-Saturn angle: 25.61°2022-01-29 helio Jupiter-Saturn angle: 26.03°2022-02-05 helio Jupiter-Saturn angle: 26.44°2022-02-12 helio Jupiter-Saturn angle: 26.86°2022-02-19 helio Jupiter-Saturn angle: 27.27°2022-02-26 helio Jupiter-Saturn angle: 27.69°2022-03-05 helio Jupiter-Saturn angle: 28.11°2022-03-12 helio Jupiter-Saturn angle: 28.52°2022-03-19 helio Jupiter-Saturn angle: 28.94°2022-03-26 helio Jupiter-Saturn angle: 29.36°2022-04-02 helio Jupiter-Saturn angle: 29.78°2022-04-09 helio Jupiter-Saturn angle: 30.19°2022-04-16 helio Jupiter-Saturn angle: 30.61°2022-04-23 helio Jupiter-Saturn angle: 31.03°2022-04-30 helio Jupiter-Saturn angle: 31.45°2022-05-07 helio Jupiter-Saturn angle: 31.87°2022-05-14 helio Jupiter-Saturn angle: 32.29°2022-05-21 helio Jupiter-Saturn angle: 32.71°2022-05-28 helio Jupiter-Saturn angle: 33.13°2022-06-04 helio Jupiter-Saturn angle: 33.55°2022-06-11 helio Jupiter-Saturn angle: 33.97°2022-06-18 helio Jupiter-Saturn angle: 34.39°2022-06-25 helio Jupiter-Saturn angle: 34.81°2022-07-02 helio Jupiter-Saturn angle: 35.23°2022-07-09 helio Jupiter-Saturn angle: 35.65°2022-07-16 helio Jupiter-Saturn angle: 36.07°2022-07-23 helio Jupiter-Saturn angle: 36.49°2022-07-30 helio Jupiter-Saturn angle: 36.91°2022-08-06 helio Jupiter-Saturn angle: 37.33°2022-08-13 helio Jupiter-Saturn angle: 37.75°2022-08-20 helio Jupiter-Saturn angle: 38.17°2022-08-27 helio Jupiter-Saturn angle: 38.59°2022-09-03 helio Jupiter-Saturn angle: 39.01°2022-09-10 helio Jupiter-Saturn angle: 39.43°2022-09-17 helio Jupiter-Saturn angle: 39.85°2022-09-24 helio Jupiter-Saturn angle: 40.28°2022-10-01 helio Jupiter-Saturn angle: 40.70°2022-10-08 helio Jupiter-Saturn angle: 41.12°2022-10-15 helio Jupiter-Saturn angle: 41.54°2022-10-22 helio Jupiter-Saturn angle: 41.96°2022-10-29 helio Jupiter-Saturn angle: 42.38°2022-11-05 helio Jupiter-Saturn angle: 42.81°2022-11-12 helio Jupiter-Saturn angle: 43.23°2022-11-19 helio Jupiter-Saturn angle: 43.65°2022-11-26 helio Jupiter-Saturn angle: 44.07°2022-12-03 helio Jupiter-Saturn angle: 44.49°2022-12-10 helio Jupiter-Saturn angle: 44.91°2022-12-17 helio Jupiter-Saturn angle: 45.33°2022-12-24 helio Jupiter-Saturn angle: 45.76°2022-12-31 helio Jupiter-Saturn angle: 46.18°2023-01-07 helio Jupiter-Saturn angle: 46.60°2023-01-14 helio Jupiter-Saturn angle: 47.02°2023-01-21 helio Jupiter-Saturn angle: 47.44°2023-01-28 helio Jupiter-Saturn angle: 47.86°2023-02-04 helio Jupiter-Saturn angle: 48.28°2023-02-11 helio Jupiter-Saturn angle: 48.70°2023-02-18 helio Jupiter-Saturn angle: 49.12°2023-02-25 helio Jupiter-Saturn angle: 49.55°2023-03-04 helio Jupiter-Saturn angle: 49.97°2023-03-11 helio Jupiter-Saturn angle: 50.39°2023-03-18 helio Jupiter-Saturn angle: 50.81°2023-03-25 helio Jupiter-Saturn angle: 51.23°2023-04-01 helio Jupiter-Saturn angle: 51.65°2023-04-08 helio Jupiter-Saturn angle: 52.07°2023-04-15 helio Jupiter-Saturn angle: 52.49°2023-04-22 helio Jupiter-Saturn angle: 52.91°2023-04-29 helio Jupiter-Saturn angle: 53.33°2023-05-06 helio Jupiter-Saturn angle: 53.74°2023-05-13 helio Jupiter-Saturn angle: 54.16°2023-05-20 helio Jupiter-Saturn angle: 54.58°2023-05-27 helio Jupiter-Saturn angle: 55.00°2023-06-03 helio Jupiter-Saturn angle: 55.42°2023-06-10 helio Jupiter-Saturn angle: 55.84°2023-06-17 helio Jupiter-Saturn angle: 56.25°2023-06-24 helio Jupiter-Saturn angle: 56.67°2023-07-01 helio Jupiter-Saturn angle: 57.09°2023-07-08 helio Jupiter-Saturn angle: 57.51°2023-07-15 helio Jupiter-Saturn angle: 57.92°2023-07-22 helio Jupiter-Saturn angle: 58.34°2023-07-29 helio Jupiter-Saturn angle: 58.76°2023-08-05 helio Jupiter-Saturn angle: 59.17°2023-08-12 helio Jupiter-Saturn angle: 59.59°2023-08-19 helio Jupiter-Saturn angle: 60.00°2023-08-26 helio Jupiter-Saturn angle: 60.42°2023-09-02 helio Jupiter-Saturn angle: 60.83°2023-09-09 helio Jupiter-Saturn angle: 61.25°2023-09-16 helio Jupiter-Saturn angle: 61.66°2023-09-23 helio Jupiter-Saturn angle: 62.08°2023-09-30 helio Jupiter-Saturn angle: 62.49°2023-10-07 helio Jupiter-Saturn angle: 62.90°2023-10-14 helio Jupiter-Saturn angle: 63.32°2023-10-21 helio Jupiter-Saturn angle: 63.73°2023-10-28 helio Jupiter-Saturn angle: 64.14°2023-11-04 helio Jupiter-Saturn angle: 64.55°2023-11-11 helio Jupiter-Saturn angle: 64.96°2023-11-18 helio Jupiter-Saturn angle: 65.37°2023-11-25 helio Jupiter-Saturn angle: 65.78°2023-12-02 helio Jupiter-Saturn angle: 66.19°2023-12-09 helio Jupiter-Saturn angle: 66.60°2023-12-16 helio Jupiter-Saturn angle: 67.01°2023-12-23 helio Jupiter-Saturn angle: 67.42°2023-12-30 helio Jupiter-Saturn angle: 67.83°2024-01-06 helio Jupiter-Saturn angle: 68.24°2024-01-13 helio Jupiter-Saturn angle: 68.65°2024-01-20 helio Jupiter-Saturn angle: 69.05°2024-01-27 helio Jupiter-Saturn angle: 69.46°2024-02-03 helio Jupiter-Saturn angle: 69.87°2024-02-10 helio Jupiter-Saturn angle: 70.27°2024-02-17 helio Jupiter-Saturn angle: 70.68°2024-02-24 helio Jupiter-Saturn angle: 71.08°2024-03-02 helio Jupiter-Saturn angle: 71.49°2024-03-09 helio Jupiter-Saturn angle: 71.89°2024-03-16 helio Jupiter-Saturn angle: 72.29°2024-03-23 helio Jupiter-Saturn angle: 72.70°2024-03-30 helio Jupiter-Saturn angle: 73.10°2024-04-06 helio Jupiter-Saturn angle: 73.50°2024-04-13 helio Jupiter-Saturn angle: 73.90°2024-04-20 helio Jupiter-Saturn angle: 74.30°2024-04-27 helio Jupiter-Saturn angle: 74.70°2024-05-04 helio Jupiter-Saturn angle: 75.10°2024-05-11 helio Jupiter-Saturn angle: 75.50°2024-05-18 helio Jupiter-Saturn angle: 75.90°2024-05-25 helio Jupiter-Saturn angle: 76.30°2024-06-01 helio Jupiter-Saturn angle: 76.70°2024-06-08 helio Jupiter-Saturn angle: 77.10°2024-06-15 helio Jupiter-Saturn angle: 77.49°2024-06-22 helio Jupiter-Saturn angle: 77.89°2024-06-29 helio Jupiter-Saturn angle: 78.28°2024-07-06 helio Jupiter-Saturn angle: 78.68°2024-07-13 helio Jupiter-Saturn angle: 79.07°2024-07-20 helio Jupiter-Saturn angle: 79.47°2024-07-27 helio Jupiter-Saturn angle: 79.86°2024-08-03 helio Jupiter-Saturn angle: 80.25°2024-08-10 helio Jupiter-Saturn angle: 80.64°2024-08-17 helio Jupiter-Saturn angle: 81.04°2024-08-24 helio Jupiter-Saturn angle: 81.43°2024-08-31 helio Jupiter-Saturn angle: 81.82°2024-09-07 helio Jupiter-Saturn angle: 82.21°2024-09-14 helio Jupiter-Saturn angle: 82.60°2024-09-21 helio Jupiter-Saturn angle: 82.98°2024-09-28 helio Jupiter-Saturn angle: 83.37°2024-10-05 helio Jupiter-Saturn angle: 83.76°2024-10-12 helio Jupiter-Saturn angle: 84.15°2024-10-19 helio Jupiter-Saturn angle: 84.53°2024-10-26 helio Jupiter-Saturn angle: 84.92°2024-11-02 helio Jupiter-Saturn angle: 85.30°2024-11-09 helio Jupiter-Saturn angle: 85.69°2024-11-16 helio Jupiter-Saturn angle: 86.07°2024-11-23 helio Jupiter-Saturn angle: 86.45°2024-11-30 helio Jupiter-Saturn angle: 86.83°2024-12-07 helio Jupiter-Saturn angle: 87.22°2024-12-14 helio Jupiter-Saturn angle: 87.60°2024-12-21 helio Jupiter-Saturn angle: 87.98°2024-12-28 helio Jupiter-Saturn angle: 88.36°
The same request's heliocentric columns, folded to 0-180°. The shaded band is the example rule's "within 30° of a square" condition; the vectorbt script turns it into entries and exits on your candles.
Table view
UTChelio Jupiter-Saturn angle
2022-01-0124.3657°
2022-01-2926.0255°
2022-02-2627.6899°
2022-03-2629.3585°
2022-04-2331.0308°
2022-05-2132.7065°
2022-06-1834.3850°
2022-07-1636.0661°
2022-08-1337.7491°
2022-09-1039.4336°
2022-10-0841.1191°
2022-11-0542.8052°
2022-12-0344.4914°
2022-12-3146.1771°
2023-01-2847.8619°
2023-02-2549.5453°
2023-03-2551.2268°
2023-04-2252.9059°
2023-05-2054.5820°
2023-06-1756.2548°
2023-07-1557.9238°
2023-08-1259.5884°
2023-09-0961.2483°
2023-10-0762.9029°
2023-11-0464.5519°
2023-12-0266.1948°
2023-12-3067.8312°
2024-01-2769.4607°
2024-02-2471.0829°
2024-03-2372.6974°
2024-04-2074.3040°
2024-05-1875.9022°
2024-06-1577.4919°
2024-07-1379.0726°
2024-08-1080.6441°
2024-09-0782.2062°
2024-10-0583.7586°
2024-11-0285.3011°
2024-11-3086.8336°
2024-12-2888.3558°
from astro_agents import Client
from _candles import load_candles

client = Client()
candles = load_candles("BTC-USD", "2022-01-01", "2024-12-31").set_index("open_time")
lines = client.planetary_lines(start="2022-01-01", end="2024-12-31", bodies=["jupiter", "saturn"],
                               averages=["mean_of_5"], unwrap=True)

# Align the daily line values on the candles (both indexed by UTC day)
close = candles["close"]
feat = lines.reindex(close.index.floor("D"), method="ffill")
feat.index = close.index

# Example feature: the heliocentric Jupiter-Saturn angle, folded to 0-180 degrees
angle = (feat["helio.jupiter"] - feat["helio.saturn"]) % 360
angle = np.minimum(angle, 360 - angle)

# Example rule: long while the angle is within 30 degrees of a square (90), flat otherwise
inside = (angle - 90).abs() < 30
entries = inside & ~inside.shift(1, fill_value=False)
exits = ~inside & inside.shift(1, fill_value=False)

pf = vbt.Portfolio.from_signals(close, entries, exits, fees=0.001, freq="1D")
print(pf.stats()[["Total Return [%]", "Max Drawdown [%]", "Total Trades", "Sharpe Ratio"]])
print("buy & hold:", f"{close.iloc[-1] / close.iloc[0] - 1:+.1%}")
print("line data hashes:", lines.attrs["result_sha256"])

3. Event calendar onto OHLC candles

Eclipses and stations in 2024, to the minute (UTC):

Exact UTCEventPosition
2024-01-02T03:08ZMercury stations direct22°10'52" Sagittarius
2024-01-27T05:50ZUranus stations direct19°05'18" Taurus
2024-03-25T07:13Zlunar eclipse (penumbral)5°07'45" Aries
2024-04-01T22:14ZMercury stations retrograde27°13'07" Aries
2024-04-08T18:17Zsolar eclipse (total)19°23'53" Aries
2024-04-25T12:55ZMercury stations direct15°58'52" Aries
2024-05-02T11:31ZPluto stations retrograde2°06'14" Aquarius
2024-06-29T17:25ZSaturn stations retrograde19°25'41" Pisces
2024-07-02T03:32ZNeptune stations retrograde29°55'55" Pisces
2024-08-05T04:56ZMercury stations retrograde4°06'17" Virgo
2024-08-28T21:15ZMercury stations direct21°24'32" Leo
2024-09-01T12:02ZUranus stations retrograde27°15'24" Taurus
2024-09-18T02:44Zlunar eclipse (partial)25°41'09" Virgo
2024-10-02T18:45Zsolar eclipse (annular)10°03'38" Libra
2024-10-09T06:00ZJupiter stations retrograde21°20'16" Gemini
2024-10-11T22:09ZPluto stations direct29°38'31" Capricorn
2024-11-15T13:52ZSaturn stations direct12°41'33" Pisces
2024-11-26T02:43ZMercury stations retrograde22°40'18" Sagittarius
2024-12-06T23:20ZMars stations retrograde6°10'16" Leo
2024-12-07T20:54ZNeptune stations direct27°07'52" Pisces
2024-12-15T20:57ZMercury stations direct6°23'46" Sagittarius
{"start": "2024-01-01", "end": "2024-12-31", "include": ["eclipse", "station"]}

POST /v1/finance/events · result_sha256 a85fc3159ecd8f06a1ecaf8869a1698c45fd06197fd9aa4fcaa83b230504deb1

from astro_agents import Client, merge_events, verify_dataframe
from _candles import load_candles

client = Client()
candles = load_candles("BTC-USD", "2022-01-01", "2024-12-31")
events = client.events("2022-01-01", "2024-12-31", include=["station", "eclipse", "ingress"])
assert verify_dataframe(events)                       # every result hash recomputed offline

# Each event onto the candle whose day contains it (events are timed to the UTC minute)
day = events["time"].dt.floor("D").astype(candles["open_time"].dtype)
per_day = events.groupby(day)["key"].size()
df = candles.copy()
df["n_events"] = df["open_time"].dt.floor("D").map(per_day).fillna(0).astype(int)
# Or the latest event at or before each candle, in one call:
latest = merge_events(candles, events, on="open_time", tolerance="3D")
df["ret_next"] = df["close"].pct_change().shift(-1)

# Average next-day return on event days vs other days
print(df.groupby(df["n_events"] > 0)["ret_next"].describe())

# Mercury stations: the next 5 days' return after each one
stations = events[(events["type"] == "station") & (events["body"] == "mercury")]
fwd = []
for t in stations["time"]:
    window = candles[candles["open_time"] >= t.floor("D")].head(6)
    if len(window) == 6:
        fwd.append(window["close"].iloc[-1] / window["close"].iloc[0] - 1)
print(f"Mercury stations: {len(fwd)}, mean 5-day return {pd.Series(fwd).mean():+.2%}")

# Keep the provenance with the study: same request, same bytes
print("result hashes:", events.attrs["result_sha256"])

4. backtrader: a planetary line as an extra data line

from astro_agents import Client
from _candles import load_candles

client = Client()
candles = load_candles("BTC-USD", "2022-01-01", "2024-12-31").set_index("open_time")
lines = client.planetary_lines(start="2022-01-01", end="2024-12-31", bodies=["mars"], perspective="geocentric")

df = candles.join(lines[["geo.mars"]].reindex(candles.index.floor("D")).set_axis(candles.index), how="left")
df = df.rename(columns={"geo.mars": "mars"}).ffill()
df.index = df.index.tz_convert(None)          # backtrader wants naive datetimes


class AstroData(bt.feeds.PandasData):
    lines = ("mars",)
    params = (("mars", "mars"),)


class MarsSignChange(bt.Strategy):
    """Example: enter when Mars changes zodiac sign (every 30 degrees), exit 10 bars later."""

    def __init__(self):
        self.entry_bar = None

    def next(self):
        sign_now, sign_before = int(self.data.mars[0] // 30), int(self.data.mars[-1] // 30)
        if not self.position and sign_now != sign_before:
            self.buy()
            self.entry_bar = len(self)
        elif self.position and len(self) - self.entry_bar >= 10:
            self.close()


cerebro = bt.Cerebro()
cerebro.adddata(AstroData(dataname=df))
cerebro.addstrategy(MarsSignChange)
cerebro.broker.setcash(10_000)
cerebro.broker.setcommission(commission=0.001)
cerebro.addsizer(bt.sizers.PercentSizer, percents=95)
cerebro.run()
print(f"final value: {cerebro.broker.getvalue():,.2f} (start 10,000)")
print("line data hashes:", lines.attrs["result_sha256"])

5. Freqtrade: events and lines in populate_indicators

"""Minimal Freqtrade strategy with Astro Agents data as features (a data source, not a signal).

Copy into user_data/strategies/, set ASTRO_CREDITS_TOKEN in the bot's environment, and add
`astro-agents` to the bot's Python environment (pip install astro-agents).

    freqtrade backtesting --strategy AstroDataStrategy --timeframe 1d --timerange 20230101-20241231

The calendar and the lines are fetched once per pair and range, then cached in memory (the same
request always returns the same bytes, so caching on the request is safe). The entry/exit rules
below only show where the columns plug in; replace them with your own.
"""
from functools import lru_cache

import pandas as pd
from freqtrade.strategy import IStrategy
from pandas import DataFrame

from astro_agents import Client

_client = Client()


@lru_cache(maxsize=32)
def _events(start: str, end: str) -> pd.DataFrame:
    return _client.events(start, end, include=["station", "eclipse", "ingress"])


@lru_cache(maxsize=32)
def _lines(start: str, end: str) -> pd.DataFrame:
    return _client.planetary_lines(start=start, end=end, bodies=["jupiter", "saturn"], perspective="heliocentric")


class AstroDataStrategy(IStrategy):
    INTERFACE_VERSION = 3
    timeframe = "1d"
    minimal_roi = {"0": 0.10}
    stoploss = -0.08
    startup_candle_count = 2

    def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        start = dataframe["date"].min().strftime("%Y-%m-%d")
        end = dataframe["date"].max().strftime("%Y-%m-%d")
        day = dataframe["date"].dt.floor("D")

        ev = _events(start, end)
        if not ev.empty:
            per_day = ev.assign(day=ev["time"].dt.floor("D")).groupby("day")["key"].size()
            dataframe["astro_events"] = day.map(per_day).fillna(0).astype(int)
            stations = ev[ev["type"] == "station"].assign(day=lambda d: d["time"].dt.floor("D"))
            dataframe["astro_station"] = day.isin(set(stations["day"])).astype(int)
        else:
            dataframe["astro_events"] = 0
            dataframe["astro_station"] = 0

        lines = _lines(start, end)
        dataframe["helio_jupiter"] = day.map(lines["helio.jupiter"]).ffill()
        dataframe["helio_saturn"] = day.map(lines["helio.saturn"]).ffill()
        return dataframe

    def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        # Placeholder rule (illustration only): enter on a day with no event after a day with a station
        dataframe.loc[(dataframe["astro_station"].shift(1) == 1) & (dataframe["astro_events"] == 0),
                      "enter_long"] = 1
        return dataframe

    def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        dataframe.loc[dataframe["astro_station"] == 1, "exit_long"] = 1
        return dataframe

6. Quickstart notebook

quickstart.ipynb: positions, lines, events, merge and verification.

Show the notebook's cells
from astro_agents import Client, verify_dataframe
client = Client()          # reads ASTRO_CREDITS_TOKEN
client

Credit packs (free call)

client.packs()[["name", "price_usd", "credits", "bonus_pct", "value"]]

Positions: geocentric vs heliocentric, with declination ($0.01 each)

geo = client.positions("2024-03-01T00:00Z", coordinates="equatorial")
geo[["sign", "position", "longitude", "declination", "out_of_bounds", "retrograde"]]
helio = client.positions("2024-03-01T00:00Z", perspective="heliocentric")
helio[["sign", "position", "longitude"]]

Gann planetary lines as a time series ($0.20 per call, up to 1000 samples each)

lines = client.planetary_lines(start="2024-01-01", end="2024-12-31", bodies=["jupiter", "saturn"],
                               averages=["mean_of_5"], unwrap=True)
lines.filter(like="jupiter").plot(figsize=(10, 4), title="Jupiter, geocentric vs heliocentric (unwrapped)");

Event calendar: eclipses and stations ($0.25 per year of events)

events = client.events("2024-01-01", "2024-12-31", include=["eclipse", "station"])
events[["time", "type", "body", "kind", "eclipse_type", "turns", "position"]]

Merge onto candles

import pandas as pd
from astro_agents import merge_events
candles = pd.DataFrame({"open_time": pd.date_range("2024-01-01", "2024-12-31", freq="D", tz="UTC")})
merged = merge_events(candles, events, on="open_time", tolerance="1D")
merged.dropna(subset=["type"]).head()

Verify: same request, same bytes

print(verify_dataframe(lines), verify_dataframe(events))      # offline recomputation of result_sha256
lines.attrs["result_sha256"], events.attrs["meta"]["input_sha256"] if isinstance(events.attrs["meta"], dict) else None

7. TradingView: Celestial Events & Planetary Lines (free)

An open-source Pine Script v5 indicator: Gann planetary lines (geo + helio, any step from 30° to 360°, projected forward), plus ingresses, stations and eclipses marked on the chart from an exact DE440 table (1990-2040). Pine source · README and accuracy report.

Every example uses data for your own analysis. Nothing here is a trading signal, a forecast or advice.