Ok, here's the formula that I got:

3_Year_Drawdown = DrawDown * sqrt(3_Years/Testperiod);

AR = 100 * 1_Year/Testperiod * (Win-Loss)/Max(Margin,3_Year_Drawdown);

The drawdown is assumed to be at least as high as the margin, otherwise a too small drawdown would cause unrealistic high returns.