コード例 #1
0
        public ScenarioManager(ScenParams p, int endMth)
        {
            ScenP      = p;
            ScenEndMth = endMth;

            SetFundCost();
        }
コード例 #2
0
        public static void TestCloud(string[] args)
        {
            Console.WriteLine("프로그램 시작");
            var irs = new List <double> {
                0.01
            };

            for (int i = 1; i < 14; i++)
            {
                irs.Add(0.01 + 0.001 * i);
            }

            var sp = new LiabilityCalc.ScenParams()
            {
                SourceCurve = irs, HW_a = 0.1, HW_sigma = 0.01, EqSigma = 0.27, BondSigma = 0.01
            };

            ScenarioManager sm = new ScenarioManager(sp, 1200);

            Tools.DBConnParams dbP = new Tools.DBConnParams(new string[] { args[1], args[2], args[3], args[4] });

            int scenCnt = 100;

            sm.SetScenDataFromFile(scenCnt);

            Console.WriteLine("시나리오 생성 완료");

            for (int i = 1; i <= scenCnt; i++)
            {
                sm.SetCurrentScen(i);
                InsertScenToDB(args[0], sm.CurrentScenNo, sm.CurrentScenData, dbP);
                Console.WriteLine($@"시나리오 {i}번 입력 완료");
            }
        }