I have a sequence of A/B currency exchanges for some days. With that data I can calculate the daily returns, and that's what I did. I need to calculate the confidence interval for the expected daily returns of the A/B currency exchange by using the $1.96$ rule.
What is this $1.96$ rule? Why exactly that number? Why is it related to compute confidence intervals? So, how can we use it in general to compute confidence intervals?
There's an article on Wikipedia, but honestly I am not understanding it, and why it is related to the calculation of the confidence interval of the expectation.
Note that for now I am not asking specifically about how to solve my problem, but how what I am asking about is related to my problem (after answering those questions).
Normal condifidence interval. If the data are normal with unknown population mean $\mu$ and known population standard deviation $\sigma$, then a 95% confidence interval for $\mu$ is $\bar X \pm 1.96\sigma/\sqrt{n}$, where $n$ is the number of random observations from the population and $\bar X$ is their mean.
In these circumstances, the quantity $Z = \frac{\bar X - \mu}{\sigma/\sqrt{n}}$ has a standard normal distribution so that $P(-1.96 < Z < 1.96) = 0.95.$ After some algebra we have $$P(\bar X - 1.96\sigma/\sqrt{n} < \mu < \bar X + 1.96\sigma/\sqrt{n}) = 0.95.$$ Providing some detail behind the comments of @A.S., this relationship is the theoretical basis for the 95% confidence interval, according to the '1.96 rule'.
$T$ confidence interval. If $\sigma$ is unknown, then it may be estimated by the sample standard deviation $S = \sqrt{\frac{\sum_{i=1}^n(X_i - \bar X)^2}{n-1}}.$ Then $T = \frac{\bar X - \mu}{S/\sqrt{n}}$ has Student's t distribution with $n - 1$ degrees of freedom.
In that case 1.96 is replaced by the quantile .975 of Student's t distribution with degrees of freedom $n - 1.$ (Consult a printed table or use statistical software.) For example, if there are $n = 25$ observations, then 1.96 is replaced by 2.064. Then the 95% confidence interval for $\mu$ is $\bar X \pm 2.064 S/\sqrt{n}.$
The quantity $\sigma/\sqrt{n}$ is called the 'standard error' of the mean and $S/\sqrt{n}$ is the '(estimated) standard error'. Roughly speaking, one says that a 95% CI for $\mu$ is the sample mean plus or minus two standard errors. Notice that 1.96 and 2.064 are both very nearly 2. (This is approximately right unless $n$ is much smaller than 30.)
Here is a numerical example. Suppose you have the following 25 random observations from a normal population with both $\mu$ and $\sigma$ unknown:
Then $\bar X = 99.0468,\,$ $S = 18.32374,\,$ $S/\sqrt{n} = 3.097277,\,$ and (rounded to two places) a 95% confidence interval for $\mu$ is $(91.48, 106.61).$ These calculations were done in R statistical software, as shown below.
References: The NIST Engineering Statistics Handbook (available online) has more information at a basic level and also tables of normal and t distributions. Perhaps begin with sections 1.3.5.2 and 7.2.2.1.
Notes: I am not familiar with the kind of currency exchange data you are using, so I do not know whether the data are normal. If they are far from normal, the confidence intervals described here may not be appropriate. Other options are available, but I hope this answer discusses CIs related to the '1.96 rule' in sufficient detail.