Expanding Standard deviation
If you are using Python, you can use pandas. It comes with an expanding standard deviation function. 

import pandas as pd
import numpy as np

# Generate some random data
df = pd.DataFrame(np.random.randn(100))

# Calculate expanding standard deviation
exp_std = pd.expanding_std(df, min_periods=2)

# Print results
print exp_std