I'll start by prefacing this that running this simulator WILL not yield profitable results. That being said, I don't think it's impossible to get close with some hard work.
I've been working on this for a while, and have run out of steam, and time -- so I'm opening it up to the community here. It's not the best documented code, but if you spend some time you should be able to figure it out.
This started as a project for a class, and I've attached a presentation that I gave on the simulator -- including some pretty awful results it had.
In a nutshell, players.py models the players, and gets all the information from the database -- sim.py runs the simulation once, and game_backtester.py will run the simulations on every game in the season.
Code can be found here: http://github.com/ljump12/Baseball-Simulator/
I've been working on this for a while, and have run out of steam, and time -- so I'm opening it up to the community here. It's not the best documented code, but if you spend some time you should be able to figure it out.
This started as a project for a class, and I've attached a presentation that I gave on the simulator -- including some pretty awful results it had.
In a nutshell, players.py models the players, and gets all the information from the database -- sim.py runs the simulation once, and game_backtester.py will run the simulations on every game in the season.
Code can be found here: http://github.com/ljump12/Baseball-Simulator/