Initial Commit
This commit is contained in:
37
MarketData/MarketDataLib/MarketDataModel/DividendLoad.cs
Executable file
37
MarketData/MarketDataLib/MarketDataModel/DividendLoad.cs
Executable file
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MarketData.Utils;
|
||||
using MarketData.Numerical;
|
||||
|
||||
namespace MarketData.MarketDataModel
|
||||
{
|
||||
public class DividendLoadCollection : List<DividendLoadElement>
|
||||
{
|
||||
public DividendLoadCollection()
|
||||
{
|
||||
}
|
||||
public DividendLoadCollection(List<DividendLoadElement> elements)
|
||||
{
|
||||
foreach(DividendLoadElement dividendLoadElement in elements)Add(dividendLoadElement);
|
||||
}
|
||||
//public DividendLoadCollection RemoveOutliers(int standardDeviations=4)
|
||||
//{
|
||||
// double[] values = (from DividendLoadElement element in this select element.DividendLoadPcnt).ToArray();
|
||||
// double valuesStd=Numerics.Volatility(ref values)*standardDeviations;
|
||||
// DividendLoadCollection dividendLoadCollection=new DividendLoadCollection((from DividendLoadElement element in this where element.DividendLoadPcnt <=valuesStd select element).ToList());
|
||||
// if(0==dividendLoadCollection.Count)return this;
|
||||
// else return dividendLoadCollection;
|
||||
//}
|
||||
}
|
||||
public class DividendLoadElement
|
||||
{
|
||||
public String Symbol{get;set;}
|
||||
public int Year{get;set;}
|
||||
public double EPS{get;set;}
|
||||
public double CashAmount{get;set;}
|
||||
public int Payments{get;set;}
|
||||
public double DividendLoadPcnt{get;set;}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user