# A Framework for Market State Prediction with Ontological Asset Selection: A Multimodal Approach
## 3 Theoretical Framework
### Stochastic Models and Non-Stationary Markov Chains  
Financial markets are naturally dynamic, shifting between different phases like \"bull markets\", where asset prices rise; \"bear markets\", characterized by falling prices; and \"neutral markets\", marked by stable price trends. These shifts are not predetermined but result from a complex mix of factors such as market sentiment, liquidity conditions, and macroeconomic events. To capture this complexity, we use a Non-Stationary Markov Chain (NMC) framework in which the transition probabilities between market states change dynamically over time. Unlike traditional Markov Chains with fixed probabilities, the NMC integrates external variables like the Sentiment Index (SI) and Illiquidity Index (ILLIQ), enabling it to adapt to shifting market conditions. This dynamic approach makes the NMC especially effective at representing the stochastic and evolving nature of financial markets. Additionally, financial markets frequently display complex dependencies and experience extreme events, particularly during times of economic shocks or crises. For instance, an abrupt increase in illiquidity can align with steep drops in asset prices, triggering a chain reaction of market stress. To effectively capture these interdependencies, we incorporate \(t\)-copulas into the NMC framework. \(t\)-copulas excel at modeling heavy-tailed distributions and asymmetric relationships that are prevalent in financial data but often neglected by conventional methods. This integration enables the model to not only monitor market dynamics but also predict extreme behaviors more accurately. \(t\)-copulas are superior because they effectively capture nonlinear dependencies and the simultaneous occurrence of extreme events typically linked to market stress. As shown in Figure 2, \(t\)-copulas surpass Gaussian copulas by accurately depicting tail dependencies and extreme co-movements, which is evident from the broader dispersion observed in the scatterplot. This improved capability allows for a more realistic and robust modeling of financial market dynamics, especially during periods of heightened uncertainty. To illustrate how these dependencies influence market state transitions, Figure 3 shows a heatmap of a dynamic transition matrix generated for \(SI=0.5\) and \(ILLIQ=0.3\). The darker colors in the heatmap indicate higher probabilities, highlighting the flexibility of the NMC framework in adapting to different market conditions. This combined approach leverages the strengths of Markov Chains in modeling temporal transitions and copulas in capturing complex dependency structures, providing a robust tool for predicting market behaviors under varying conditions. Stochastic models capture the probabilistic nature of financial market transitions. Let the market state \(S_{t}\) at time \(t\) be defined by a discrete random variable taking values in a finite set \(\{S_{1},S_{2},\ldots,S_{k}\}\). The transitions between states are governed by a Non-Stationary Markov Chain (NMC), where the transition probability matrix \(\textbf{P}(t)\) varies with time:  
Figure 3: Dynamic transition matrix generated for sentiment index \(SI=0.5\) and illiquidity index \(ILLIQ=0.3\). The heatmap illustrates the transition probabilities between market states, with darker colors indicating higher probabilities. Figure 2: Comparison of dependency structures modeled by \(t\)-copulas and Gaussian copulas. The \(t\)-copulas (**left**) capture heavy-tailed dependencies and simultaneous extreme events, while the Gaussian copulas (**right**) fail to represent such extremes effectively. \[P_{ij}(t)=\mathbb{P}(S_{t+1}=S_{j}\mid S_{t}=S_{i},\mathbf{X}(t)), \tag{3}\]  
with \(\mathbf{X}(t)\) representing exogenous inputs such as the Sentiment Index (SI) and Illiquidity Index (ILLIQ). The use of Non-Stationary Markov Chains allows for the modeling of dynamic transitions between market states, offering a flexible and probabilistic framework for financial market analysis, as highlighted by [PERSON] (1999) [19].