Esempio n. 1
0
        public override void buildFromTradeString(TradeString tradeString)
        {
            string typeStr = tradeString.InstType_;

            //this.excel_issueInfoViewModel_.Notional_ = tradeString.Notional_;
            this.excel_issueInfoViewModel_.Notional_ = "10000";
            this.excel_issueInfoViewModel_.Currency_ = CurrencyViewModel.CreateCurrencyComboViewModel("KRW");

            this.excel_underlyingCalcInfoViewModel_.buildFromTradeString(tradeString);

            this.excel_hifive_subtypeViewModel_ = Excel_hifive_subtypeViewModel.CreateExcel_hifive_subtype(typeStr);

            this.excel_hifive_subtypeViewModel_.EffectiveDate_ = StringConverter.xmlDateToDateTime(tradeString.EffectiveDate_);

            this.excel_hifive_subtypeViewModel_.ProductString_ = tradeString.ProductString_;

            this.excel_hifive_subtypeViewModel_.scheduleDataGenerate();

            this.excel_hifive_subtypeViewModel_.Excel_underlyingCalcInfoViewModel_
                = this.Excel_underlyingCalcInfoViewModel_;

            //this.Excel_issueInfoViewModel_.EffectiveDate_ = this.excel_hifive_subtypeViewModel_.EffectiveDate_ = ;
            //this.excel_hifive_subtypeViewModel_.MaturityDate_ = this.Excel_issueInfoViewModel_.MaturityDate_;

            this.updateFromSubType(this.excel_hifive_subtypeViewModel_);
        }
        public void addInstrument(TradeString tradeString)
        {
            Excel_instrument_hifiveViewModel e_inst_hifive_VM = new Excel_instrument_hifiveViewModel(true);

            e_inst_hifive_VM.bookingFromTradeString(tradeString);

        }
        public void buildFromTradeString(TradeString tradeString)
        {
            this.excel_underlyingInfoViewModel_.Clear();

            DateTime effectiveDate = StringConverter.xmlDateToDateTime(tradeString.EffectiveDate_);

            foreach (var item in tradeString.UnderlyingList_)
            {
                this.excel_underlyingInfoViewModel_.Add(Excel_loaderViewModel.loadUnderInfo(effectiveDate, item));
            }
        }
        public override void scheduleDataGenerateFromProductStr(TradeString ts)
        {
            this.subScheduleDataList_.Clear();

            StepDownKI_TradeString tsm = ts as StepDownKI_TradeString;

            this.CouponTenor_ = tsm.ObTenor_;
            this.Maturity_    = tsm.MaturiryYear_;
            this.Ki_          = tsm.KI_;
            this.Coupon_      = tsm.Coupon_;

            if (tsm.EffectiveDate_ != "")
            {
                this.EffectiveDate_ = StringConverter.xmlDateToDateTime(tsm.EffectiveDate_);
            }

            int stepMonth = Convert.ToInt32(this.CouponTenor_.Substring(0, this.CouponTenor_.Length - 1));

            int legCount = (12 / stepMonth) * Convert.ToInt32(this.Maturity_.Substring(0, this.Maturity_.Length - 1));

            double couponPerStep = (Convert.ToDouble(this.Coupon_) / 12) * Convert.ToDouble(stepMonth);

            for (int i = 0; i < legCount; i++)
            {
                Excel_stepDownKI_subScheduleViewModel data = new Excel_stepDownKI_subScheduleViewModel();

                data.Type_ = "AutoCall";
                //data.EventDate_ = this.scheduleGeneratorVM_.Dates_[i + 1];
                data.EventDate_ = this.effectiveDate_.AddMonths(stepMonth * (i + 1));

                data.UnderCalcType_ = "Minimum";
                data.AverageDays_   = "1";
                data.Coupon_        = (couponPerStep * (i + 1)).ToString();
                data.Trigger_       = tsm.TriggerList_[i];

                //try { data.Trigger_ = tsm.TriggerList_[i - 1]; }
                //catch (Exception) { }

                //double count_i = Convert.ToDouble(i);
                ////data.Coupon_ = (Convert.ToDouble(this.coupon_) * (count_i * couponMultiplier)).ToString();
                //double couponMultiplier = Convert.ToDouble(scheduleGeneratorVM_.FrequencyEnum_);
                //data.Coupon_ = (count_i * Convert.ToDouble(this.coupon_) / couponMultiplier).ToString();

                this.subScheduleDataList_.Add(data);
            }

            this.KiObStartDate_ = this.effectiveDate_;
            //this.KiObStartDate_ = this.subScheduleDataList_[0].EventDate_;
            this.KiObEndDate_ = this.subScheduleDataList_[this.subScheduleDataList_.Count - 1].EventDate_;
        }
Esempio n. 5
0
        public override void bookingFromTradeString(TradeString tradeString)
        {
            this.excel_interfaceViewModel_.buildFromTradeString(tradeString);

            // --------------------------------------------------------------
            this.masterInformationViewModel_.Item_name_       = tradeString.Name_;
            this.masterInformationViewModel_.Trade_date_      = this.excel_interfaceViewModel_.Excel_issueInfoViewModel_.EffectiveDate_;
            this.masterInformationViewModel_.Maturity_date_   = this.excel_interfaceViewModel_.Excel_issueInfoViewModel_.MaturityDate_;
            this.masterInformationViewModel_.Export_itemcode_ = tradeString.ExportCode_;

            // --------------------------------------------------------------
            this.excel_interfaceViewModel_.ItemCode_ = this.masterInformationViewModel_.Item_code_;
            // --------------------------------------------------------------
            //this.bookingFromTradeString(tradeString);

            this.bookingInstrument(); // db에 박음.

            XMLFileLoader.SaveInstrument(this);

            //이건 생략
            //MasterInformationViewModel.WholeMasterPosition_.Add(e_instVM);
        }
        public override void bookingFromTradeString(TradeString tradeString)
        {
            this.excel_interfaceViewModel_.buildFromTradeString(tradeString);

            // --------------------------------------------------------------
            this.masterInformationViewModel_.Item_name_ = tradeString.Name_;
            this.masterInformationViewModel_.Trade_date_ = this.excel_interfaceViewModel_.Excel_issueInfoViewModel_.EffectiveDate_;
            this.masterInformationViewModel_.Maturity_date_ = this.excel_interfaceViewModel_.Excel_issueInfoViewModel_.MaturityDate_;
            this.masterInformationViewModel_.Export_itemcode_ = tradeString.ExportCode_;

            // --------------------------------------------------------------
            this.excel_interfaceViewModel_.ItemCode_ = this.masterInformationViewModel_.Item_code_;
            // -------------------------------------------------------------- 
            //this.bookingFromTradeString(tradeString);

            this.bookingInstrument(); // db에 박음.

            XMLFileLoader.SaveInstrument(this);

            //이건 생략
            //MasterInformationViewModel.WholeMasterPosition_.Add(e_instVM);
            
        }
        public override void scheduleDataGenerateFromProductStr(TradeString ts)
        {
            this.subScheduleDataList_.Clear();

            StepDownKI_TradeString tsm = ts as StepDownKI_TradeString;

            this.CouponTenor_ = tsm.ObTenor_;
            this.Maturity_ = tsm.MaturiryYear_;
            this.Ki_ = tsm.KI_;
            this.Coupon_ = tsm.Coupon_;

            if (tsm.EffectiveDate_ != "")
            {
                this.EffectiveDate_ = StringConverter.xmlDateToDateTime(tsm.EffectiveDate_);
            }

            int stepMonth = Convert.ToInt32(this.CouponTenor_.Substring(0, this.CouponTenor_.Length - 1));

            int legCount = (12 / stepMonth) * Convert.ToInt32(this.Maturity_.Substring(0, this.Maturity_.Length - 1));

            double couponPerStep = (Convert.ToDouble(this.Coupon_) / 12) * Convert.ToDouble(stepMonth);

            for (int i = 0; i < legCount; i++)
            {
                Excel_stepDownKI_subScheduleViewModel data = new Excel_stepDownKI_subScheduleViewModel();

                data.Type_ = "AutoCall";
                //data.EventDate_ = this.scheduleGeneratorVM_.Dates_[i + 1];
                data.EventDate_ = this.effectiveDate_.AddMonths(stepMonth * (i + 1));

                data.UnderCalcType_ = "Minimum";
                data.AverageDays_ = "1";
                data.Coupon_ = (couponPerStep * (i + 1)).ToString();
                data.Trigger_ = tsm.TriggerList_[i];

                //try { data.Trigger_ = tsm.TriggerList_[i - 1]; }
                //catch (Exception) { }

                //double count_i = Convert.ToDouble(i);
                ////data.Coupon_ = (Convert.ToDouble(this.coupon_) * (count_i * couponMultiplier)).ToString();
                //double couponMultiplier = Convert.ToDouble(scheduleGeneratorVM_.FrequencyEnum_);
                //data.Coupon_ = (count_i * Convert.ToDouble(this.coupon_) / couponMultiplier).ToString();

                this.subScheduleDataList_.Add(data);
            }

            this.KiObStartDate_ = this.effectiveDate_;
            //this.KiObStartDate_ = this.subScheduleDataList_[0].EventDate_;
            this.KiObEndDate_ = this.subScheduleDataList_[this.subScheduleDataList_.Count - 1].EventDate_;
        }
        public void buildFromTradeString(TradeString tradeString)
        {
            this.excel_underlyingInfoViewModel_.Clear();

            DateTime effectiveDate = StringConverter.xmlDateToDateTime(tradeString.EffectiveDate_);

            foreach (var item in tradeString.UnderlyingList_)
	        {
                this.excel_underlyingInfoViewModel_.Add(Excel_loaderViewModel.loadUnderInfo(effectiveDate,item));

	        }
            
        }
 public override void scheduleDataGenerateFromProductStr(TradeString ts)
 {
     throw new NotImplementedException();
 }
Esempio n. 10
0
        public void addInstrument(TradeString tradeString)
        {
            Excel_instrument_hifiveViewModel e_inst_hifive_VM = new Excel_instrument_hifiveViewModel(true);

            e_inst_hifive_VM.bookingFromTradeString(tradeString);
        }
        public virtual void bookingFromTradeString(TradeString tradeString)
        { 
            // not implemeted , implement in derived class

            throw new NotImplementedException();

        }
 public abstract void buildFromTradeString(TradeString tradeString);
        //public abstract Excel_kiEventCalculationViewModel excel_kiEventCalculationVM();

        public abstract void scheduleDataGenerateFromProductStr(TradeString ts);
Esempio n. 14
0
 public abstract void buildFromTradeString(TradeString tradeString);
Esempio n. 15
0
        //public abstract Excel_kiEventCalculationViewModel excel_kiEventCalculationVM();

        public abstract void scheduleDataGenerateFromProductStr(TradeString ts);
Esempio n. 16
0
 public override void scheduleDataGenerateFromProductStr(TradeString ts)
 {
     throw new NotImplementedException();
 }
 public override void buildFromTradeString(TradeString tradeString)
 {
     throw new NotImplementedException();
 }
        public override void buildFromTradeString(TradeString tradeString)
        {
            string typeStr = tradeString.InstType_;

            //this.excel_issueInfoViewModel_.Notional_ = tradeString.Notional_;
            this.excel_issueInfoViewModel_.Notional_ = "10000";
            this.excel_issueInfoViewModel_.Currency_ = CurrencyViewModel.CreateCurrencyComboViewModel("KRW");

            this.excel_underlyingCalcInfoViewModel_.buildFromTradeString(tradeString);

            this.excel_hifive_subtypeViewModel_ = Excel_hifive_subtypeViewModel.CreateExcel_hifive_subtype(typeStr);

            this.excel_hifive_subtypeViewModel_.EffectiveDate_ = StringConverter.xmlDateToDateTime(tradeString.EffectiveDate_);

            this.excel_hifive_subtypeViewModel_.ProductString_ = tradeString.ProductString_;

            this.excel_hifive_subtypeViewModel_.scheduleDataGenerate();

            this.excel_hifive_subtypeViewModel_.Excel_underlyingCalcInfoViewModel_ 
                = this.Excel_underlyingCalcInfoViewModel_;

            //this.Excel_issueInfoViewModel_.EffectiveDate_ = this.excel_hifive_subtypeViewModel_.EffectiveDate_ = ;
            //this.excel_hifive_subtypeViewModel_.MaturityDate_ = this.Excel_issueInfoViewModel_.MaturityDate_;

            this.updateFromSubType(this.excel_hifive_subtypeViewModel_);
        }
 public override void buildFromTradeString(TradeString tradeString)
 {
     throw new NotImplementedException();
 }
Esempio n. 20
0
        public virtual void bookingFromTradeString(TradeString tradeString)
        {
            // not implemeted , implement in derived class

            throw new NotImplementedException();
        }