I am trying to estimate a Markov-Switching model using statsmodels just like the example provided at https://www.statsmodels.org/devel/examples/notebooks/generated/markov_autoregression.html . I have daily EUR/USD returns with a total of 874 observations (frequency "B") including 37 missing values. So I try to exclude missing values using missing='drop' when specifying the model, which gives me a frequency mismatch error. off course, the missing values prevent the model from converging.
Any help on solving this error is much appreciated.
MS=sm.tsa.MarkovAutoregression(dta_MS, k_regimes=4, order=4 , switching_ar=False, freq="B", missing='drop')
so I face the following error:
ValueError: The given frequency argument could not be matched to the given index.
without excluding missing values, the model does not converge, even if I change the number of regimes or the number of ar lags.
LinAlgError: SVD did not converge