Beispiel #1
0
        private void _buildRefDatePosition()
        {
            // if 이미 set이 되면 안함

            clsHITM_FP_POSITION_TB clstb = new clsHITM_FP_POSITION_TB();

            clstb.POSITION_DT = this.refDate_.ToString("yyyyMMdd");

            if ( clstb.Select().Rows.Count == 0 )
            {
                CalendarManager cm = new CalendarManager(this.refDate_, CalendarManager.CountryType.SOUTH_KOREA);

                DateTime roopDate = this.refDate_.AddDays(-1.0);

                while (!cm.isHoliday(roopDate))
                {
                    roopDate = roopDate.AddDays(-1.0);
                }

                this.HedgeTradingViewModel_.FinanceBook_.makePositionFromPreDate(roopDate,this.refDate_);

            }

        }
Beispiel #2
0
        public void position_calculate(DateTime refDate)
        {
            // 계산 된 결과를 

            // 포지션에 update침

            //List<Position> positionList = new List<Position>();


            clsHITM_FP_POSITION_TB clstb_position = new clsHITM_FP_POSITION_TB();

            clstb_position.POSITION_DT = refDate.ToString("yyyyMMdd");

            DataTable dt = clstb_position.Select();

            foreach (DataRow dr in dt.Select())
            {
                Position p = Position.CreatePosition(clsHITM_FP_POSITION_TB.Create(dr));

                p.calculatePL();
            }


        }
        public void totalPositionLoad()
        {
            this.LoadedPositionDAOList_.Clear();

            // sub book 에 대한 검사.

            clsHITM_FP_POSITION_TB clstb = new clsHITM_FP_POSITION_TB();

            //clstb.BOOK_CD = book_cd;
            clstb.POSITION_DT = this.ReferenceDate_.ToString("yyyyMMdd");

            DataTable dt = clstb.Select();

            foreach (DataRow dr in dt.Select())
            {
                this.LoadedPositionDAOList_.Add(clsHITM_FP_POSITION_TB.Create(dr));
            }
        }
Beispiel #4
0
        public void position_calculate(DateTime refDate)
        {
            // 계산 된 결과를 
            // 포지션에 update침

            updateBatchJobID_start(refDate, clsHDAT_BATCHJOB_RESULT_TB.BATCH_JOB_ID_Type.POSITION_CALCULATION);

            clsHITM_FP_POSITION_TB clstb_position = new clsHITM_FP_POSITION_TB();

            clstb_position.POSITION_DT = refDate.ToString("yyyyMMdd");

            DataTable dt = clstb_position.Select();

            foreach (DataRow dr in dt.Select())
            {
                Position p = Position.CreatePosition(clsHITM_FP_POSITION_TB.Create(dr));

                p.calculatePL();
            }

            updateBatchJobID_end(refDate, clsHDAT_BATCHJOB_RESULT_TB.BATCH_JOB_ID_Type.POSITION_CALCULATION);
        }