---
title: "Key Concepts"
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/equity-options/greeks-and-implied-volatility/key-concepts
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/equity-options/greeks-and-implied-volatility/key-concepts.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/03%20Securities/99%20Asset%20Classes/02%20Equity%20Options/03%20Greeks%20and%20Implied%20Volatility/01%20Key%20Concepts
modified: 2026-10-29
index: https://www.quantconnect.com/llms.txt
---

# Key Concepts

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Writing Algorithms](https://www.quantconnect.com/docs/v2/writing-algorithms.md) > Securities > [Asset Classes](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes.md) > [Equity Options](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/equity-options.md) > [Greeks and Implied Volatility](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/equity-options/greeks-and-implied-volatility.md) > Key Concepts

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

## Introduction

LEAN provides multiple ways for you to get the Greeks and implied volatility (IV) of Option contracts. There is a [daily, pre-calculated dataset](https://www.quantconnect.com/datasets/quantconnect-us-equity-option-universe) based on the end of the previous trading day. There is also a stream of values that are calculated on-the-fly as your algorithm runs.

## Greeks on Universes

The Greeks and IV values in the [filter function](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/equity-options/requesting-data/universes.md#04-Filter-by-Implied-Volatility-and-Greeks) are the daily, pre-calculated values based on the end of the previous trading day.

```python
def initialize(self):
    option = self.add_option("SPY")
    option.set_filter(lambda universe: universe.delta(0.3, 0.7).expiration(0,7))
```

To calculate the values, we use [our implementation](https://www.quantconnect.com/research/16977/greeks-and-iv-implementation/p1) of the forward tree pricing model, which accounts for the interest rate and dividend payments.

You can't customize the Greeks and IV values that the filter function receives. However, you can create [indicators](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/equity-options/greeks-and-implied-volatility/indicators.md) to customize how the Greeks and IV are calculated for the contracts already in your universe.

## Greek History

The Greeks and IV values that you get from a [history request](https://www.quantconnect.com/docs/v2/writing-algorithms/historical-data/history-requests.md) of the Option universe are the daily, pre-calculated values based on the end of the previous trading day.

```python
class OptionHistoryAlgorithm(QCAlgorithm):

    def initialize(self):
        self.set_start_date(2024, 9, 1)
        self.set_end_date(2024, 12, 31)
        option = self.add_option('SPY')
        # DataFrame example:
        history_df = self.history(option.symbol, 5, flatten=True)
        # OptionUniverse objects example:
        history = self.history[OptionUniverse](option.symbol, 5)
        for chain in history:
            end_time = chain.end_time
            filtered_contracts = [c for c in chain if c.greeks.delta > 0.3]
            for contract in filtered_contracts:
                symbol = contract.symbol
                expiry = contract.id.date
                strike = contract.id.strike_price
                price = contract.close
                iv = contract.implied_volatility
```

You can't customize the Greeks and IV values that you get from a history request. However, you can create [indicators](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/equity-options/greeks-and-implied-volatility/indicators.md) to customize how the Greeks and IV are calculated for the contracts already in your universe.

## Greeks on Data Events

The Greeks and IV values that you get from the current [Slice](https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/time-modeling/timeslices.md) are from the [price model](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/options-models/pricing.md) calculations. These values aren't the same as the values you get in the universe filter function.

```python
class OptionDataEventsAlgorithm(QCAlgorithm):

    def initialize(self):
        option = self.add_option("GOOG")
        option.price_model = OptionPriceModels.binomial_cox_ross_rubinstein()

    def on_data(self, data):
        for canonical_symbol, chain in data.option_chains.items():
            for contract in chain:
                iv = contract.implied_volatility
                delta = contract.greeks.delta
```

To view all the models LEAN supports, see [Supported Models](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/options-models/pricing.md#08-Supported-Models).

## Greek Indicators

The Greeks and IV values that you get from the [indicators](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/equity-options/greeks-and-implied-volatility/indicators.md) are calculated in the same way as the values you get in the filter function, but they can reflect intraday prices instead of just the daily closing prices.

For Equity Options, the `indicator_history` uses the `SCALED_RAW` [data normalization mode](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/us-equity/requesting-data.md#11-Data-Normalization) when requesting historical prices.

## Examples

For detailed examples on using Option Greeks and Implied Volatility indicators in algorithm, you may refer to the [Greeks Indicators](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/equity-options/greeks-and-implied-volatility/indicators.md) page examples.
