Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

RWA Closed-Window Basis Strategy

Bitget RWA stock-futures research and local paper-trading stack.

The current production candidate is a long-only, 5-minute closed-window negative-basis repair strategy for memory and optical RWA contracts. It is designed for local forward paper trading only; it does not place exchange orders.

Current Strategy

  • Name: closed_window_basis_5m_15x_m20_cap100_histbest_v4
  • Universe: DRAMUSDT, MUUSDT, NBISUSDT, SNDKUSDT, WDCUSDT, COHRUSDT, LITEUSDT
  • Direction: long only
  • Anchor: latest Yahoo spot bar carried forward during US-market closed windows
  • Timeframe: Bitget 5m futures candles
  • Fees: 0.1% per side
  • Leverage: 15x
  • Base sizing: 20% margin per signal, 100% portfolio cap

Entry filters:

  • US-market closed session
  • basis_pct between -8.0% and -1.5%
  • basis_z_288 <= -2.0
  • 5m futures return between -1.2% and 0.2%
  • 15m equivalent futures return >= -2.5%
  • basis_delta_1 >= -0.6%
  • reclaim between 35% and 75%
  • 5m quote volume >= 16,666.67 USDT

Exit and risk:

  • Exit on basis_pct >= 0
  • Exit at US regular open
  • Stop if futures price return from entry <= -1.0%
  • Max hold: 288 five-minute bars
  • Stop opening new positions after CST daily mark return reaches 15%; existing positions are not force-closed
  • If a single position reaches >= 50% margin-level floating profit, close it after a 12% giveback from its high-water mark
  • If trend_not_broken=false, keep the signal but reduce new position margin to 10%

The Cboe delivery-point snapshot is retained as an online reference factor, but it is not used as a hard entry gate in v4.

Repository Layout

  • scripts/closed_window_5m_paper_live.py - live local paper-trading engine
  • scripts/render_paper_live_status.py - HTML/JSON status renderer
  • scripts/run_closed_window_5m_paper_live.sh - locked cron runner
  • scripts/cboe_delivery_point_snapshot.py - delayed Cboe option-chain reference snapshot
  • config/selected_closed_window_strategy.json - selected strategy metadata and legacy 15m compatibility fields
  • config/multi_asset_15m_targets.json - RWA symbol to spot-anchor map
  • analysis/**/*.md - research notes and backtest reports
  • tests/ - unit tests for core operators and generated-output contracts

Generated snapshots, large CSV/JSON research tables, local paper account state, browser profiles, logs, and secrets are intentionally ignored by git.

Run

Create local credentials only if you need authenticated demo-read checks:

cp .env.example .env

Run one 5m paper cycle:

python3 scripts/closed_window_5m_paper_live.py --lookback-days 5
python3 scripts/render_paper_live_status.py

Run the locked production loop once:

scripts/run_closed_window_5m_paper_live.sh

Cron example:

*/5 * * * * cd /path/to/rwa-nbis-history && nice -n 10 ionice -c2 -n7 ./scripts/run_closed_window_5m_paper_live.sh

Serve the generated dashboard:

cd paper_trading
python3 -m http.server 8765 --bind 0.0.0.0

Test

python3 -m unittest discover -s tests
python3 -m py_compile scripts/closed_window_5m_paper_live.py scripts/render_paper_live_status.py

Some tests validate optional generated research outputs and will skip when those local artifacts are absent.

Research Trail

Key reports:

  • analysis/stop_work_exit/stop_work_exit_report_test15.md
  • analysis/stop_work_exit/stop_work_exit_report_test21.md
  • analysis/stop_work_exit/stop_work_exit_report_test30.md
  • analysis/take_profit_exit/take_profit_exit_report.md
  • analysis/timeframe_compare_5m_15m/timeframe_compare_report.md
  • analysis/classic_indicator_diagnostics/classic_indicator_diagnostics_report.md
  • analysis/historical_param_search_no_option/historical_param_search_no_option_report.md

Safety

This repository is research and paper trading infrastructure, not financial advice. Real order execution requires a separate review, demo-order lifecycle validation, kill-switches, and exchange-side permission isolation.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages