Skip to content
SlashClone
Stack by @qtrader

Trading desk

Size positions, keep a journal that teaches you something, backtest honestly, explain your returns, and talk to Alpaca (paper trading by default). Not financial advice.

Setup order

  1. @qtrader/position-sizer

    Work out how many shares to buy before you click. Fixed-fractional, ATR (volatility) based, and capped fractional-Kelly sizing, plus a portfolio heat check that totals the risk across open positions and tells you if a new trade fits. Not financial advice.

    Resolves to 1.0.0 (range ^1.0.0)

  2. @qtrader/trade-journal

    Keep a trading journal that actually teaches you something. Log each trade with its setup, thesis, emotions, plan adherence, and mistakes in a CSV, then get a weekly review that finds what is working and what is leaking money by setup, time of day, holding period, emotion, and plan adherence. Not financial advice.

    Resolves to 1.0.0 (range ^1.0.0)

  3. @qtrader/backtest-runner

    Backtest a trading idea on an OHLCV CSV with honest assumptions: next-bar fills, slippage, commission, no look-ahead. Built-in SMA crossover, RSI mean reversion, and buy-and-hold, plus a one-file plug-in format for your own strategies. Writes equity curve and trades CSVs and metrics (CAGR, volatility, Sharpe, Sortino, max drawdown, win rate, exposure). Not financial advice.

    Resolves to 1.0.0 (range ^1.0.0)

  4. @qtrader/attribution-analysis

    Explain why a portfolio beat or lagged its benchmark. Brinson-Fachler allocation, selection, and interaction effects by sector and period, Carino-linked across periods so they add up exactly, plus a plain-English summary. Works offline from a CSV. Not financial advice.

    Resolves to 1.0.0 (range ^1.0.0)

  5. @qtrader/alpaca-connector

    Talk to Alpaca from Claude Code: account, positions, orders (list, place, cancel), latest quote, and historical bars to CSV, using Node's built-in fetch. Paper trading by default. Live orders need ALPACA_LIVE=1 plus your yes in chat for each order. Not financial advice.

    Resolves to 1.0.0 (range ^1.0.0)

Environment variables

  • ALPACA_API_KEY_ID

    Your Alpaca API key ID. Start with a paper trading key.

    Used by @qtrader/alpaca-connector

  • ALPACA_API_SECRET_KEY

    The secret that goes with that key.

    Used by @qtrader/alpaca-connector

  • ALPACA_LIVE

    Leave unset for paper trading. Set to 1 only to allow live orders, each still needing your yes.

    Used by @qtrader/alpaca-connector

Names only. Values stay on your machine.