Skip to content

Trading knowledge

Strategies and markets

Hypotheses, not recommendations. Every strategy ships with entry, exit, stop, sizing, session and missing-data rules, and no result is accepted from in-sample data alone.

Hypotheses, not recommendations. Every strategy ships with entry, exit, stop, sizing, session and missing-data rules, and no result is accepted from in-sample data alone.

Strategy families#

FamilyIdeaNeedsMain risk
Trend and momentumMoving-average crossover, channel breakout, ADX filterWarm-up, volatility-scaled stopsWhipsaws in ranges, late entries
Mean reversionZ-score, RSI, Bollinger, distance to VWAPStationarity check, hard stopTrends that never revert
IntradayOpening-range breakout, VWAP reclaim, gap and goReliable intraday data, session calendar, liquidity filterCosts and slippage dominate small edges
Grid and DCALadder of orders around a range, scheduled accumulationInventory caps, range exitUnlimited inventory in a trend
Market makingQuote both sides, skew by inventoryOrder-book data, low latencyAdverse selection; not viable without book data
Pairs and spreadCointegrated pairsStationarity tests, borrow costsRegime breaks

Already implemented: SMA crossover, Z-score reversion and breakout. Next candidates: opening-range breakout, VWAP reversion, ADX-filtered trend, grid and DCA (spot, capped inventory). Market making stays out of scope until order-book data and a validated fill model exist.

Strategy contract#

  • Pure function of candles and parameters; deterministic; no wall-clock access.
  • Parameters declared as data (name, type, range, step, default), versioned and immutable once used.
  • Emits an intent with a stop distance; the risk engine sizes it.
  • Declares warm-up bars and required timeframe.

Markets#

MarketCalendar and currencyDataExecutionNotes
B3 (equities, mini-index, mini-dollar)B3 calendar, BRL, early close and holidays, session grid changesLicensed intraday CSV, broker feedsInternal replay onlyCosts include brokerage, exchange fees and taxes; tax treatment is out of scope
US equities and ETFsExchange clock, USD, extended hoursAlpaca IEX (not consolidated), paid SIPAlpaca PaperHalts, pattern day trading rules apply to live margin accounts
Crypto24/7, quote currency per pairPublic exchange candlesTestnet or simulatorPrecision and lot rules per pair; exchange-specific outages
Forex24/5, pairs, swapsBroker or aggregator feedsSimulatorNo central tape; spreads vary; leverage defaults must stay off

Keep currencies and ledgers segregated; never sum BRL and USD without an explicit FX policy. Keep market, venue, currency and calendar separate from the symbol.

Data sources#

Prefer sources with clear terms. Public endpoints used by hobby terminals are often personal-use only; record each source's terms in ../fontes.md before relying on it. Provider interfaces (openbb.md) keep paid feeds replaceable. A coverage matrix per market (live, delayed, end of day, none) belongs in the UI (openstock.md).