A time series is as follows:
0.19
0.19
0.13
0.01
-0.03
-0.03
0.03
0.09
-0.13
-0.13
0.05
-0.03
0.03
0.09
-0.07
0.11
0.05
0.01
-0.05
-0.01
0.07
0.01
-0.15
-0.01
······
This time series has a total of 4032 values. The value space of these values has 115 ways a=[-0.49,-0.47,-0.45······1.75,1.77,1.79]. Now I want to find it out. I wrote a matlab program for this 115*115 state transition probability matrix, but there was a problem with the calculation. I would like to ask the experts what to do if I use Python. As a newbie, I only know how to use if statements to implement it, but In this case, we have to write 115 if statements. How can we do it more concisely? Thank you everyone
I’m not sure how the Markov chain is calculated. I guess it’s a state transfer. Let’s see if the following is useful.