Skip to main content

Quick Overview

This video is a technical build-along and tutorial hosted by Nate Herk. Following up on an earlier trading challenge with Claude, Herk demonstrates how to configure GPT-6 Astra inside Codex to act as an autonomous, scheduled stock trading assistant connected to Alpaca.

Key Points

  • 1.Nate Herk sets up GPT-6 Astra inside Codex to manage a seven-day, ten-thousand-dollar stock trading challenge.
  • 2.The automated strategy divides each trading day into six scheduled routines ranging from morning news review to afternoon liquidation.
  • 3.System continuity relies on persistent shared files, including a progress log and journal, rather than model memory between runs.
  • 4.Alpaca is integrated as the brokerage execution layer using API keys stored securely in a local environment file.
  • 5.All automated routine tasks run within a single thread in Codex to preserve execution context and support auto-compaction.
  • 6.Real-time notifications and status reports are configured to deliver directly to ClickUp throughout the trading day.

Summary

Nate Herk outlines a new trading experiment following a previous monthly test where Claude traded 10,000 dollars of real money and beat the S&P 500 by over 8 percent. For this new challenge, Herk deploys GPT-6 Astra to trade a 10,000 dollar portfolio over seven trading days. Before executing live trades, he walks through the entire architecture to show viewers how to configure Codex, link brokerage APIs, and schedule autonomous agent routines.

The trading strategy operates around three core constraints: a 10,000 dollar starting balance, seven trading days, and six daily execution checkpoints. Astra structures a day-trading routine comprising a 7:45 AM news and watchlist scan, a 9:30 AM initial trade entry search, an 11:00 AM position review, a 1:00 PM risk management check, a 2:15 PM position closure window, and a 2:45 PM daily recap and verification. Herk explains that traders can choose between outsourcing strategy generation entirely to AI agents or using agents to automate existing personal workflows.

A central technical hurdle in scheduled agent execution is statelessness. Because an agent does not inherently remember previous invocations, Herk establishes continuity through shared persistent files on disk. Every wakeup routine begins by reading the strategy file and previous handoff notes, inspecting current Alpaca account status, performing the designated task, logging progress in a persistent journal, and outputting explicit instructions for the next run. This architecture prevents duplicated orders and guarantees recovery if a run fails or crashes.

To execute trades, the setup integrates with Alpaca. Herk generates API keys in his live Alpaca account and stores them in a local .env configuration file within a isolated folder structure inside his Herk-2 workspace. This separation prevents extraneous system context from bloating the trading bot prompt window. He verifies that Codex can access live buying power, check equity levels, and verify live endpoints. He also mentions the 99-dollar monthly Algo Trader Plus plan for enhanced live market data and points out various Codex market plugins.

Finally, Herk automates the six routines as local scheduled tasks in Codex, routing all tasks into a single persistent conversation thread named Challenge Thread to maximize context retention. He adds two notification routines that push mid-day and post-market summaries directly into a ClickUp channel. He concludes by demonstrating mobile synchronization via the ChatGPT mobile application remote interface, allowing full real-time oversight of the agent workspace from a phone.

Trading Challenge Parameters and Strategy Design

Nate Herk introduces a live trading challenge using GPT-6 Astra backed by 10,000 dollars across seven trading days. To establish the system rules, Astra generated a structured day-trading workflow with six fixed checkpoints per day: an early morning news and account scan, morning entry screening, midday position review, afternoon management, pre-close liquidation, and end-of-day reconciliation.

Solving Continuity Across Stateless Wakeups

Because automated agent invocations are stateless, continuity between scheduled runs cannot rely on conversational memory. The system addresses this by requiring every run to read and update shared persistent files on disk, such as a state journal and progress log. This structure ensures each scheduled wakeup receives complete handoff instructions from the prior run and prevents duplicate trade execution if an interruption occurs.

Brokerage Connection and Project Isolation

The trading workflow connects directly to Alpaca using API credentials stored in a dedicated local environment configuration file. Nate isolates the trading project within a separate directory to restrict the agent's context strictly to market data and account information. He also highlights Alpaca's market data subscription tier and the availability of market analysis plugins within Codex.

Automating Routines and External Notifications

The six daily routines are scheduled locally on the device using Codex, with each job targeted to run within a unified conversation thread named Challenge Thread. Two daily updates are also scheduled to notify a private internal automation channel in ClickUp. Finally, Herk demonstrates how the entire setup can be monitored and managed from a mobile device using remote synchronization.

The Bottom Line

The video establishes a complete framework for deploying GPT-6 Astra as an autonomous day-trading agent using Codex, Alpaca, and file-based state continuity. It demonstrates how to automate scheduled routines, verify broker connectivity, and deliver real-time progress reports to external platforms like ClickUp. It leaves the actual financial performance and trade outcomes of the seven-day live challenge to be revealed in a subsequent follow-up video.

FAQ

What is GPT-6 Astra and how is it used in automated stock trading?

GPT-6 Astra is an advanced language model used inside Codex as an autonomous agent to analyze market news, select stocks, execute trades, and manage portfolio risk on a fixed daily schedule.

How does the system maintain state continuity between scheduled GPT-6 Astra agent wakeups?

The system maintains continuity by having each agent run read from and write to shared persistent files, such as a state journal and progress log, rather than relying on model memory across executions.

Which brokerage platform does Nate Herk connect to Codex for stock execution?

Nate Herk connects Codex to Alpaca by pasting the live API key and secret key into a local .env file within the project directory.

Why are all six scheduled daily trading tasks routed into a single conversation thread?

Routing all tasks into a single Challenge Thread preserves full conversational history, leverages auto-compaction, and keeps all agent activity unified in one place.

How are trade notifications and end-of-day performance summaries delivered to the user?

Scheduled tasks are configured to automatically dispatch status reports and direct messages into an internal automations channel in ClickUp at midday and after market close.

Worth watching for

Developers, algorithmic traders, and AI enthusiasts interested in building scheduled, multi-step agentic workflows and automated trading bots using LLMs.

  • gpt-6-astra
  • codex
  • alpaca
  • stock-trading
  • ai-agents
  • automation