I want to optimize a portfolio based on regime switching model. Before optimization i need to detect the hidden regimes in the data. Let us suppose i want to start my analysis with GDP. What i want is to know the steps that are involved in identifying the regimes in a variable. There are many packages which do it.
The first step is to download data for GDP. Then how should i proceed to detect the regimes. I will appreciate if some one just list the steps. For now i am not interested in the model or calculation. I just need to know what are the general steps in detecting the regimes in a variable.