private Member _allocateRapporteur(Member chair) { Member rapporteur = _getMemberWithFewestAllocations(Technicals.Where(x => x != chair)); _allocationCount[rapporteur]++; return(rapporteur); }
internal void CreateMonthly(Construct wts_, Technicals.ProductBase[] products_) { List<DateTime> dates = new List<DateTime>(); List<double> vals = new List<double>(); int countOfZerosThisMonth = 0; int numberOfRebalsThisMomth = 0; int currentMonth = 0; int currentYear = 0; for (int i = 0; i < wts_.Dates.Count; ++i) { if (wts_.Dates[i].Year != currentYear || wts_.Dates[i].Month != currentMonth) { if (currentMonth != 0) { dates.Add(new DateTime(currentYear, currentMonth, 1)); vals.Add(Convert.ToDouble(countOfZerosThisMonth) / Convert.ToDouble(numberOfRebalsThisMomth)); } countOfZerosThisMonth = 0; numberOfRebalsThisMomth = 0; } double[] weightsThisRebal = wts_.GetValues(wts_.Dates[i]); for(int y=0;y<weightsThisRebal.Length;++y) if (weightsThisRebal[y] == 0.0 && products_[y].IsValid(wts_.Dates[i])) ++countOfZerosThisMonth; ++numberOfRebalsThisMomth; currentMonth = wts_.Dates[i].Month; currentYear = wts_.Dates[i].Year; } dates.Add(new DateTime(currentYear, currentMonth, 1)); vals.Add(Convert.ToDouble(countOfZerosThisMonth) / Convert.ToDouble(numberOfRebalsThisMomth)); foreach (DateTime date in dates) dt.Columns.Add(date.ToString("MMM yy"), typeof(double)); DataRow row = dt.NewRow(); for (int i = 0; i < vals.Count; ++i) row[i] = vals[i]; dt.Rows.Add(row); Chart.DataSource = dt; }
internal void CreateWeekly(Construct wts_, Technicals.ProductBase[] products_) { int lastDay = (int)DayOfWeek.Sunday; int countThisWeek = 0; List<DateTime> dates = new List<DateTime>(); List<int> values = new List<int>(); DateTime firsInWeek = wts_.Dates[0]; for (int i = 0; i < wts_.Dates.Count; ++i) { DateTime rebalDate = wts_.Dates[i]; int dayIndex = (int)rebalDate.DayOfWeek; if (dayIndex > lastDay) { ++countThisWeek; lastDay = dayIndex; } else { dates.Add(firsInWeek); values.Add(countThisWeek); countThisWeek = 1; firsInWeek = rebalDate; lastDay = dayIndex; } } // last one won't have been added to the list dates.Add(firsInWeek); values.Add(countThisWeek); foreach (DateTime date in dates) dt.Columns.Add(date.ToString("MMM yy"), typeof(double)); DataRow row = dt.NewRow(); for (int i = 0; i < values.Count; ++i) row[i] = values[i]; dt.Rows.Add(row); Chart.DataSource = dt; }
private bool _isTechnicalMember(Member member) { return((member == Chair) ? _chairIsTechnical() : Technicals.Contains(member)); }
internal void Bind(Technicals.MACDArgs args_) { tbFast.Bind(args_, "Fast", new Validators.IntValidator(null)); tbSlow.Bind(args_, "Slow", new Validators.IntValidator(null)); tbSignal.Bind(args_, "Signal", new Validators.IntValidator(null)); }
public void Bind(Technicals.RSIArgs args_) { tbWindow.Bind(args_, "WindowLength", new Validators.IntValidator(null)); tbUpper.Bind(args_, "Upper", new Validators.DoubleValidator("##0.0")); tbLower.Bind(args_, "Lower", new Validators.DoubleValidator("##0.0")); }
internal void Bind(Technicals.ADXArgs args_) { tbFast.Bind(args_, "WindowLength", new Validators.IntValidator(null)); tbThreshold.Bind(args_, "Threshold", new Validators.DoubleValidator("#0.0")); }