public HistoricalUnAllocatedPnl(CarbonClient cc_, PerfRow row_) : base( cc_: cc_, text_: string.Format("{0} unallocated pnl", row_.Underlying.RootName), row_: row_) { Image = DashboardResources.moneyBlack; DisplayStyle = ToolStripItemDisplayStyle.ImageAndText; }
protected ContextMenuItemBase( CarbonClient cc_, string text_, PerfRow row_) { Text = text_; Row = row_; CarbonClient = cc_; Click += handleClick; }
public PerfRowCellClickedEventArgs(PerfRowCol col_, PerfRow row_) { Row = row_; Col = col_; }
public HistoricalWeights(CarbonClient client_, PerfRow row_) : base(client_,string.Format("{0} unallocated weights",row_.Underlying.RootName),row_) { }
private async Task addPortfolio(Portfolio parentPortfolio_, Portfolio newPortfolio_, bool isInitialLoad_) { var newchildPerfRow = new PerfRow { Underlying = newPortfolio_, Portfolio = newPortfolio_.RootName, Weight = 1d }; OnProgressUpdated(new ReportProgressArgs(string.Format("Adding {0}...",newPortfolio_.RootName))); m_mapOfRowsFromPortfolios.Add(newPortfolio_.RootName, newchildPerfRow); subscribeToPortfolio(newPortfolio_); if (parentPortfolio_ != null) { var parentPerfRow = m_mapOfRowsFromPortfolios[parentPortfolio_.RootName]; parentPerfRow.Rows.Add(newchildPerfRow); newchildPerfRow.Portfolio = newPortfolio_.RootName.Split('.').Last(); var alloc = await parentPerfRow.Underlying.GetAllocationTo(newchildPerfRow.Portfolio, m_cc); newchildPerfRow.Weight = alloc == null ? 0d : alloc.ValueOnDate(DateTime.Today); } else { m_gridList.Add(newchildPerfRow); } if (isInitialLoad_) Grid.Rows.ExpandAll(true); await newchildPerfRow.PopulateFromUnderlying(m_cc); OnProgressUpdated(new ReportProgressArgs(string.Empty)); }
private void firePublishAll(PerfRow row_) { row_.FireAllUpdated(); foreach (var r in row_.Rows) firePublishAll(r); }
private void reloadPerf() { List<int> selected = new List<int>(getSelectedIndixes()); m_perfRows.Clear(); for (int i = 0; i < m_comp.Evals.Count; ++i) { PerfRow pfr = new PerfRow(m_comp.Evals[i].Name, i); if (selected != null && selected.Count > 0 && selected.Contains(i) == false) pfr.Selected = false; m_perfRows.Add(pfr); } double[] vals; vals = m_comp.GetStats(SI.ReturnsEval.EvalComparer.TDType.OneDay); for (int i = 0; i < vals.Length; ++i) m_perfRows[i].Perf1Day = vals[i]; vals = m_comp.GetStats(SI.ReturnsEval.EvalComparer.TDType.WeekToDate); for (int i = 0; i < vals.Length; ++i) m_perfRows[i].PerfWTD = vals[i]; vals = m_comp.GetStats(SI.ReturnsEval.EvalComparer.TDType.MonthToDate); for (int i = 0; i < vals.Length; ++i) m_perfRows[i].PerfMTD = vals[i]; vals = m_comp.GetStats(SI.ReturnsEval.EvalComparer.TDType.QuarterToDate); for (int i = 0; i < vals.Length; ++i) m_perfRows[i].PerfQTD = vals[i]; vals = m_comp.GetStats(SI.ReturnsEval.EvalComparer.TDType.YearToDate); for (int i = 0; i < vals.Length; ++i) m_perfRows[i].PerfYTD = vals[i]; vals = m_comp.GetStats(SI.ReturnsEval.EvalComparer.TDType.Inception); for (int i = 0; i < vals.Length; ++i) m_perfRows[i].PerfInception = vals[i]; vals = m_comp.GetStats(SI.ReturnsEval.EvalComparer.TDType.CustomToDate); for (int i = 0; i < vals.Length; ++i) m_perfRows[i].PerfCTD = vals[i]; ReturnsEval.EvalComparer.RetVolSharpe[] vals2 = null; if ((vals2 = m_comp.GetStats(m_extraArgs.RetVolSharpeWindowLength,cbAnnualiseRVS.Checked)) != null) for (int i = 0; i < vals2.Length; ++i) m_perfRows[i].RVS_21 = vals2[i]; for (int i = 0; i < vals.Length; ++i) m_perfRows[i].InceptionDate = m_comp.GetEval(i).MinDate; vals = m_comp.GetStats(SI.ReturnsEval.EvalComparer.TDType.OneYear); for (int i = 0; i < vals.Length; ++i) m_perfRows[i].PerfOneYear = vals[i]; vals = m_comp.GetStats(SI.ReturnsEval.EvalComparer.TDType.TwoYear); for (int i = 0; i < vals.Length; ++i) m_perfRows[i].PerfTwoYear = vals[i]; gridPerf.Grid.DataBind(); }