Hi,

As I am working with the backtesting engine I am trying to set up the FineFundamentalUniverse in a seperate .py file. I am not successful in calling it from the main.py file and I get an Error Message "During the algorithm initialization, the following exception has occurred: TypeError : no constructor matches given arguments"

It would be great if I can understand how to set up the FineFundamental Universe in a separate file. I can dset up Portfolio construction classes in separate file but for some reason not with the FineFundamental model.

Thanks,

G

Main.py

from universe_selection_model import MyUniverseModel

class TestAlgo(QCAlgorithm):

def Initialize(self):

self.SetStartDate(2018, 5, 28)
self.SetEndDate(2018, 6, 9)
self.SetWarmUp(10)
self.SetCash(10000)

# Universe selection settings
self.UniverseSettings.Resolution = Resolution.Daily
self.UniverseSettings.DataNormalizationMode = DataNormalizationMode.Adjusted
self.UniverseSettings.ExtendedMarketHours = False

self.SetUniverseSelection(MyUniverseModel())

# Other initialization code

universe_selection_model.py

from clr import AddReference
AddReference("System")
AddReference("QuantConnect.Common")
AddReference("QuantConnect.Algorithm.Framework")

from QuantConnect.Data.UniverseSelection import *
from QuantConnect.Algorithm.Framework import *
from QuantConnect.Algorithm.Framework.Selection import FineFundamentalUniverseSelectionModel

class MyUniverseModel(FineFundamentalUniverseSelectionModel):

def __init__(self):
super().__init__(coarseSelector=self.SelectCoarse, fineSelector=self.SelectFine)

def SelectCoarse(self, coarse):
# code for the coarse filter

def SelectFine(self, fine):
# code for the fine filter
x