/// <summary> /// Highest closing price of specified symbol in the past 6 months /// </summary> /// <param name="symbol"></param> /// <returns></returns> public static string HighestClosingPrice(string symbol) { List <Equity> lstEquity = Equity.GetEquityData(symbol, "full"); return(lstEquity.Where(i => i.Date >= (DateTime.Now.AddMonths(-6))).Select(i => i.CloseValue).Max().ToString()); }
/// <summary> /// Symbol with the largest return over the past month /// </summary> /// <param name="symbols"></param> /// <returns></returns> public static string LargestReturn(string symbols) { return(Equity.GetLargestReturn(symbols)); }
/// <summary> /// Average volume of specified symbol in the past 7 days /// </summary> /// <param name="symbol"></param> /// <returns></returns> public static string GetAverageVolume(string symbol) { List <Equity> lstEquity = Equity.GetEquityData(symbol); return(lstEquity.Where(i => i.Date >= (DateTime.Now.AddDays(-7))).Average(i => i.Volume).ToString()); }