/// <summary> /// Constituent universe for a Python function /// </summary> /// <param name="subscriptionDataConfig">The universe configuration to use</param> /// <param name="universeSettings">The universe settings to use</param> /// <param name="constituentsFilter">User-provided function to filter constituents universe with</param> public ConstituentsUniverse( SubscriptionDataConfig subscriptionDataConfig, UniverseSettings universeSettings, PyObject constituentsFilter = null) : this(subscriptionDataConfig, universeSettings, constituentsFilter.ConvertPythonUniverseFilterFunction <T>()) { }
/// <summary> /// Creates a universe for the constituents of the provided <paramref name="indexSymbol"/> /// </summary> /// <param name="indexSymbol">Index Symbol to get constituents for</param> /// <param name="universeSettings">Universe settings</param> /// <param name="universeFilterFunc">Function to filter universe results</param> /// <returns>New index constituents Universe</returns> public Universe Index( Symbol indexSymbol, UniverseSettings universeSettings = null, PyObject universeFilterFunc = null) { return(Index(indexSymbol, universeSettings, universeFilterFunc.ConvertPythonUniverseFilterFunction <ETFConstituentData>())); }
/// <summary> /// Creates a universe for the constituents of the provided <paramref name="etfTicker"/> /// </summary> /// <param name="etfTicker">Ticker of the ETF to get constituents for</param> /// <param name="market">Market of the ETF</param> /// <param name="universeSettings">Universe settings</param> /// <param name="universeFilterFunc">Function to filter universe results</param> /// <returns>New ETF constituents Universe</returns> public Universe ETF( string etfTicker, string market = null, UniverseSettings universeSettings = null, PyObject universeFilterFunc = null) { return(ETF(etfTicker, market, universeSettings, universeFilterFunc.ConvertPythonUniverseFilterFunction <ETFConstituentData>())); }
/// <summary> /// Initializes a new instance of the <see cref="FuncUniverse{T}"/> class for a filter function loaded from Python /// </summary> /// <param name="configuration">The configuration used to resolve the data for universe selection</param> /// <param name="universeSettings">The settings used for new subscriptions generated by this universe</param> /// <param name="universeSelector">Function that returns the symbols that should be included in the universe</param> public FuncUniverse(SubscriptionDataConfig configuration, UniverseSettings universeSettings, PyObject universeSelector) : this(configuration, universeSettings, universeSelector.ConvertPythonUniverseFilterFunction <T>()) { }
/// <summary> /// Creates a new universe for the constituents of the ETF provided as <paramref name="symbol"/> /// </summary> /// <param name="symbol">The ETF to load constituents for</param> /// <param name="universeSettings">Universe settings</param> /// <param name="constituentsFilter">The filter function used to filter out ETF constituents from the universe</param> public ETFConstituentsUniverse(Symbol symbol, UniverseSettings universeSettings, PyObject constituentsFilter = null) : this(symbol, universeSettings, constituentsFilter.ConvertPythonUniverseFilterFunction <ETFConstituentData>()) { }