public decimal BackTest() { // for each instance that has a line #if DEBUG DataSet ds = tflWS.GetGames(2005, 13); #else DataSet ds = tflWS.GetAllGames(); #endif DataTable dt = ds.Tables["sched"]; foreach (DataRow dr in dt.Rows) { NFLGame game = new NFLGame(dr); NFLBet bet = IsBettable(game); if (bet != null) { switch (bet.Result()) { case "Win": M_wins++; break; case "Loss": Losses++; break; case "Push": Pushes++; break; } } } return(Utility.Clip(M_wins, Losses, Pushes)); }
public decimal BackTest() { // for each instance that has a line #if DEBUG var ds = TflWs.GetGames(2005, 13); #else DataSet ds = TflWs.GetAllGames(); #endif var dt = ds.Tables["sched"]; foreach (DataRow dr in dt.Rows) { var game = new NFLGame(dr); // TODO: cant do this for past games as the results are already built into the current ratings var bet = IsBettable(game); if (bet != null) { switch (bet.Result()) { case "Win": M_wins++; break; case "Loss": Losses++; break; case "Push": Pushes++; break; } } } //return DataLibrarian.Clip( M_wins, Losses, Pushes ); return(0.0M); }