Analyzing market regimes