First of all after calculating the runs (i.e the number of sign changes), you need to calculate the span of range where the lower limit is given by:
u-(t(%significance,degree of freedom)*SD) and the upper limit by u+(t*SD)
u-stands for mean.
The degree of freedom should always be n-2; where n is the number of observations.
The reason is that in calculating runs, you try to identify the number of sign changes. So obviously the first observation will not find place in reckoning the runs.
for instance see the following price changes over 5 days
20,10,50,14,30. The runs would be -,+,-,+ (4 runs. Hence a degree of freedom is lost)
Also to know SD you need to know the mean. Lets say we have three variables and we know the mean. Here the 3 would generally be the degree of freedom (i.e the number of variables that is prone to vary in computing SD). But since you know the mean , one of the variables need to be fixed and that variable will not be prone to changes.
So t based on n-2 degree of freedom