Пример #1
0
    internal void Create(SignalWrapperFX wl_)
    {
      var wts = wl_.LoadedWeights;

      if(wts==null)return;


      simpleWtsColumnChart1.Create(Singleton<FXIDs>.Instance.ColumnHeadings, wts);

      if(wl_.MarkDate.HasValue==false)return;

      lblWtsHeading.Text = string.Format("Weights for '{0}'  @  {1}", wl_.Signal.Name, wl_.MarkDate.Value.ToString("dd-MMM-yyyy"));

      var cov = Singleton<CovarianceSource>.Instance.GetCovarianceForDateElesePrevious(wl_.MarkDate.Value);

      if(cov==null)return;

      var contToVar = cov.GetContToVar(wts);

      simpleWtsColumnChart2.Create(Singleton<FXIDs>.Instance.ColumnHeadings, contToVar);

      var targetVol = cov.GetVol(wts);

      lblTargetVol.Text = string.Format("TargetVol={0}", targetVol.ToString("##0.0#%"));
    }
Пример #2
0
    internal void Create(SignalWrapperFX portfolio_)
    {
      clearUp();

      var list = portfolio_.LivePortfolio.Positions.Where(x => Math.Abs(x.Wt) > 0.000001).ToList();

      base.Create(list.Select(x => x.Security).ToArray(), list.Select(x => x.Pnl).ToArray());

      for (int i = 0; i < list.Count; ++i)
        m_updaters.Add(new updater(list[i], dt.Rows[0], i));

      SetXAxisExtent(40);
      SetYAxisFormat("###0.0");
    }