Ejemplo n.º 1
0
        //public void setInstrumentList(ObservableCollection<Excel_instrumentViewModel> instList)
        //{
        //    // 로딩을 죄다 해야함.

        //    foreach (Excel_instrumentViewModel item in instList)
        //    {
        //        item.loadParameterFromXml();
        //    }

        //    // 기초자산을 추출해서 HedgeUnderlyingGreekPositionViewModel 를 만듬

        //    // 기초자산을 빼서 리스트를 만들어

        //    this.underlyingList_ = new List<string>();

        //    foreach (Excel_instrumentViewModel item in instList)
        //    {
        //        foreach (GreekPositionViewModel greekP in item.greekPosition())
        //        {
        //            if (!this.underlyingList_.Contains(greekP.Name_))
        //            {
        //                this.underlyingList_.Add(greekP.Name_);

        //                HedgeUnderlyingGreekPositionViewModel hugpvm
        //                    = new HedgeUnderlyingGreekPositionViewModel(greekP.Name_);

        //                hugpvm.addGreekPosition(greekP);

        //                this.hedgeUnderlyingGreekPositionViewModelList_.Add(hugpvm);
        //            }
        //            else
        //            {
        //                foreach (HedgeUnderlyingGreekPositionViewModel hedgeUnderItem in this.hedgeUnderlyingGreekPositionViewModelList_)
        //                {
        //                    if (hedgeUnderItem.UnderlyingName_ == greekP.Name_)
        //                    {
        //                        hedgeUnderItem.addGreekPosition(greekP);
        //                    }
        //                }
        //            }

        //        }

        //    }

        //    // InstUnderlyingStockGreekPositionViewModel 을 만들어서 각각에 박음

        //}

        public Control view()
        {
            Control v = new DeltaHedgeMonitorView();

            v.DataContext = this;

            return(v);
        }
        //public void setInstrumentList(ObservableCollection<Excel_instrumentViewModel> instList)
        //{
        //    // 로딩을 죄다 해야함.

        //    foreach (Excel_instrumentViewModel item in instList)
        //    {
        //        item.loadParameterFromXml();
        //    }

        //    // 기초자산을 추출해서 HedgeUnderlyingGreekPositionViewModel 를 만듬

        //    // 기초자산을 빼서 리스트를 만들어

        //    this.underlyingList_ = new List<string>();

        //    foreach (Excel_instrumentViewModel item in instList)
        //    {
        //        foreach (GreekPositionViewModel greekP in item.greekPosition())
        //        {
        //            if (!this.underlyingList_.Contains(greekP.Name_))
        //            {
        //                this.underlyingList_.Add(greekP.Name_);

        //                HedgeUnderlyingGreekPositionViewModel hugpvm
        //                    = new HedgeUnderlyingGreekPositionViewModel(greekP.Name_);

        //                hugpvm.addGreekPosition(greekP);

        //                this.hedgeUnderlyingGreekPositionViewModelList_.Add(hugpvm);
        //            }
        //            else 
        //            {
        //                foreach (HedgeUnderlyingGreekPositionViewModel hedgeUnderItem in this.hedgeUnderlyingGreekPositionViewModelList_)
        //                {
        //                    if (hedgeUnderItem.UnderlyingName_ == greekP.Name_)
        //                    {
        //                        hedgeUnderItem.addGreekPosition(greekP);
        //                    }
        //                }
        //            }

        //        }

        //    }

        //    // InstUnderlyingStockGreekPositionViewModel 을 만들어서 각각에 박음

        //}

        public Control view()
        {
            Control v = new DeltaHedgeMonitorView();

            v.DataContext = this;

            return v;
        }