Skip to content
Open
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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void IvInterpolationAndGreeksGenerationTest()

var greekIndicator = _interpolator.GetUpdatedGreeksIndicators(symbol, interpolatedIv, OptionPricingModelType.BlackScholes,
OptionPricingModelType.BlackScholes);
var greeks = greekIndicator.GetGreeks();
var greeks = greekIndicator.Greeks;

Assert.NotZero(greeks.Delta);
// Assert.NotZero(greeks.Gamma); // Gamma can be zero at very ITM options
Expand Down
Loading