}
DecimalFormat decimalFormat = new DecimalFormat("#.##");
List<UnsettledBet> unsettledBets = unsettledBetParser.parse(unsettledReader, true);
for (UnsettledBet unsettledBet : unsettledBets) {
Customer customer = getCustomer(customers, unsettledBet.getCustomerId());
double successRate = customer.getSuccessRate();
if (successRate > 0.6) {
unsettledBet.addRisk(RiskType.SUCCESS_RATE,
"Success rate: " + decimalFormat.format(successRate * 100) + "%");
}
double averageStake = customer.getAverageStake();
double stakeRatio = unsettledBet.getStake() / averageStake;
if (stakeRatio > 10) {
RiskType type = RiskType.STAKE_AVERAGE;
if (stakeRatio > 30) {
type = RiskType.STAKE_AVERAGE_HIGH;