<p>Just now did I see this question, hopefully it's not too late (also for those finding it later on).</p>
<p>The small variance you are observing is actually expected. The algorithms that powers <code>tfcausalimpact</code>, despite also being from the Markovian family type, are not the same as the <a href="https://research.google/pubs/pub41854/" rel="nofollow noreferrer">Gibbs Sampling</a> as used by the original R package, so results might change between runs but it should be negligible for the most part.</p>
<p>The default algorithm uses variational inference, it's possible to change it  to use <a href="https://arxiv.org/abs/2108.12107" rel="nofollow noreferrer">Hamiltonian Monte Carlo</a> (HMC) which is considered the state of the art in this field. Results will be more precise but it'll take longer to converge. Here's how to activate it:</p>
<pre><code>ci = CausalImpact(data, pre_period, post_period, model_args={'fit_method': 'hmc'})
</code></pre>
<p>As far as the interpretation of data goes it should remain stable regardless of how many runs you test it.</p>
Result change from run to run in tfcausalimpact
<p>I'm using tfcausalimpact on Python to do some structural time series modeling.
Results change from run to run, which I'd like to be able to avoid or control through some initial random state. Is there a way to obtain consistent results from run to run?</p>
<pre><code>import numpy as np
import pandas as pd
from statsmodels.tsa.arima_process import ArmaProcess
from causalimpact import CausalImpact


np.random.seed(12345)
ar = np.r_[1, 0.9]
ma = np.array([1])
arma_process = ArmaProcess(ar, ma)
X = 100 + arma_process.generate_sample(nsample=100)
y = 1.2 * X + np.random.normal(size=100)
y[70:] += 5

data = pd.DataFrame({'y': y, 'X': X}, columns=['y', 'X'])
pre_period = [0, 69]
post_period = [70, 99]

ci = CausalImpact(data, pre_period, post_period)
print(ci.summary())
print(ci.summary(output='report'))
ci.plot()

#Run 1

Posterior Inference {Causal Impact}
                          Average            Cumulative
Actual                    125.23             3756.86
Prediction (s.d.)         120.41 (0.34)      3612.35 (10.34)
95% CI                    [119.73, 121.08]   [3591.82, 3632.35]

Absolute effect (s.d.)    4.82 (0.34)        144.52 (10.34)
95% CI                    [4.15, 5.5]        [124.51, 165.04]

Relative effect (s.d.)    4.0% (0.29%)       4.0% (0.29%)
95% CI                    [3.45%, 4.57%]     [3.45%, 4.57%]

#Run 2
Posterior Inference {Causal Impact}
                          Average            Cumulative
Actual                    125.23             3756.86
Prediction (s.d.)         120.32 (0.33)      3609.48 (9.76)
95% CI                    [119.68, 120.95]   [3590.28, 3628.53]

Absolute effect (s.d.)    4.91 (0.33)        147.39 (9.76)
95% CI                    [4.28, 5.55]       [128.33, 166.58]

Relative effect (s.d.)    4.08% (0.27%)      4.08% (0.27%)
95% CI                    [3.56%, 4.62%]     [3.56%, 4.62%]
</code></pre>