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

How to Create Corporate Bond with Covered Call Strategy?

A covered call position act like a corporate bond. Both give limited upside gains but also some downside protection. So I would like to explore if I can build a corporate bond position with stocks and the covered call strategy. Face Value Face value of an option is the first thing I am concerned. Although there is no real face value in the covered call positions, we still need to know how many stocks are covered by a short call contract. An option contract covers 100 shares of stock, so if I want to build a covered call position, I need to buy 100 shares of SPY for $373 with a total of $373*100 = $37,300. Already crazy. If I do a covered call once and the call option gets executed, I will have to sell stocks worth of about $37,300. How many times do I get to do this if I am not so rich? The mini-option of XSP, though a smaller contract size than SPX, still has this problem of one contract requires a lot of money for the underlying assets. XSP prices at 37...