Updates to support calculated betas in the fundamental feed.

This commit is contained in:
2025-05-06 19:07:18 -04:00
parent 664a3f3271
commit 59ba764ae2
8 changed files with 259 additions and 128 deletions

View File

@@ -0,0 +1,76 @@
using System;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Text;
using MarketData.Utils;
namespace MarketData.MarketDataModel
{
public class FundamentalsV2 : Dictionary<String,FundamentalV2>
{
public FundamentalsV2()
{
}
}
public class FundamentalV2
{
private String symbol;
private DateTime asOf;
private double marketCap;
private double pe;
private double ebitda;
private double revenuePerShare;
private double beta;
private double betaCalc36;
private double betaCalc06;
public FundamentalV2()
{
}
public String Symbol
{
get { return symbol; }
set { symbol = value; }
}
public DateTime AsOf
{
get { return asOf; }
set { asOf = value; }
}
public double MarketCap
{
get { return marketCap; }
set { marketCap = value; }
}
public double PE
{
get { return pe; }
set { pe = value; }
}
public double RevenuePerShare
{
get { return revenuePerShare; }
set { revenuePerShare = value; }
}
public double EBITDA
{
get { return ebitda; }
set { ebitda = value; }
}
public double Beta
{
get { return beta; }
set { beta = value; }
}
public double BetaCalc36
{
get { return betaCalc36; }
set { betaCalc36 = value; }
}
public double BetaCalc06
{
get { return betaCalc06; }
set { betaCalc06 = value; }
}
}
}

View File

@@ -18,6 +18,8 @@ namespace MarketData.MarketDataModel
private DateTime asOf;
private DateTime nextEarningsDate;
private double beta;
private double betaCalc36;
private double betaCalc06;
private double low52;
private double high52;
private Int64 volume;
@@ -74,6 +76,16 @@ namespace MarketData.MarketDataModel
get { return beta; }
set { beta = value; }
}
public double BetaCalc36
{
get { return betaCalc36; }
set { betaCalc36 = value; }
}
public double BetaCalc06
{
get { return betaCalc06; }
set { betaCalc06 = value; }
}
public double Low52
{
get { return low52; }
@@ -329,6 +341,8 @@ namespace MarketData.MarketDataModel
sb.Append("Source,");
sb.Append("NextEarningsDate").Append(",");
sb.Append("Beta").Append(",");
sb.Append("BetaCalc36").Append(",");
sb.Append("BetaCalc06").Append(",");
sb.Append("Low52").Append(",");
sb.Append("High52").Append(",");
sb.Append("Volume").Append(",");
@@ -366,6 +380,8 @@ namespace MarketData.MarketDataModel
sb.Append(null == Source ? "" : Source).Append(",");
sb.Append(Utility.DateTimeToStringMMSDDSYYYY(NextEarningsDate)).Append(",");
sb.Append(String.Format("{0:0.00}",Beta )).Append(",");
sb.Append(String.Format("{0:0.00}",BetaCalc36 )).Append(",");
sb.Append(String.Format("{0:0.00}",BetaCalc06 )).Append(",");
sb.Append(String.Format("{0:0.00}",Low52)).Append(",");
sb.Append(String.Format("{0:0.00}",High52)).Append(",");
sb.Append(String.Format("{0:0.00}", Volume)).Append(",");