3 ms·
Oh well, time to burn some hard earned karma :) I am currently teaching myself Python, going through the "Learn Python the Hard Way" book. About half way throu
by nekopa 11y ago
Oh well, time to burn some hard earned karma :)
I am currently teaching myself Python, going through the "Learn Python the Hard Way" book. About half way through I wanted to work on a real project, to get a feel for the limitations of the language, find the best resources etc.
I decided to make a football (soccer to my fellow Americans :) betting analyzer. It came to me after seeing a comment on HN from one user whose side income comes from a site he runs giving betting tips. After visiting his site, I read one of his betting strategies and decided it was something that could easily be automated with a Python script. Also, because I hate football with a passion, I saw it as something which would force me to use the data, strategy, analysis and empirical results instead of my "intuition"
Wow, what a rabbit hole I dived into. As a learning experience, I have to say it has been very enlightening. I've learned about:
-the awesomeness of iPython for "code brainstorming"
-the messiness and unreliability of web scraping. $DIETY bless try: except
-the absolute horror of dealing with unicode and names like D'Angelo in csv files.
-the joy of getting to experiment with Big Data! (19 million football matches in 1 year!)
-the deeper joy of bug hunting (hint: variable in the wrong part of an additive loop and 100K matches turn into 19 million)
-the ins and outs of various data structures.
-the pain of dumping MySQL for postgresql (only because I was trying -get this- to get postgres running under vagrant and accessing it via a Windows based graphic frontend)
And that is just the programming side.
On the motivational side, I though it would be a good idea to "dog-food" my software. So I started to wager real cash on the predictions my system was throwing up. Dog-food and throw up are a quite acceptable description of results to date. (BTW, for anyone worrying, I had a gambling problem as a teen which I licked, and I have kept to my original $100 bank to use, which is now down to about $20, was up to $150 at one point, but as another commenter said, a lot of gamblers only seem to remember the wins they have, not the re-buy-ins. Part of my system involves bankroll management, which includes cash-flow, PnL and other measures.)
But as this is HN I do have a startup idea!!!
I have already bought the domain betopian.com. I reached out the the CTO of quantopian.com as I want to make something similar. (He was gracious enough to reply, thanks Jean!) The reason for this is that as part of my research into betting strategies, I found a common theme: nobody backtests their strategies. In fact, quite a few times I have seen people berated for wanting to backtest because... reasons. Some of these reasons seem quite reasonable - eg you need domain knowledge not just data.
For me though, it seems the biggest reason for not backtesting is that the multitude of "strategies" fail, and testing would show that. But a lot of betting strategies rely on a "feel" for the bet. If it fails, "Oh, unlucky" if it wins "Solid strategy dude!!" I would like to create a place where people would have to prove that their strategy is just that - a thought out, long term plan of attack on how to bet on a sport.
Because I think that is what drives a gambling addiction - losses are just plain bad luck and wins are solid logical thinking.
Secondly, as I have seen through my 'experiment' gambling isn't just luck. If it was, we wouldn't expect to see gambling companies being so profitable. When you find the sure winners, you find you can't bet on them. The bookies spend money on their own form of "betopian" I think. Or basically raw math talent who really understand probability theory.
So I dream (and I have nowhere near the technical ability to make it happen - yet) of betopian.com being a site where gamblers can have their dreams safely dashed, and maybe open their eyes to the reality of the betting world. It's stacked against you in ways you cannot imagine.
I'd be interested in your thoughts on this idea.
[edit: formatting]