I am new to machine learning, in the past I have worked with time series techniques.
I have a database composed by the financial time series of SPX, its Exponential Moving average 20days, BBB corporate bonds yields, copper/gold ratio.
I am trying to label SPX in 5 different regimes (i.e. labs are from 1 to 5 equal to the Markov regime in which SPX is found). My idea is to perform a first labeling through Markov switching models, to then apply some supervised learning methods for classification.
The code I am using in R is the following (library MSwM):
step.model <- lm(SPX ~ EMA20 + BBB_EY + metal_ratio, data = t1) summary(step.model) library(MSwM) msm.model <- msmFit(step.model, k = 5, sw = rep(TRUE,4)) summary(msm.model)
Related to this I have 2 main questions:
Is performing the first labeling through a Markov Switching model a good idea? Which other model would be also fit for a first labeling of data? Does using two different models for first labeling and successive online classification forecasting cause any issue?
The library MSwM provides me with a probability transition matrix and estimation coefficients for each regimes. Any idea how can I go from this to labeling each day of observation?