Mare Nostrum

Two clocks with an arrow from the close to the open

Close Loop and Open Check: Two Daily Tasks

Not financial advice. This is a research and paper-trading project. Any numbers here are examples from past data, not promises, and the rules come with no guarantee. Paper trade first and decide for yourself. Part 2 of the series. The whole daily routine is two scheduled tasks, and on most days the second one says a single line.

Not financial advice. This is a research and paper-trading project. Any numbers here are examples from past data, not promises, and the rules come with no guarantee. Paper trade first and decide for yourself.

Part 2 of the series. The whole daily routine is two scheduled tasks, and on most days the second one says a single line.

Close Loop: after the US close

The Close Loop runs on weekdays in the evening, New York time, once the day’s bars are final. It does everything that needs data:

  • reads the paper account (read only),
  • fetches daily bars and keeps a local cache, so most days it only adds one new bar per ETF,
  • computes the signals for the next open, and the monthly list for the second stock book,
  • marks any open option spreads, if you use them,
  • refreshes the Desk dashboard datasets,
  • on Mondays, adds a short weekly digest,
  • writes a small result file for the morning task.

Each book has a STATUS line at the top of the prompt, so you can switch any of them to DISABLED without touching the rest.

Open Check: before the open

The Open Check runs on weekdays before the US open. It is short on purpose. It does not fetch bars. It reads the Close Loop result and gets live quotes only for whatever is due today.

Its first line says whether the evening task is trustworthy. It is one of “Close Loop ok”, “missing”, “failed” or “old”. If it is not ok, the Open Check uses no old numbers and tells me to run the Close Loop again. On a day with nothing due, the whole report is one line: nothing due today.

When something is due, it prints each item with a live quote next to the signal close, and flags a gap, such as a price already below the planned stop. Quotes before 09:30 New York are called pre-market and are never treated as the open.

Why two tasks

Splitting the work keeps the morning cheap and the evening complete. A smaller model is enough for both, and the output is a push notification only. The split also gives a clean failure mode: if the evening task did not run, the morning says so instead of guessing.

After a signal

I place any order by hand, then send Claude a fill line. A skill logs it in the journal and checks it against the rules. That is the only way rows reach the journal.

Next: the two stock books.