Time Varying System Matrices in Kalman Filter Kalman filter can accommodate time varying system matrices. Equations to run the filter are the same and it preserves its optimality under linear gaussian model. 
My question is the following:
Can the evolution of time varying system matrices be stochastic? In some references I seem to read between the lines that they should evolve deterministically. Does it mean that the entire filter breaks or do we simply lose optimality by making them stochastic?
For reference, please peek at section 3.2 of the following paper:
http://www.ims.cuhk.edu.hk/~cis/2012.1/CIS%2012-1-05.pdf
A similar comment is in Harvey's book on Kalman Filter.
 A: If your dynamic system is 
$$ x_t = A_t x_{t-1} + \eta_t $$
$$ y_t = B_t x_t + \varepsilon_t $$
Then when people say system matrices $A_t, B_t$ should be deterministic, this means that Kalman Filter gives you an estimate of state $x_t$ conditional on past and current values of parameters $$\mathbf E\left(x_t|\,y_t,\dots,y_1, \,A_t,\dots,A_1, \,B_t, \dots, B_1\right).$$
So when you do a filtering step to estimate this conditional expectation of state, you consider those matrices to be already known (observed) rather than unknown and random. Of course they can be realizations of some external random process (which is often the case) or be deterministic functions of time - this doesn't matter much. 
What seems authors in above paper describe in 3.2 is an extension of KF when they assume $A_t, B_t$ to be random but they don't what to condition on their values when filtering. So they don't assume matrices to be known at the moment of filtering, but rather assume that they come from a distribution with known mean/variance.
A: 
Can the evolution of time varying system matrices be stochastic?

Yes. If your model is
$$ x_t = A_t x_{t-1} + \eta_t $$
$$ y_t = B_t x_t + \varepsilon_t $$
and you assume further that $A_t$ and $B_t$ are themselves latent Markov processes, then you might have a model amenable to particle filtering, and in particular Rao-Blackwellized or marginal particle filters. Using these, it will be possible to obtain sampling-based approximations to distributions of the form
$$
p(x_{t} \mid y_{1:t}),
$$
which would be considered a marginal of the filtering distribution. You wouldn't have to condition on unknown quantities such as $B_t$ or $A_t$.
I have some fast c++ code that will allow you to obtain the filtering distributions for models with pretty general dynamics on the "system matrices." Subclass rbpf_kalman with your own model, and all of the functionality is there ready to go.
