I am looking a historical put pricing and I'm running into a significant data discrepancy between Research and Algorithm environments.
**The Problem:**
When I use `OptionHistory` in a Research notebook to pull AAPL option chains, I get very few strikes — sometimes only 1-2 per expiry. For example, AAPL on 2023-02-01 with a March expiry shows only strikes [150, 155].
But when I run an algorithm backtest with `AddOption` + `SetFilter`, I get the full chain — 679 puts with strikes from $40 to $200+.
**Research code (returns 2 strikes):**
```python
oh = qb.OptionHistory(
sym,
datetime(2023, 2, 1),
datetime(2023, 2, 28),
Resolution.Daily,
fillForward=False
)
df = oh.GetAllData()
puts = df[df.index.get_level_values('type') == 'Put']
# Returns only 2 strikes for March expiry
```
**Algorithm code (returns 679 puts):**
```python
option = self.AddOption("AAPL", Resolution.Daily)
option.SetFilter(lambda u: u.IncludeWeeklys().Strikes(-50, 50).Expiration(0, 180))
# Returns full chain — 679 puts, strikes $40-$200+
```
**My questions:**
1. Is this a known limitation of `OptionHistory` in Research — does it only return a subset of strikes?
2. Is there a way to apply a `SetFilter`-equivalent when using `OptionHistory` so I get the full chain in Research?
3. If not, what's the recommended approach for simulating systematic option strategies that need full chain data — should the simulation logic live in a backtest algorithm rather than a Research notebook?
**Context:** I'm trying to select strikes by BS delta (~10-delta puts, ~10% OTM) across 100 symbols over 10 years. With only 1-2 strikes per expiry in Research, I can't reliably find the target delta strike.
Any guidance appreciated — is there a `OptionHistory` parameter I'm missing, or is migrating to an algorithm-based simulation the right path?
CraigEvans
Disregard this post - added to discord and updated how code is displayed
CraigEvans
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!