public LevelsStructure(string name_, IEnumerable<IWeightedLevelsForFocus> comps_, Focus initialFocus_, bool resultIsVolatile_)
 {
   Focus = initialFocus_;
   m_components = new List<IWeightedLevelsForFocus>(comps_);
   ResultIsVolatile = resultIsVolatile_;
   Name = new TextSortableByDate(name_);
 }
Example #2
0
    public CMTStructure(Focus focus_, CMTStructureDefinition definition_)
      :base(definition_.Points.Select(x=>x.Market).Select(mkt=>CountryBondSource.GetInstance(mkt).GetSmoothCurveGroupForFocus(focus_).LiveCMT) )
    {
      Definition = definition_;
      Focus = focus_;

      m_name = new TextSortableByDate(definition_.Description);

      m_lines =
        definition_.Points.Select(x => CountryBondSource.GetInstance(x.Market).GetSmoothCurveGroupForFocus(focus_).LiveCMT)
          .ToArray();

      // might need to change this later to cater for 'n' day change
      if (Levels != null && Levels.Length > 0)
        m_priorValue = Levels.LastDataValue;
    }
 public WeightedLevelsImpl(string name_, double weight_, Func<Focus, DatedDataCollectionGen<double>> levelsFunc_ )
 {
   m_func = levelsFunc_;
   Weight = weight_;
   Name = new TextSortableByDate(name_);
 }