47 lines
1.8 KiB
C#
Executable File
47 lines
1.8 KiB
C#
Executable File
using System.Text;
|
|
using MarketData.Utils;
|
|
|
|
namespace MarketData.Generator.Momentum
|
|
{
|
|
public class MomentumCandidates : List<MomentumCandidate>
|
|
{
|
|
public MomentumCandidates()
|
|
{
|
|
}
|
|
public MomentumCandidates(List<MomentumCandidate> momentumCandidates)
|
|
{
|
|
foreach(MomentumCandidate momentumCandidate in momentumCandidates)Add(momentumCandidate);
|
|
}
|
|
}
|
|
public class MomentumCandidate
|
|
{
|
|
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 MaxDrawdown{get;set;}
|
|
public double MaxUpside{get;set;}
|
|
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 String ZacksRank{get;set;}
|
|
|
|
public static String Header()
|
|
{
|
|
StringBuilder sb=new StringBuilder();
|
|
sb.Append("Symbol,AnalysisDate,Return,DayCount,IDIndicator,Score,MaxDrawdown,MaxUpside");
|
|
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(","). Append(Utility.FormatPercent(MaxDrawdown)).Append(",").Append(Utility.FormatPercent(MaxUpside));
|
|
return sb.ToString();
|
|
}
|
|
}
|
|
}
|