Under a hidden markov model (HMM) we know that
\begin{align*} p(\epsilon_1,\ldots,\epsilon_N,\Delta_1,\ldots,\Delta_N)=&p(\epsilon_1,\ldots,\epsilon_N\mid\Delta_1,\ldots,\Delta_N)p(\Delta_1,\ldots,\Delta_N) \\=&p(\epsilon_1,\ldots,\epsilon_N\mid\Delta_1,\ldots,\Delta_N)\cdot \\&(p(\Delta_1)p(\Delta_2\mid\Delta_1)\ldots p(\Delta_N\mid \Delta_{N-1}) \\=&p(\epsilon_1\mid\Delta_1,\ldots,\Delta_N)\ldots p(\epsilon_N\mid\Delta_1,\ldots,\Delta_N)\cdot \\&(p(\Delta_1)p(\Delta_2\mid\Delta_1)\ldots p(\Delta_N\mid \Delta_{N-1}) \\=&(p(\epsilon_1\mid\Delta_1)\ldots p(\epsilon_N\mid\Delta_N))\cdot \\&(p(\Delta_1)p(\Delta_2\mid\Delta_1)\ldots p(\Delta_N\mid \Delta_{N-1}) \\=&p(\Delta_1)p(\epsilon_1\mid\Delta_1)\prod_{n=2}^N p(\Delta_n\mid\Delta_{n-1})p(\epsilon_n\mid\Delta_{n})\,, \end{align*} where $\left\{\Delta_n\right\}$ is an underlying Markov chain defined on the state space $S$ and $\left\{\epsilon_n\right\}$ is a sequence of independent random variables, where the conditional distribution of $\epsilon_n$ depends on $\Delta_n$.
Now the Markov switching model is a generalisation of the HMM where the dependence structure changes to allow dependence between the $\epsilon_n$. How can I derive the joint distribution in order to get a probabilistic relationship, as I am not finding any text which gives a formal definition.
First, I think you meant \begin{equation} \mathbb{P}(\epsilon_1, \ldots, \epsilon_N, \Delta_1, \ldots, \Delta_N) = \mathbb{P}(\Delta_1) \mathbb{P}(\epsilon_1\,|\,\Delta_1) \prod_{n = \color{red}{2}}^N \color{red}{\bigl(}\mathbb{P}(\Delta_n\,|\,\Delta_{n-1}) \mathbb{P}(\epsilon_{\color{red}{n}}\,|\,\Delta_{\color{red}{n}})\color{red}{\bigr)}. \end{equation}
As far as I understand it, “allow for dependence between the $\epsilon_n$” means to consider the model \begin{equation} \mathbb{P}(\epsilon_1, \ldots, \epsilon_N, \Delta_1, \ldots, \Delta_N) = \mathbb{P}(\Delta_1) \mathbb{P}(\epsilon_1\,|\,\Delta_1) \prod_{n = 2}^N \bigl(\mathbb{P}(\Delta_n\,|\,\Delta_{n-1}) \mathbb{P}(\epsilon_n\,|\,\Delta_n\color{blue}{, \epsilon_{n - 1}})\bigr). \end{equation}
Regards, /Nancy-N