Does a basic (money losing) analysis
Updated to be more algorithm flexible