Exemplo n.º 1
0
        public void start_calculate(DateTime calcDate)
        {
            // calc 함.
            CalculationManager calcM = new CalculationManager();

            calcM.ReferenceDate_ = calcDate;

            calcM.batch_calculate();
        }
        public void start_calculate(DateTime refDate)
        {
            SystemBatchManager.updateBatchJobID_start(refDate, clsHDAT_BATCHJOB_RESULT_TB.BATCH_JOB_ID_Type.FP_CACULATION);

            // calc 함.
            CalculationManager calcM = new CalculationManager();

            calcM.ReferenceDate_ = refDate;

            calcM.batch_calculate();

            SystemBatchManager.updateBatchJobID_end(refDate, clsHDAT_BATCHJOB_RESULT_TB.BATCH_JOB_ID_Type.FP_CACULATION);
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            // fpcalculation 20151112 -a

            // 사전에 존재해야하는 data : market data
            
            // market data가 존재하는가

            //var options = new ArgumentOption();

            //if (CommandLine.Parser.Default.ParseArguments(args, options))
            //{ 
                
            //}

            DateTime refDate = ConvertingTool.ToDateTime(args[0].ToString());

            //while (d.DayOfWeek == DayOfWeek.Sunday || d.DayOfWeek == DayOfWeek.Saturday)
            //    d = d.Date.AddDays(-1);

            Console.WriteLine("reference date : " + refDate.ToString("yyyyMMdd"));
            
            Console.WriteLine(refDate.ToString("yyyyMMdd") + "calculation start..");

            CalculationManager cm = new CalculationManager();
            
            // arguments 를 받아서 조건을 설정하고 ㄱㄱ함.



            cm.ReferenceDate_ = refDate;
            cm.batch_calculate();

            // 총 몇개 계산되는지 ㄱㄱ

            Console.WriteLine(refDate.ToString("yyyyMMdd") + "end..");

        }
Exemplo n.º 4
0
        // 여기서는 그냥 배치 calculationManager 에서 하면 대나..
        public void calculate(IBook selectedBook)
        {
            CalculationManager calcM = new CalculationManager();
            calcM.ReferenceDate_ = this.ReferenceDate_;

            // book 에 있는 거 리스트
            // 어케 해야함..?
            // index futures 의 경우에 마켓 데이터를 업어치고 평가 가격을 덮으면 댐.
            // Financial_instrumentPricerManager f_instPriceManager = new Financial_instrumentPricerManager();
            // ExcelExport ee = new ExcelExport();

            string bookCD = selectedBook.BookCode_;

            var selectedFi = (from fi in this.LoadedFPMasterResultVMList_
                              where fi.BOOK_CD == bookCD
                              select fi);

            foreach (var fi in selectedFi)
            {
                calcM.calculation(fi.Financial_instrument_);
            }
            //{
            //    try
            //    {
            //    }
            //    catch (Exception e)
            //    {
            //        //sb.AppendLine(e.Message);
            //        ee.writeException(e);
            //    }

            //}

            //ee.export();


        }