Skip to main content

Mean and Standard Deviation of Time Series Data Simulator

Mathematically, a distribution has a mean of x and a standard deviation of y, the addion of 2 independent and identically random variable from that distribution will form a distribution with a mean of 2x and standard deviation of squart root of 2 times y.

I built a simulator to test if the result meets the above theory. The data I use is SPY etf mean daily return and daily return standard deviaton, which is 0.046% and 1.179% respectively and I wnat to find its annual mean return and standard deviaion.

In theory, they should be

  • SPY mean annual return is 0.046% * 252 = 11.592%
  • SPY annual return standard deviation is 1.179% * sqrt(252) = 18.716%

How it works

I will use SPY's daily return mean and standard deviation to create a series of daily value and record annual value every 252 days. Then calculate the mean and standard deviaiton for the annual data.
  • Simulated SPY mean annual return is %
  • Simulated SPY annual return standard deviation is %

Comments

Popular posts from this blog

Which Asset Class Had the Best Performance During the 2008 Financial Crisis?

In this article, I want to explore which asset, ETFs, MFs, Stocks, did best during the 2008 financial crisis. I will compare the investment results against the result of SPY, since it represents the overall market. The scenario is investing right at the highest point of S&P 500 index right before it crashed during the crisis. The date is Oct 9, 2007  when the index reached 1,565.15. I will compare the returns of each asset against SPY in the following order: Investing until the bottom of the crisis at 676.53 on Mar 09, 2009 in order to simulate downside risk. Investing until the S&P 500 index closed above the previous high at 1,568.61 on Apr 09, 2013 in order to simulate recover ability. Investing until the bottom of the Covid crisis at 2,304.92 on Mar 20, 2020 in order to simulate a series of market crashes. Performance By Ranks Oct 9, 2007 to Mar 09, 2009 SHY  return is 8.848% AGG  return is 7.390% LQD  return is -6.793% HYG  return i...