コード例 #1
0
ファイル: Program.cs プロジェクト: minikie/test
        private static void test()
        {
            DateTime startDate = new DateTime(2014, 1, 1);
            DateTime endDate = DateTime.Now.AddDays(-1.0).Date;
            SampleMarketDataETL sample_etl = new SampleMarketDataETL();

            HDAT_MARKETDATA_TB marketdata_tb = new HDAT_MARKETDATA_TB();
            clsHDAT_MARKETDATA_TB.TableClear();

            HDAT_CURVEDATA_TB curvedata_tb = new HDAT_CURVEDATA_TB();
            clsHDAT_CURVEDATA_TB.TableClear();

            sample_etl.build_historyData(startDate, endDate, true);

            {
                //HDAT_MARKETDATA_TB marketdata_tb = new HDAT_MARKETDATA_TB();
                //clsHDAT_MARKETDATA_TB.TableClear();
                //marketdata_tb.buildTestData();

                clsHITM_TRADEINFO_TB trade_tb = new clsHITM_TRADEINFO_TB();
                clsHITM_TRADEINFO_TB.TableClear();

                clsMAST_FP_INSTRUMENT_TB mast_tb = new clsMAST_FP_INSTRUMENT_TB();
                clsMAST_FP_INSTRUMENT_TB.TableClear();

                clsHITM_FP_POSITION_TB position_tb = new clsHITM_FP_POSITION_TB();
                clsHITM_FP_POSITION_TB.TableClear();

                curvedata_tb.buildTestData();

                SET_DISCOUNTCURVE_TB discount_tb = new SET_DISCOUNTCURVE_TB();
                clsSET_DISCOUNTCURVE_TB.TableClear();
                discount_tb.buildTestData();

                HITM_CALENDAR_TB calendar_tb = new HITM_CALENDAR_TB();
                clsHITM_CALENDAR_TB.TableClear();
                calendar_tb.buildTestData();



            }

        }
コード例 #2
0
ファイル: Program.cs プロジェクト: minikie/test
        private static void install_db_initialize() 
        {
            HITM_CALENDAR_TB calendar_tb = new HITM_CALENDAR_TB();
            clsHITM_CALENDAR_TB.TableClear();
            calendar_tb.buildTestData();

            clsMAST_BOOKINFO_TB book_tb = new clsMAST_BOOKINFO_TB();

            book_tb.BOOK_CD = "ROOTBOOK";
            book_tb.BOOK_NM = "RootBook";
            book_tb.PARENT_BOOK_CD = "ANCESTOR";
            book_tb.OPEN_DT = DateTime.Now.ToString("yyyyMMdd");
            book_tb.CLOSE_DT = "20991231";
            book_tb.DESCRIPTION = "";

            book_tb.Insert();

            // ----------------------------------------------------

            clsSET_SCENARIO_TB clstb_scenrio = new clsSET_SCENARIO_TB();

            clstb_scenrio.FP_MASTER_TYP = 9999;
            clstb_scenrio.SCENARIO_CD = "DEFAULT_PARALLEL";
            clstb_scenrio.CURVE_CD = "ALL";
            clstb_scenrio.PARALLEL_SHIFT_UNIT = 1.0;
            clstb_scenrio.HUMP_SHIFT_UNIT = 0.0;
            clstb_scenrio.HUMP_CENTER_T = 0.0;
            clstb_scenrio.STEEPEN_SHIFT_UNIT = 0.0;
            clstb_scenrio.STEEPEN_CENTER_T = 0.0;

            clstb_scenrio.Insert();

            clstb_scenrio.FP_MASTER_TYP = 2800;
            clstb_scenrio.SCENARIO_CD = "TEST_SC01";
            clstb_scenrio.CURVE_CD = "IRSKRW";
            clstb_scenrio.PARALLEL_SHIFT_UNIT = 1.0;
            clstb_scenrio.HUMP_SHIFT_UNIT = 0.0;
            clstb_scenrio.HUMP_CENTER_T = 0.0;
            clstb_scenrio.STEEPEN_SHIFT_UNIT = 0.1;
            clstb_scenrio.STEEPEN_CENTER_T = 3;

            clstb_scenrio.Insert();

            clstb_scenrio.FP_MASTER_TYP = 2800;
            clstb_scenrio.SCENARIO_CD = "TEST_SC02";
            clstb_scenrio.CURVE_CD = "IRSKRW";
            clstb_scenrio.PARALLEL_SHIFT_UNIT = 0.5;
            clstb_scenrio.HUMP_SHIFT_UNIT = 0.0;
            clstb_scenrio.HUMP_CENTER_T = 0.0;
            clstb_scenrio.STEEPEN_SHIFT_UNIT = 0.3;
            clstb_scenrio.STEEPEN_CENTER_T = 3;

            clstb_scenrio.Insert();

        }