Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 0 additions & 109 deletions Lean.DataSource.OptionsUniverseGenerator/GreeksIndicators.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using QuantConnect.Data;
using QuantConnect.Data.Market;
using QuantConnect.Data.UniverseSelection;
using QuantConnect.Indicators;

namespace QuantConnect.DataSource.OptionsUniverseGenerator
{
Expand All @@ -30,12 +31,12 @@ public class OptionUniverseEntry : BaseContractUniverseFileEntry
/// <summary>
/// Option contract's implied volatility on the processing date.
/// </summary>
public decimal? ImpliedVolatility => _greeksIndicators?.ImpliedVolatility;
public decimal? ImpliedVolatility => _greeksIndicators?.ImpliedVolatility?.Current?.Value;

/// <summary>
/// Option contract's greeks on the processing date.
/// </summary>
public Greeks Greeks => _greeksIndicators?.GetGreeks();
public Greeks Greeks => _greeksIndicators?.Greeks;

/// <summary>
/// Initializes a new instance of the <see cref="OptionUniverseEntry"/> class.
Expand All @@ -46,9 +47,9 @@ public OptionUniverseEntry(Symbol symbol)
{
// Options universes contain a line for the underlying: we don't need greeks for it.
// Future options don't have greeks either.
if (HasGreeks(symbol.SecurityType))
if (HasGreeks(symbol.SecurityType) && !symbol.IsCanonical())
{
var mirrorOptionSymbol = OptionsUniverseGeneratorUtils.GetMirrorOptionSymbol(symbol);
var mirrorOptionSymbol = symbol.GetMirrorOptionSymbol();
_greeksIndicators = new GreeksIndicators(symbol, mirrorOptionSymbol);
}
}
Expand Down
Loading
Loading