示例#1
0
文件: MacD.cs 项目: JBetser/MiDax
 public static void Run(List<DateTime> dates, bool generate = false, bool generate_from_db = false, bool publish_to_db = false, bool use_uat_db = false, bool fullday = false)
 {
     TestEngine testEngine = new TestEngine("MacD", dates, generate, generate_from_db, publish_to_db, use_uat_db, fullday);
     var models = new List<Model>();
     models.Add(new ModelMacDTest(new MarketData("DAX:IX.D.DAX.DAILY.IP"), 2, 10, 60));
     testEngine.Run(models);
 }
示例#2
0
文件: MacD.cs 项目: w1r2p1/MiDax
        public static void Run(List <DateTime> dates, bool generate = false, bool generate_from_db = false, bool publish_to_db = false, bool use_uat_db = false, bool fullday = false)
        {
            TestEngine testEngine = new TestEngine("MacD", dates, generate, generate_from_db, publish_to_db, use_uat_db, fullday);
            var        models     = new List <Model>();

            models.Add(new ModelMacDTest(new MarketData("DAX:IX.D.DAX.DAILY.IP"), 2, 10, 60));
            testEngine.Run(models);
        }
示例#3
0
文件: ANN.cs 项目: JBetser/MiDax
 public static void Run(List<DateTime> dates, bool generate = false, bool generate_from_db = false, bool publish_to_db = false, bool use_uat_db = false, bool fullday = false)
 {
     TestEngine testEngine = new TestEngine("ANN", dates, generate, generate_from_db, publish_to_db, use_uat_db, fullday);
     testEngine.Settings["TRADING_SIGNAL"] = "ANN_FX_5_2_1_IX.D.DAX.DAILY.IP";
     testEngine.Settings["TIME_GMT"] = "-4";
     var models = new List<Model>();
     var index = new MarketData("EURUSD:CS.D.EURUSD.TODAY.IP");
     models.Add(new ModelMacDTest(index, 10, 30, 90));
     List<MarketData> otherIndices = new List<MarketData>();
     otherIndices.Add(index);
     models.Add(new ModelANN("FX_6_2", (ModelMacD)models[0], null, null, otherIndices));
     testEngine.Run(models);
 }
示例#4
0
        public static void Run(List<DateTime> dates, bool generate = false, bool generate_from_db = false, bool publish_to_db = false, bool use_uat_db = false, bool fullday = false)
        {
            TestEngine testEngine = new TestEngine("heuristic", dates, generate, generate_from_db, publish_to_db, use_uat_db, fullday);
            testEngine.Settings["TRADING_SIGNAL"] = "FXMole_1_14_CS.D.EURUSD.TODAY.IP,FXMole_1_14_CS.D.GBPUSD.TODAY.IP,FXMole_1_14_CS.D.USDJPY.TODAY.IP,FXMole_1_14_CS.D.AUDUSD.TODAY.IP";
            testEngine.Settings["TIME_GMT"] = "-4";
            testEngine.Settings["TIME_DECAY_FACTOR"] = "3";
            testEngine.Settings["ASSUMPTION_TREND"] = "BEAR";
            testEngine.Settings["INDEX_ICEDOW"] = "DOW:IceConnection.DJI";
            testEngine.Settings["INDEX_DOW"] = "DOW:IX.D.DOW.DAILY.IP";
            testEngine.Settings["INDEX_DAX"] = "DAX:IX.D.DAX.DAILY.IP";
            testEngine.Settings["INDEX_CAC"] = "CAC:IX.D.CAC.DAILY.IP";
            testEngine.Settings["FX_GBPUSD"] = "GBPUSD:CS.D.GBPUSD.TODAY.IP";
            testEngine.Settings["FX_EURUSD"] = "EURUSD:CS.D.EURUSD.TODAY.IP";
            testEngine.Settings["FX_USDJPY"] = "USDJPY:CS.D.USDJPY.TODAY.IP";
            testEngine.Settings["FX_AUDUSD"] = "AUDUSD:CS.D.AUDUSD.TODAY.IP";

            //List<string> rsiRefMappingJPYGBP = new List<string> { testEngine.Settings["FX_GBPEUR"], testEngine.Settings["FX_USDJPY"] };
            //List<string> rsiRefMappingUSD = new List<string> { testEngine.Settings["FX_GBPUSD"], testEngine.Settings["FX_EURUSD"] };
            //List<decimal> volcoeffsJPYGBP = new List<decimal> { 0.7m, 0.8m };
            //List<decimal> volcoeffsUSD = new List<decimal> { 0.75m, 1.0m, 0.8m };

            var index = IceStreamingMarketData.Instance;
            var gbpusd = new MarketData(testEngine.Settings["FX_GBPUSD"]);
            var eurusd = new MarketData(testEngine.Settings["FX_EURUSD"]);
            var usdjpy = new MarketData(testEngine.Settings["FX_USDJPY"]);
            var audusd = new MarketData(testEngine.Settings["FX_AUDUSD"]);
            var models = new List<Model>();
            var macD_10_30_90_gbpusd = new ModelMacD(gbpusd, 10, 30, 90);
            var macD_10_30_90_eurusd = new ModelMacD(eurusd, 10, 30, 90);
            var macD_10_30_90_usdjpy = new ModelMacD(usdjpy, 10, 30, 90);
            var macD_10_30_90_audusd = new ModelMacD(audusd, 10, 30, 90);
            decimal volcoeffEURUSD = 0.7m;
            decimal volcoeffGBPUSD = 0.85m;
            decimal volcoeffUSDJPY = 0.65m;
            decimal volcoeffAUDUSD = 0.6m;
            var fxmole_eurusd = new ModelFXMole(new List<MarketData> { eurusd, gbpusd }, macD_10_30_90_eurusd, volcoeffEURUSD);
            var fxmole_gbpusd = new ModelFXMole(new List<MarketData> { gbpusd, eurusd }, macD_10_30_90_gbpusd, volcoeffGBPUSD);
            var fxmole_usdjpy = new ModelFXMole(new List<MarketData> { usdjpy, eurusd }, macD_10_30_90_usdjpy, volcoeffUSDJPY);
            var fxmole_audusd = new ModelFXMole(new List<MarketData> { audusd, eurusd }, macD_10_30_90_audusd, volcoeffAUDUSD);
            models.Add(macD_10_30_90_gbpusd);
            models.Add(macD_10_30_90_eurusd);
            models.Add(macD_10_30_90_usdjpy);
            models.Add(macD_10_30_90_audusd);
            models.Add(fxmole_gbpusd);
            models.Add(fxmole_eurusd);
            models.Add(fxmole_usdjpy);
            models.Add(fxmole_audusd);
            testEngine.Run(models);
        }
示例#5
0
        public static void Run(List <DateTime> dates, bool generate = false, bool generate_from_db = false, bool publish_to_db = false, bool use_uat_db = false, bool fullday = false)
        {
            TestEngine testEngine = new TestEngine("ANN", dates, generate, generate_from_db, publish_to_db, use_uat_db, fullday);

            testEngine.Settings["TRADING_SIGNAL"]    = "ANN_FX_5_2_1_CS.D.EURUSD.TODAY.IP";
            testEngine.Settings["TIME_GMT_CALENDAR"] = "1";
            var models = new List <Model>();
            var index  = new MarketData("EURUSD:CS.D.EURUSD.TODAY.IP");

            models.Add(new ModelMacDTest(index, 10, 30, 90));
            List <MarketData> otherIndices = new List <MarketData>();

            otherIndices.Add(index);
            models.Add(new ModelANN("FX_5_2", (ModelMacD)models[0], null, null, otherIndices));
            testEngine.Run(models);
        }
示例#6
0
文件: Heuristic.cs 项目: w1r2p1/MiDax
        public static void Run(List <DateTime> dates, bool generate = false, bool generate_from_db = false, bool publish_to_db = false, bool use_uat_db = false, bool fullday = false)
        {
            TestEngine testEngine = new TestEngine("heuristic", dates, generate, generate_from_db, publish_to_db, use_uat_db, fullday);

            testEngine.Settings["TRADING_SIGNAL"]    = "Rob_60_48_20_15_IX.D.DAX.DAILY.IP,Rob_60_48_20_15_IX.D.FTSE.DAILY.IP,Rob_60_48_20_15_CS.D.EURUSD.TODAY.IP,Rob_60_48_20_15_CS.D.GBPUSD.TODAY.IP,Rob_60_48_20_15_CS.D.USCSI.TODAY.IP";
            testEngine.Settings["TIME_GMT_CALENDAR"] = "1";
            testEngine.Settings["TIME_DECAY_FACTOR"] = "3";
            testEngine.Settings["ASSUMPTION_TREND"]  = "BEAR";
            testEngine.Settings["INDEX_ICEDOW"]      = "DOW:IceConnection.DJI";
            testEngine.Settings["INDEX_DOW"]         = "DOW:IX.D.DOW.DAILY.IP";
            testEngine.Settings["INDEX_DAX"]         = "DAX:IX.D.DAX.DAILY.IP";
            testEngine.Settings["INDEX_CAC"]         = "CAC:IX.D.CAC.DAILY.IP";
            testEngine.Settings["INDEX_FTSE"]        = "FTSE:IX.D.FTSE.DAILY.IP";
            testEngine.Settings["FX_GBPUSD"]         = "GBPUSD:CS.D.GBPUSD.TODAY.IP";
            testEngine.Settings["FX_EURUSD"]         = "EURUSD:CS.D.EURUSD.TODAY.IP";
            testEngine.Settings["FX_USDJPY"]         = "USDJPY:CS.D.USDJPY.TODAY.IP";
            testEngine.Settings["FX_AUDUSD"]         = "AUDUSD:CS.D.AUDUSD.TODAY.IP";
            testEngine.Settings["COM_SILVER"]        = "SIL:CS.D.USCSI.TODAY.IP";

            //List<string> rsiRefMappingJPYGBP = new List<string> { testEngine.Settings["FX_GBPEUR"], testEngine.Settings["FX_USDJPY"] };
            //List<string> rsiRefMappingUSD = new List<string> { testEngine.Settings["FX_GBPUSD"], testEngine.Settings["FX_EURUSD"] };
            //List<decimal> volcoeffsJPYGBP = new List<decimal> { 0.7m, 0.8m };
            //List<decimal> volcoeffsUSD = new List<decimal> { 0.75m, 1.0m, 0.8m };

            var index            = IceStreamingMarketData.Instance;
            var dax              = new MarketData(testEngine.Settings["INDEX_DAX"]);
            var dow              = new MarketData(testEngine.Settings["INDEX_DOW"]);
            var cac              = new MarketData(testEngine.Settings["INDEX_CAC"]);
            var ftse             = new MarketData(testEngine.Settings["INDEX_FTSE"]);
            var gbpusd           = new MarketData(testEngine.Settings["FX_GBPUSD"]);
            var eurusd           = new MarketData(testEngine.Settings["FX_EURUSD"]);
            var silver           = new MarketData(testEngine.Settings["COM_SILVER"]);
            var models           = new List <Model>();
            var robinhood_gbpusd = new ModelRobinHoodStatic(gbpusd);
            var robinhood_eurusd = new ModelRobinHoodStatic(eurusd);
            var robinhood_dax    = new ModelRobinHoodStatic(dax);
            var robinhood_ftse   = new ModelRobinHoodStatic(ftse);
            var robinhood_sil    = new ModelRobinHoodStatic(silver);

            models.Add(robinhood_gbpusd);
            models.Add(robinhood_eurusd);
            models.Add(robinhood_dax);
            models.Add(robinhood_ftse);
            models.Add(robinhood_sil);
            testEngine.Run(models);
        }