24 lines
807 B
C#
24 lines
807 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using MarketData.Utils;
|
|
|
|
namespace MarketData.MarketDataModel
|
|
{
|
|
public class ParityElement
|
|
{
|
|
public String Symbol { get; set; }
|
|
public DateTime PricingDate { get; set; }
|
|
public double ParityOffsetPrice { get; set; }
|
|
public double ParityOffsetPercent { get; set; } // This is not a percent it needs to be multiplied by 100 to be a percentage
|
|
public override String ToString()
|
|
{
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.Append("Even @").Append(Utility.FormatCurrency(ParityOffsetPrice)).Append(" (").Append(ParityOffsetPercent > 0 ? "+" : "").Append(Utility.FormatPercent(ParityOffsetPercent)).Append(")");
|
|
return sb.ToString();
|
|
}
|
|
}
|
|
}
|