Files
TradeBlotter/Model/EarningsAnnouncementModel.cs
2024-02-23 06:58:53 -05:00

50 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MarketData.MarketDataModel;
using MarketData.Utils;
namespace TradeBlotter.Model
{
public class EarningsAnnouncementModel : IComparable
{
public EarningsAnnouncementModel()
{
}
public EarningsAnnouncementModel(String symbol,DateTime nextEarningsDate)
{
Symbol = symbol;
NextEarningsDate = nextEarningsDate;
}
public int CompareTo(object other)
{
if (other.GetType() != typeof(EarningsAnnouncementModel)) throw new Exception("Expected typeof " + this.GetType().Name);
EarningsAnnouncementModel otherModel = (EarningsAnnouncementModel)other;
return NextEarningsDate.CompareTo(otherModel.NextEarningsDate);
}
public String Symbol { get; set; }
public String CompanyName { get; set; }
public DateTime NextEarningsDate { get; set; }
public int DaysFromToday { get; set; }
public double LastPrice { get; set; }
public double Upside { get; set; }
public double Downside { get; set; }
public double UpsidePcnt { get; set; }
public double DownsidePcnt { get; set; }
public DateTime PricingDate { get; set; }
public double PE { get; set; }
public double PEG { get; set; }
public double AnticipatedEarningsGrowth { get; set; }
public String AnticipatedEarningsGrowthStr
{
get
{
if (double.IsInfinity(AnticipatedEarningsGrowth) || double.NaN.Equals(AnticipatedEarningsGrowth)) return Constants.CONST_DASHES;
return Utility.FormatPercent(AnticipatedEarningsGrowth);
}
}
public String PEGValuation { get; set; }
public DateTime LastUpdated { get; set; }
}
}