public override void Initialize()
        {
            SetStartDate(2014, 3, 25);      //Set Start Date
            SetEndDate(2014, 4, 7);         //Set End Date
            SetCash(100000);                //Set Strategy Cash

            // Set our DataNormalizationMode to raw
            UniverseSettings.DataNormalizationMode = DataNormalizationMode.Raw;
            _googl = AddEquity(Ticker, Resolution.Daily).Symbol;

            // Get our factor file for this regression
            var dataProvider =
                Composer.Instance.GetExportedValueByTypeName <IDataProvider>(Config.Get("data-provider",
                                                                                        "DefaultDataProvider"));

            var mapFileProvider = new LocalDiskMapFileProvider();

            mapFileProvider.Initialize(dataProvider);
            var factorFileProvider = new LocalDiskFactorFileProvider();

            factorFileProvider.Initialize(mapFileProvider, dataProvider);
            _factorFile = factorFileProvider.Get(_googl) as CorporateFactorProvider;

            // Prime our expected values
            _expectedRawPrices.MoveNext();
        }
Beispiel #2
0
        /// <summary>
        /// Runs the Coarse universe generator with default values.
        /// </summary>
        /// <returns></returns>
        public static bool CoarseUniverseGenerator()
        {
            var dailyDataFolder        = new DirectoryInfo(Path.Combine(Globals.DataFolder, SecurityType.Equity.SecurityTypeToLower(), Market.USA, Resolution.Daily.ResolutionToLower()));
            var destinationFolder      = new DirectoryInfo(Path.Combine(Globals.DataFolder, SecurityType.Equity.SecurityTypeToLower(), Market.USA, "fundamental", "coarse"));
            var fineFundamentalFolder  = new DirectoryInfo(Path.Combine(dailyDataFolder.Parent.FullName, "fundamental", "fine"));
            var blackListedTickersFile = new FileInfo("blacklisted-tickers.txt");
            var reservedWordPrefix     = Config.Get("reserved-words-prefix", "quantconnect-");
            var dataProvider           = new DefaultDataProvider();
            var mapFileProvider        = new LocalDiskMapFileProvider();

            mapFileProvider.Initialize(dataProvider);
            var factorFileProvider = new LocalDiskFactorFileProvider();

            factorFileProvider.Initialize(mapFileProvider, dataProvider);
            var generator = new CoarseUniverseGeneratorProgram(dailyDataFolder, destinationFolder, fineFundamentalFolder, Market.USA, blackListedTickersFile, reservedWordPrefix, mapFileProvider, factorFileProvider);

            return(generator.Run());
        }
Beispiel #3
0
        public override void Initialize()
        {
            SetStartDate(2014, 6, 5);      //Set Start Date
            SetEndDate(2014, 6, 5);        //Set End Date

            UniverseSettings.DataNormalizationMode = DataNormalizationMode.SplitAdjusted;
            _aapl = AddEquity(Ticker, Resolution.Minute).Symbol;

            var dataProvider =
                Composer.Instance.GetExportedValueByTypeName <IDataProvider>(Config.Get("data-provider",
                                                                                        "DefaultDataProvider"));

            var mapFileProvider = new LocalDiskMapFileProvider();

            mapFileProvider.Initialize(dataProvider);
            var factorFileProvider = new LocalDiskFactorFileProvider();

            factorFileProvider.Initialize(mapFileProvider, dataProvider);


            _factorFile = factorFileProvider.Get(_aapl) as CorporateFactorProvider;
        }