Currently I'm learning about SDE's. In my course notes the following example was given for the following SDE: This results in the following image:
\begin{array}{l} d B_{t}=\left(-K_{1} B_{t}+s_{t}+\frac{1}{2} B_{t} \sigma^{2}\right) d t-B_{t} \sigma d W_{t} \\ B_{t_{0}}=B_{0} \end{array}
With Python I tried to recreate the figure:
import numpy as np
import matplotlib.pyplot as plt
T = 100
N = 10000
dt = T/N
K1 = 1
st = 3
Bt = 20
sigma = 1
y = np.zeros(N2)
x = np.linspace(0,T,N2)
for i in range(N2):
y[i] = Bt
Bt += (-K1Bt + st + 0.5Btsigma*2)dt - Btsigmanp.random.normal(0, dt)
plt.plot(x, y)
The values for $K_1$, $s_t$ and $\sigma$ were not given, but I think I did a OK job.
Now I want to create this figure that shows the variance and mean. How do I modify my code in order to achieve this goal?

