Skip to content

Add SOXX dynamic volatility threshold indicators#89

Merged
Pigbibi merged 1 commit into
mainfrom
codex/soxl-dynamic-vol-live
Jun 9, 2026
Merged

Add SOXX dynamic volatility threshold indicators#89
Pigbibi merged 1 commit into
mainfrom
codex/soxl-dynamic-vol-live

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add rolling-percentile SOXX realized-volatility threshold fields for SOXL/SOXX runtime inputs
  • expose default 10d p95 threshold with 252d lookback, 126 min samples, and 50%-75% bounds
  • thread the dynamic volatility lookback options through IBKR and LongBridge indicator builders

Tests

  • PYTHONPATH=src python -m pytest tests/test_ibkr_runtime_inputs.py -q
  • python -m py_compile src/quant_platform_kit/common/runtime_inputs.py src/quant_platform_kit/ibkr/runtime_inputs.py src/quant_platform_kit/longbridge/market_data.py

Note: tests/test_longbridge_market_data.py could not run locally because this VPS Python environment does not have pandas installed.

@Pigbibi Pigbibi force-pushed the codex/soxl-dynamic-vol-live branch from 40e4d82 to f8b3cc1 Compare June 9, 2026 06:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 40e4d8224f

ℹ️ 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".

Comment on lines +281 to +282
soxx_dynamic_volatility_threshold = _bounded_threshold(
volatility_threshold_history[-1],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use the prior volatility threshold

When the threshold is evaluated against today's realized_volatility_10, taking volatility_threshold_history[-1] includes that same current volatility sample in the 95th-percentile threshold. This introduces look-ahead/self-inclusion for any strategy comparing the current realized volatility to this dynamic threshold, unlike the RSI threshold just above which uses the previous value; a high-volatility close can raise the threshold used for that same close and change the delever signal. Use the previous threshold sample for the current decision path.

Useful? React with 👍 / 👎.

@Pigbibi Pigbibi merged commit 023641c into main Jun 9, 2026
1 check passed
@Pigbibi Pigbibi deleted the codex/soxl-dynamic-vol-live branch June 9, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant