예제 #1
0
        private static Instrument createinstrument(int id, string name, decimal px, string localiso, CurrencyInfo reportingCurrencyInfo, FXCollection fxs)
        {
            CurrencyInfo localcurrencyinfo = CurrencyInfoCollection.GetCurrencyInfo(localiso);
            FX           fx         = fxs.GetFX(reportingCurrencyInfo, localcurrencyinfo);
            Price        price      = new Price(px, localcurrencyinfo);
            Instrument   instrument = new Instrument(id, name, DateTime.Now.Date, DateTime.Now.Date, fx, reportingCurrencyInfo, price);

            return(instrument);
        }
예제 #2
0
        //private int v1;
        //private string v2;

        //public Instrument(decimal localValue, string localiso, decimal reportingValue, string reportingiso, FX pricefx            )
        //{
        //ReportingPrice = new FinancialTypes.Price(reportingValue, reportingiso);
        //LocalPrice = new Price(localValue, localiso);
        //}

        //public Instrument(decimal value, string iso) : this(value, iso, value, iso)
        //{ }

        public Instrument(int id, string name, DateTime valuationDate, DateTime valuationDateProxy, FX priceFX, CurrencyInfo reportingCurrency, Price localPrice)
        {
            ID                 = id;
            Name               = name;
            ValuationDate      = valuationDate;
            ValuationDateProxy = valuationDateProxy;
            LocalPrice         = localPrice;
            PriceFX            = priceFX;
            ReportingCurrency  = reportingCurrency;
        }