Add BetaCalc24. Fix some bugs

This commit is contained in:
2025-05-08 12:39:32 -04:00
parent 45f756e131
commit fbd3a081e0
5 changed files with 51 additions and 19 deletions

View File

@@ -330,9 +330,10 @@ namespace MarketData.Services
foreach(String symbol in symbols)
{
double betaCalc36=BetaGenerator.Beta(symbol,date,36);
double betaCalc24=BetaGenerator.Beta(symbol,date,24);
double betaCalc06=BetaGenerator.Beta(symbol,date,6);
if(double.IsNaN(betaCalc36) && double.IsNaN(betaCalc06))continue;
FundamentalDA.UpdateBeta(symbol, date, betaCalc36, betaCalc06);
if(double.IsNaN(betaCalc36) && double.IsNaN(betaCalc24) && double.IsNaN(betaCalc06))continue;
FundamentalDA.UpdateBeta(symbol, date, betaCalc36, betaCalc24, betaCalc06);
}
}
MDTrace.WriteLine($"Total took {profiler.End()} (ms)");