Testing strategy

How long shud you test your strategy before you can safely conclude that it can give profit year after year through different phases of market?