Let $\Sigma$ be a finite set of cardinality $|\Sigma |$ and $$\Pi = \{ \pi(i,j)\}_{i,j = 1}^{|\Sigma|}$$ a stochastic matrix (ie a matrix whose elements are non negative and such that each row sum is one). Let $P^{\pi}_{\sigma} $ be the Markov probability measure associated with this matrix and with initial state $\sigma \in \Sigma$, ie $$P^{\pi}_{\sigma}(Y_1 = y_1, \ldots, Y_n = y_n) = \pi(\sigma, y_1) \Pi_{i=1}^{n-1} \pi(y_i, y_{i+1}). $$ Let $ h: \Sigma^{\mathbb{N}} \times \Sigma^{\mathbb{N}} \rightarrow \mathbb{R}$ be a deterministic function (here $\Sigma^{\mathbb{N}}$ is the space of all sequences comprising of elements of $\Sigma$). Consider the random variable $Z_{n}: \Sigma^{\mathbb{N}} \rightarrow \mathbb{R} $ given by $$ Z_{n}(Y) := \Sigma_{i=1}^{n} \Sigma_{j=i+1}^{n} \frac{h(\tau^{i}Y, \tau^{j}Y)}{n^2} $$ where $\tau_i$ is the shift operator, ie $$\tau^{i}(Y_1 Y_2 \ldots Y_i Y_{i+1} \ldots) := Y_{i+1} Y_{i+2} \ldots $$
My question is the following: under what conditions on $h$ can we say that the sequence of random variables $Z_n$ satisfy a "Large Deviation Principle"? Secondly, is there any way to compute the Rate function?
Of course, here we are looking at $\Sigma^{\mathbb{N}} $ as a probability space with the measure induced by the matrix $\Pi$.
I am aware that there are results known for additive functionals as given in chapter 3 of the book "Large Deviations: Technigues and Applications" by Amir Dembo and Ofer Zeitouni. I am wondering if something similar is known for the type of random variable I have considered.