Algo-Trading Bot

Vibe Coding an Algo-Trading Bot

This project is an ongoing experiment at the intersection of two things I want to get sharper at: AI-assisted software development and quantitative trading.

The premise is simple — rather than hand-writing every line, I build and iterate on the bot by directing an AI coding assistant in plain language: describing the behavior I want, reviewing the code it produces, correcting course, and learning the underlying concepts as I go. “Vibe coding,” but with guardrails: I read every diff, keep secrets out of the repo, and validate against a sandbox before anything touches real markets.

Why paper trading first

The bot runs against Alpaca’s paper-trading API — a full simulated brokerage with a fake balance and live market data, but zero real money at risk. It’s the right way to learn: I can let strategies run, break things, and measure results without a dollar on the line. API keys authenticate the bot instead of a password, and credentials live in a git-ignored .env file — never in the repository.

The stack

A first milestone — connecting to the account

The first checkpoint was a read-only connection: authenticate, pull the (simulated) account, and confirm buying power before writing a single line of order logic.

from alpaca.trading.client import TradingClient

# Paper-trading account — no real funds at risk
client = TradingClient(API_KEY, SECRET_KEY, paper=True)

account = client.get_account()
print(f"Status:        {account.status}")
print(f"Buying power:  ${account.buying_power}")

What I’m learning

This page will grow as the experiment does — from a read-only connection, to simple strategies, to backtesting and measured results.