using System;
using System.Collections.Generic;
using System.Text;
using MarketData.Utils;

namespace MarketData.Generator.MGSHMomentum
{
  public class MGSHMomentumCandidates : List<MGSHMomentumCandidate>
  {
    public MGSHMomentumCandidates()
    {
    }
    public MGSHMomentumCandidates(List<MGSHMomentumCandidate> momentumCandidates)
    {
      foreach(MGSHMomentumCandidate momentumCandidate in momentumCandidates)Add(momentumCandidate);
    }
  }
  public class MGSHMomentumCandidate
  {
    public String Symbol{get;set;}
    public DateTime AnalysisDate{get;set;}
    public double CumReturn252{get;set;}
    public int DayCount{get;set;}
    public double IDIndicator{get;set;}  // This is the IDIndicator methodology used for quality.  This is the default methodology
    public double Score{get;set;}        // This is the Score methodology used for quality.  This one is taken from Andreas Clenow Momentum
    public double PE{get;set;}
    public double Beta{get;set;}
    public double Velocity{get;set;}
    public long Volume{get;set;}
    public double Return1D{get;set;}
    public double SharpeRatio{get;set;}

    public static String Header()
    {
      StringBuilder sb=new StringBuilder();
      sb.Append("Symbol,AnalysisDate,Return,DayCount,IDIndicator,Score");
      return sb.ToString();
    }
    public override String ToString()
    {
      StringBuilder sb=new StringBuilder();
      sb.Append(Symbol).Append(",").
        Append(AnalysisDate).
        Append(",").
        Append(Utility.FormatPercent(CumReturn252)).
        Append(",").Append(DayCount).
        Append(",").
        Append(IDIndicator).
        Append(",").
        Append(Score).
        Append(",");
      return sb.ToString();
    }
  }
}
