QQQ Options Research
From contract forecasts to cash-constrained trading simulations.
Overview
An independent research project exploring whether machine learning can identify useful QQQ option opportunities. I built the workflow around historical data qualification, chronological model comparisons, and an account simulator that tracks execution, fees, cash, and settlement.
RIDGE produced the highest combined simulated profit: $2,389 across three separate $10,000 accounts. Two periods lost money, and the predeclared forecast-selection rule chose CASH. The result is a completed research record with explicit limits on what the evidence supports.
Research context and goals
Context
The project began with a broader investigation of financial prediction, including stock forecasts, public insider disclosures, and company screening. The final QQQ study brought the central question into focus: could a model identify attractive option opportunities under a consistent historical trading protocol?
I developed the Python research workflow, compared models with scikit-learn and PyTorch, and connected their forecasts to a separate account engine. That separation made it possible to inspect both predictive behavior and the consequences of turning predictions into trades.
Forecast accuracy and trading constraints
The Problem
Options introduce decisions about contracts, timing, available capital, and execution. Several contracts can look attractive at the same moment, but an account cannot spend the same cash twice. Proceeds also pass through settlement before they become available again.
Evaluation must also account for leakage and unstable outcomes. Future information can leak into features or training labels, and a profitable total can conceal unstable periods. I designed the experiment to preserve those distinctions instead of reducing the entire project to one return figure.
Input features and prediction targets
Data & targets
The prediction target is an option opportunity’s net cash outcome divided by its initial debit. It measures the contract-level outcome relevant to the experiment. Retained feature rows, source identities, and original outcome records connect each forecast to the opportunity it describes.
Features must be available at least one second before the decision. Original missing-value masks are restored, and preprocessing is learned within each fitting partition. If a required feature is unavailable, the entire contemporaneous choice clock is blocked, avoiding selective removal of individual alternatives.
Contract-opportunity pipeline
- 01Contract opportunity
Build features available before the decision.
- 02Forecast
Estimate net cash outcome divided by initial debit.
- 03Nominate
Choose a unique highest positive forecast.
- 04Simulate
Apply execution, capital, fees, and settlement rules.
Chronological fitting, calibration, and evaluation
Evaluation design
Three chronological folds evaluate successive historical periods. Each fold fits a model on earlier data, reserves a separate calibration partition, and resets the simulated account to $10,000 before evaluation.
The last 20% of prior sessions, rounded up, are reserved for calibration. Fitting labels must mature before calibration begins, and calibration labels must mature before the next evaluation decision. Calibration rows are excluded from refitting. Empirical residual intervals describe observed coverage; they do not guarantee future uncertainty bounds.
Chronological evaluation partitions
Fit → reserve final 20% of prior sessions for calibration
New $10,000 simulated account
Fit → reserve final 20% of prior sessions for calibration
New $10,000 simulated account
Fit → reserve final 20% of prior sessions for calibration
New $10,000 simulated account
Calibration rows are not refitted. This is examined historical data, not a new untouched holdout.
Candidate models and controls
Model comparison
The final campaign fixes the candidate architectures and hyperparameters before comparison. Three candidates across three folds produce nine fits. Adding zero, earlier-mean, and retained frozen-model controls produces eighteen funded account comparisons.
Regularized linear regression
RIDGE uses a weighted linear relationship with an L2 penalty, providing a controlled baseline with limited flexibility.
Shallow boosted trees
Histogram gradient boosting captures nonlinear interactions with 100 iterations, depth three, and at most seven leaves per tree.
Two-part neural model
A 16-unit hidden layer estimates positive-outcome probability and conditional gain/loss magnitudes. Its expected outcome combines all three: p × gain − (1 − p) × loss.
Ridge
Regularized weighted regression
features → weighted sumShallow trees
Histogram gradient boosting
features → depth-3 treesTwo-part network
Probability, gain, and loss heads
p × gain − (1 − p) × lossTwo-part neural network
Numeric inputs with the original missing-value treatment
p = sigmoid(z)Positive-outcome probabilityg = softplus(z)Conditional gainl = softplus(z)Conditional loss magnitudep × g − (1 − p) × lExpected opportunity outcomeForecast net cash outcome relative to the initial debit
The slider demonstrates the output calculation with illustrative values. It does not run the trained model or predict a real contract.
Account simulation and settlement
Account simulation
At each decision clock, the account nominates the uniquely highest positive forecast. Ties and nonpositive forecasts produce no nomination. A separate engine then applies position restrictions, available cash, execution windows, modeled fees, exits, and settlement constraints.
The simulator records nominations, rejected decisions, trade paths, and cash journals. All eighteen final ledgers end in settled cash with no open contracts or pending obligations. These records make account outcomes inspectable while retaining the historical execution assumptions behind them.
Account simulation stages
- 01Available cash
Check buying power and nomination restrictions.
- 02Reserve & execute
Apply the modeled entry window and fees.
- 03Hold & exit
Follow original position and exit rules.
- 04Settle
Release settled proceeds back to available cash.
A rejected nomination does not become a trade. Simulated execution is not a verified historical fill.
Example: contract nomination at a decision point
+8% forecast outcome
+3% forecast outcome
-2% forecast outcome
A has the unique highest positive forecast. The account engine still checks cash, execution, and position constraints.
Illustrative forecasts. A nominated contract is not an executed or profitable trade.
Simulated profit and loss by evaluation fold
Results
RIDGE earned $3,909 in Fold 1, lost $1,097 in Fold 2, and lost $423 in Fold 3, across 55 closed trades. Its $2,389 total adds dollars from three independently funded accounts. It is neither a continuous-account return nor a compounded return.
The shallow tree totaled −$1,350 and the neural model −$2,633. Returns were concentrated: removing RIDGE’s three largest winning trades in Fold 1 changes that period’s profit to a $543 loss. This retrospective diagnostic exposes dependence on a few outcomes; it is not an executable trading filter.
Account value after each closed trade
Account paths
The closing total hides the path an account took to get there. These curves reconstruct account value from the saved net outcomes of closed trades, with each model and evaluation fold beginning at $10,000.
Switch between folds to see the changes in direction and the number of trades behind each result. The horizontal axis counts each model’s own closed trades; it does not align the models by clock time or show losses inside an open position.
Account paths
Equity after each closed trade
- Ridge
- Shallow tree
- Two-part network
Each fold uses separate $10,000 accounts. Curves share the same scale and stop at each model’s final trade. Trade number is not shared calendar time; equity is recorded at trade close, not marked continuously to market. The predeclared rule selected CASH.
View selected fold’s equity values
| Trade | Ridge | Shallow tree | Two-part network |
|---|---|---|---|
| Starting cash | $10,000 | $10,000 | $10,000 |
| 1 | $9,740 | $9,703 | $9,703 |
| 2 | $9,875 | $9,539 | $9,635 |
| 3 | $9,854 | $9,845 | $9,990 |
| 4 | $12,112 | $10,344 | $10,619 |
| 5 | $13,018 | $10,649 | $10,656 |
| 6 | $12,866 | $11,396 | $11,695 |
| 7 | $13,364 | — | $11,786 |
| 8 | $13,198 | — | $11,634 |
| 9 | $12,654 | — | $12,132 |
| 10 | $13,942 | — | $11,966 |
| 11 | $13,909 | — | $11,422 |
| 12 | — | — | $12,710 |
| 13 | — | — | $12,677 |
Drawdown and dependence on large wins
Risk & concentration
Drawdown measures the largest decline from an earlier account high. The saved closed-trade records also let us inspect how much of each total depends on the largest winning trades.
For RIDGE, removing the three largest wins in Fold 1 changes +$3,909 into −$543. This sensitivity calculation helps explain the positive total, but does not simulate an alternative trading strategy: it removes outcomes after the fact without replaying capital allocation.
Risk and concentration
What the final profit number conceals
Peak-to-trough decline in closed-trade equity; this excludes unrealized movements while trades are open. Every account starts at $10,000, and folds are independent.
View risk and concentration values
| Model | Net P&L | Drawdown | Without top 3 wins | Wins / trades |
|---|---|---|---|---|
| Ridge | $3,909 | $710 | −$543 | 5 / 11 |
| Shallow tree | $1,396 | $461 | −$156 | 4 / 6 |
| Two-part network | $2,677 | $710 | −$279 | 7 / 13 |
Model selection and limitations
What the evidence supports
The predeclared rule required a candidate to beat both constant forecasts under the session/contract-day mean-squared-error criterion in each of the first two folds. None passed, so the rule selected CASH. RIDGE’s retrospective designation as the best historical model family preserves that original decision.
The study does not establish a deployable strategy. Of 53,550 original opportunity rows, 14,179 retain unresolved unit labels, and historical source-arrival evidence remains conditional. With every period already examined, new promotion evidence would require genuinely untouched chronology. The public repository preserves the code and results, including losses and limitations.
+$2,389 across three separate accounts
No candidate passed both early-fold gates