예제 #1
0
 /// <summary>
 /// Constructor with single currency.  The only constructor.
 /// </summary>
 /// <param name="currency"></param>
 protected ProductWrapper(Currency currency)
 {
     this.currency      = currency;
     indexAndDates      = new Dictionary <MarketObservable, List <Date> >();
     indexAndValues     = new Dictionary <MarketObservable, List <double> >();
     getIndexValueToUse = GetNormal;
 }
예제 #2
0
 protected ProductWrapper()
 {
     indexAndDates      = new Dictionary <MarketObservable, List <Date> >();
     indexAndValues     = new Dictionary <MarketObservable, List <double> >();
     getIndexValueToUse = new GetIndexValueDelegate(GetNormal);
     Init();
 }
예제 #3
0
        /// <summary>
        /// Uses the overload <see cref="Product.GetCFs"/> to work out which <see cref="MarketObservable"/>s
        /// are required and at which times the cashflows take place.  All the MarketObservable values
        /// are set to 0.1 so the getCFs method must work fine for this value even if it is unnatural.
        /// </summary>
        protected void Init()
        {
            getIndexValueToUse = new GetIndexValueDelegate(GetWithLogging);
            List <Cashflow> cfs = GetCFs();

            SetCashflowDates(cfs.GetDates());
            getIndexValueToUse = new GetIndexValueDelegate(GetNormal);
            currency           = cfs[0].currency;
        }
예제 #4
0
        /// <summary>
        /// Uses the overload <see cref="Product.GetCFs"/> to work out which <see cref="MarketObservable"/>s
        /// are required and at which times the cashflows take place.  All the MarketObservable values
        /// are set to 0.1 so the getCFs method must work fine for this value even if it is unnatural.
        /// </summary>
        protected void Init()
        {
            indexAndDates      = new Dictionary <MarketObservable, List <Date> >();
            indexAndValues     = new Dictionary <MarketObservable, List <double> >();
            getIndexValueToUse = GetNormal;
            getIndexValueToUse = GetWithLogging;
            var cfs = GetCFs();

            SetCashflowDates(cfs.GetDates());
            getIndexValueToUse = GetNormal;
            currency           = cfs[0].Currency;
        }
예제 #5
0
 protected ProductWrapper()
 {
     _indexAndDates      = new Dictionary <MarketObservable, List <Date> >();
     _indexAndValues     = new Dictionary <MarketObservable, List <double> >();
     _getIndexValueToUse = GetNormal;
 }