ryankrumenacker / sports-betting-arbitrage-project

statistical-arbitrage-for-sports-betting
150 stars 63 forks source link

Parsing Events - list Index out of range #1

Open landybby opened 1 year ago

landybby commented 1 year ago

Hello,

when I run best_odds = event.find_best_odds(), I receive an error: list index out of range, which points to num_outcomes = len(self.data['bookmakers'][FIRST]['markets'][FIRST]['outcomes']). Any idea on how to fix this would be much appreciated :)!

BetAIbyBen commented 1 year ago

Hello,

when I run best_odds = event.find_best_odds(), I receive an error: list index out of range, which points to num_outcomes = len(self.data['bookmakers'][FIRST]['markets'][FIRST]['outcomes']). Any idea on how to fix this would be much appreciated :)!

happens to me too please help with that

BetAIbyBen commented 1 year ago

Hello,

when I run best_odds = event.find_best_odds(), I receive an error: list index out of range, which points to num_outcomes = len(self.data['bookmakers'][FIRST]['markets'][FIRST]['outcomes']). Any idea on how to fix this would be much appreciated :)!

did you end up fixing it???

einreke commented 1 year ago

Hello,

when I run best_odds = event.find_best_odds(), I receive an error: list index out of range, which points to num_outcomes = len(self.data['bookmakers'][FIRST]['markets'][FIRST]['outcomes']). Any idea on how to fix this would be much appreciated :)!

I also ran into this and have yet to find a fix

JainamAjmera commented 10 months ago

What I think is there is no arbitrage event . The best_odds returns: [['FanDuel', 'Stanford Cardinal', 25.0], ['DraftKings', 'USC Trojans', 1.02]] so it found two best odds then later its checks if it an arbitrage or not using the function: if event.arbitrage(): arbitrage_events.append(event) but arbitrage_events is empty so no profitable bets