Skip to content
prosperlpxPublic

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

Trade Lab

A Python market-monitoring and Telegram alerting system for a VWAP pullback strategy. Live monitoring and the maintained historical backtests share one strategy implementation. Trade Lab does not place orders, observe broker fills, or reconcile account positions.

Current capabilities

  • New York timezone-aware session handling and completed-bar filtering.
  • Shared VWAP, true-range, ATR, and first-signal logic for live monitoring and historical backtests.
  • Explicit OHLC stop/target simulation with conservative collision handling and separate open-position marks.
  • Risk-based sizing using shared configuration.
  • Telegram alerting with validated, checkpointed state persistence.
  • Pytest, Ruff, and documentation verification in GitHub Actions.

Important limitations

  • Backtest signal parity does not establish fill parity with a broker.
  • Spread, commission, financing, market impact, and ordinary slippage are not modeled.
  • QQQ/NQ conversion and CFD lot assumptions are not broker-validated.
  • Historical data coverage and quality depend on Yahoo Finance; input snapshots are not committed.
  • A backtest is not evidence of profitability. Do not rely on results from the old duplicated calculations as if they were generated by the current shared strategy.

Quick start

Requires Python 3.10 or newer.

git clone https://github.com/Emiloart/trade_lab.git
cd trade_lab
python -m venv .venv

Activate the environment:

# macOS / Linux
source .venv/bin/activate

# Windows PowerShell
.venv\Scripts\Activate.ps1

Install:

python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

Configuration

Live and backtest commands use the same StrategyConfig.from_env() settings. See Configuration for supported environment variables and defaults. Never commit Telegram credentials or runtime state.

Run the monitor

python -m trade_lab.live --dry-run

Backtesting

Download the 5-minute input and run either the full-history or recent-period simulation:

python strategies/data_downloader.py
python backtests/vwap_backtest.py
python backtests/recent_backtest.py

Both scripts call the shared strategy implementation. See Backtesting for fill assumptions, output fields, and interpretation limits.

Tests and lint

python -m pytest -q
ruff check trade_lab backtests/_common.py backtests/vwap_backtest.py backtests/recent_backtest.py tests
python scripts/verify_docs.py

Documentation

See docs/README.md for architecture, strategy, configuration, operations, risk, backtesting, decisions, testing, and troubleshooting references.

Attribution

Created by: prosperlpx — original concept, VWAP pullback setup, repo founder. Maintained by: Emiloart — core engine, research pipeline, operations

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages