コード例 #1
0
ファイル: CrossMarket.cs プロジェクト: heimanhon/researchwork
    private CMTLineDiff getSpreadObject()
    {
      if (m_cmtSpread == null)
      {
        m_cmtSpread = new CMTLineDiff(
  CountryBondSource.GetInstance(m_source.Primary).GetSmoothCurveGroupForFocus(m_source.Focus).LiveCMT,
  CountryBondSource.GetInstance(m_source.Secondary).GetSmoothCurveGroupForFocus(m_source.Focus).LiveCMT);
      }

      return m_cmtSpread;
    }
コード例 #2
0
ファイル: CMTHelper.cs プロジェクト: heimanhon/researchwork
    public static CMTLine GetCMTSpreadLiveDiff(BondMarket market1_, BondMarket market2_, Focus focus_)
    {
      var key = getSpreadLineKey(market1_, market2_, focus_);

      if (_spreadLineCache.ContainsKey(key))
        return _spreadLineCache[key];

      var diff = new CMTLineDiff(
        CountryBondSource.GetInstance(market1_).GetSmoothCurveGroupForFocus(focus_).LiveCMT,
        CountryBondSource.GetInstance(market2_).GetSmoothCurveGroupForFocus(focus_).LiveCMT);

      _spreadLineCache[key] = diff;

      return diff;
    }
コード例 #3
0
    private void rebuildBinding()
    {
      if (m_line != null) m_line.Dispose();

      var source1 =
        CountryBondSource.GetInstance(m_args.Market1)
          .GetSmoothCurveGroupForFocus(m_args.Focus)
          .CMTDiff;

      var source2 =
        CountryBondSource.GetInstance(m_args.Market2)
        .GetSmoothCurveGroupForFocus(m_args.Focus)
        .CMTDiff;

      m_line = new CMTLineDiff(source1, source2);

      simpleWtsColumnChart1.Create<CMTLineDiff>(
        source_: m_line,
        headings_: CMTLine.AllPoints.Select(x => x.ToString()).ToArray(),
        valueFields_: CMTLine.AllPoints.Select(x => string.Format("Y{0}", x)).ToArray(),
        yLabelFormat_: "##0.0##",
        desc_: "blah"
        );
    }