Add TQQQ dynamic volatility threshold research#78
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee953c2f04
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| PROFILE = "tqqq_growth_income" | ||
| MANAGED_SYMBOLS = ("TQQQ", "QQQ", "BOXX", "SCHD", "DGRO", "SGOV", "SPYI", "QQQI") | ||
| MANAGED_SYMBOLS = ("TQQQ", "QQQM", "BOXX", "SCHD", "DGRO", "SGOV", "SPYI", "QQQI") |
There was a problem hiding this comment.
Preserve tracking for QQQ targets
When any caller still routes the unlevered sleeve to QQQ (the existing overlay research variants in scripts/research_levered_overlay_guards.py still do this, and run_backtest still requires QQQ history), removing QQQ from MANAGED_SYMBOLS makes _execute_rebalance buy a target symbol that is not carried into next_weights or weights_history. The purchased QQQ value is counted in new_equity for that rebalance, then dropped from current_weights on the next loop, which corrupts returns/trades for those scenarios; either keep QQQ managed or translate/force all QQQ targets to QQQM before execution.
Useful? React with 👍 / 👎.
Summary
Tests
from pathlib import Path
from tempfile import TemporaryDirectory
from tests import test_tqqq_growth_income_archive as t
t.test_tqqq_growth_income_run_backtest_produces_summary()
t.test_tqqq_growth_income_run_backtest_can_open_income_layer()
with TemporaryDirectory() as d:
t.test_tqqq_growth_income_archive_writes_replayable_outputs(Path(d))
with TemporaryDirectory() as d:
t.test_tqqq_growth_income_archive_supports_full_income_mode(Path(d))
print('archive tests OK')
PY
Research output