Autonomous ETF paper trading agent.
- Python 3.13+
- Free Alpaca paper trading account (no deposit required)
- Google Cloud project with Secret Manager API enabled
gcloudCLI authenticated:gcloud auth application-default login
git clone <repo-url> alphoryn
cd alphoryn
pip install -e ".[dev]"Verify:
alphoryn --helpecho -n "YOUR_ALPACA_API_KEY" | gcloud secrets create alpaca-api-key --data-file=-
echo -n "YOUR_ALPACA_SECRET_KEY" | gcloud secrets create alpaca-api-secret --data-file=-cp config.json.example config.jsonMinimum required fields:
{
"etf1": "SPY",
"etf2": "QQQ"
}See specs/001-etf-paper-trading-agent/contracts/config-schema.md for all fields and defaults.
# Use config.json in the current directory
alphoryn run
# Override fields at the command line
alphoryn run --etf1 SPY --etf2 QQQ --duration 8H --stop-loss 0.02
# Point to a different config file
alphoryn run --config /path/to/my-config.jsonThe agent will:
- Fetch Alpaca credentials from Google Secret Manager
- Load open positions from the local memory bank (
~/.alphoryn/memory.db) - Wait for the next candle close, then begin the investigate → decide → execute loop
# From a second terminal while a run is active
alphoryn status
# View session history
alphoryn history
alphoryn history --run 1