How do I calculate two standard deviations away from the stock price?
"The formula for standard deviation is fairly simple in both the discrete and continuous cases. It's mostly safe to use the discrete case when working with adjusted closing prices. Once you've calculated the standard deviation for a given time period, the next task (in the simplest case) is to calculate the mean of that same period. This allows you to roughly approximate the distribution, which can give you all sorts of testable hypotheses. Two standard deviations (σ) away from the mean (μ) is given by:  It doesn't make any sense to talk about ""two standard deviations away from the price"" unless that price is the mean or some other statistic for a given time period. Normally you would look at how far the price is from the mean, e.g. does the price fall two or three standard deviations away from the mean or some other technical indicator like the Average True Range (an exponential moving average of the True Range), some support level, another security, etc.  For most of this answer, I'll assume we're using the mean for the chosen time period as a base. However, the answer is still more complicated than many people realize. As I said before, to calculate the standard deviation, you need to decide on a time period. For example, you could use S&P 500 data from Yahoo Finance and calculate the standard deviation for all adjusted closing prices since January 3, 1950. Downloading the data into Stata and applying the summarize command gives me: As you can probably see, however, these numbers don't make much sense. Looking at the data, we can see that the S&P 500 hasn't traded close to 424.4896 since November 1992. Clearly, we can't assume that this mean and standard deviation as representative of current market conditions. Furthermore, these numbers would imply that the S&P 500 is currently trading at almost three standard deviations away from its mean, which for many distribution is a highly improbable event. The Great Recession, quantitative easing, etc. may have changed the market significantly, but not to such a great extent.  The problem arises from the fact that security prices are usually non-stationary.. This means that the underlying distribution from which security prices are ""drawn"" shifts through time and space. For example, prices could be normally distributed in the 50's, then gamma distributed in the 60's because of a shock, then normally distributed again in the 70's. This implies that calculating summary statistics, e.g. mean, standard deviation, etc. are essentially meaningless for time periods in which prices could follow multiple distributions.  For this and other reasons, it's standard practice to look at the standard deviation of returns or differences instead of prices. I covered in detail the reasons for this and various procedures to use in another answer. In short, you can calculate the first difference for each period, which is merely the difference between the closing price of that period and the closing price of the previous period. This will usually give you a stationary process, from which you can obtain more meaningful values of the standard deviation, mean, etc.  Let's use the S&P500 as an example again. This time, however, I'm only using data from 1990 onwards, for the sake of simplicity (and to make the graphs a bit more manageable). The summary statistics look like this: and the graph looks like this; the mean is the central horizontal red line, and the top and bottom lines indicate one standard deviation above and below the mean, respectively.   As you can see, the graph seems to indicate that there were long periods in which the index was priced well outside this range. Although this could be the case, the graph definitely exhibits a trend, along with some seemingly exogenous shocks (see my linked answer).  Taking the first difference, however, yields these summary statistics: with a graph like this:  This looks a lot more reasonable. In periods of recession, the price appears much more volatile, and it breaches the +/- one standard deviation lines indicated on the graph.  This is only a simple summary, but using first differencing as part of the wider process of detrending/decomposing a time series is a good first step.  For some technical indicators, however, stationary isn't as relevant. This is the case for some types of moving averages and their associated indicators. Take Bollinger bands for instance. These are technical indicators that show a number of standard deviations above and below a moving average. Like any calculation of standard deviation, moving average, statistic, etc. they require data over a specified time period. The analyst chooses a certain number of historical periods, e.g. 20, and calculates the moving average for that many previous periods and the moving/rolling standard deviation for those same periods as well. The Bollinger bands represent the values a certain number of standard deviations away from the moving average at a given point in time. At this given point, you can calculate the value two standard deviations ""away from the value,"" but doing so still requires the historical stock price (or at least the historical moving average). If you're only given the price in isolation, you're out of luck.  Moving averages can indirectly sidestep some of the issues of stationarity I described above because it's straightforward to estimate a time series with a process built from a moving average (specifically, an auto-regressive moving average process) but the econometrics of time series is a topic for another day.  The Stata code I used to generate the graphs and summary statistics:" Standard Deviation is a mathematical term that is useful in many areas. It can be considered a measure of how tight the data points are to the average. If there is consistency in the measurement system, then a point that is two standard from the average can be considered an outlier. It doesn't even need to be time based. We can say that a child born weighing less than X pounds is more than 2 standard deviations below the average.  Using it to look at a price or an index value doesn't make a lot of sense because many expect there to be long term growth. For example you would never say that you will buy a new jacket for your child when they are two standard deviations above their average height. You can say you will buy or sell a financial instrument when the P/E ratio is 2 standard deviations from some average. It could be the average of the long term history, or the index, or the sector. You could do the same thing for earnings per share or many other business of financial statistics. A standard deviation calculated from a time series assumes that the measurement will normally stay withing some bounds. And that straying from those bounds is a sign of the right time to buy or sell.
"The calculation and theory are explained in the other answers, but it should be pointed out that the video is the equivalent of watching a magic trick.  The secret is: ""Stock A and B are perfectly negatively correlated.""  The video glasses over that fact that without that fact the risk doesn't drop to zero. The rule is that true diversification does decrease risk. That is why you are advised to spread year investments across small-cap, large-cap, bonds, international, commodities, real estate. Getting two S&P 500 indexes isn't diversification.  Your mix of investments will still have risk, because return and risk are backward calculations, not a guarantee of future performance. Changes that were not anticipated will change future performance. What kind of changes: technology, outsourcing, currency, political, scandal." "Finding the ""optimal"" solution (and even defining what optimal is) would probably take a lot of searching of all the possible combinations of stocks you could buy, given that you can't buy fractional shares. But I'd guess that a simple ""greedy"" algorithm should get you close enough. For any given portfolio state, look at which stock is furthest below the target size - e.g. in your example, S3 is 3.5% away whereas S1 is only 3.1% away and S2 is over-sized. Then decided to buy one stock of S3, recalculate the current proportions, and repeat until you can't buy more stocks because you've invested all the money. If you have to pay a transaction fee for each kind of stock you purchase you might want to calculate this in larger lot sizes or just avoid making really small purchases." "This is the same answer as for your other question, but you can easily do this yourself: ( initial adjusted close / final adjusted close ) ^ ( 1 / ( # of years sampled) ) Note: ""# of years sampled"" can be a fraction, so the one week # of years sampled would be 1/52. Crazy to say, but yahoo finance is better at quick, easy, and free data.  Just pick a security, go to historical prices, and use the ""adjusted close"". money.msn's best at presenting finances quick, easy, and cheap." Calculation. To calculate the DJIA, the sum of the prices of all 30 stocks is divided by a divisor, the Dow Divisor. The divisor is adjusted in case of stock splits, spinoffs or similar structural changes, to ensure that such events do not in themselves alter the numerical value of the DJIA. This paper makes the rounds every so often and I HATE IT VERY MUCH.  No one has EVER EVER EVER estimated standard deviation by taking an average of abs deviations, because that would be stupid, further, realized vol is a very different beast than implied vol. AND FURTHER, the models are fitted to the data, rather than fighting the tape and fitting the data to the models.   Most people working with these instruments are trying to figure out the prices of unknown derivatives based on known derivatives - the models just help interpret findings and estimate what's necessary to hedge a position. "Wow, this analysis really surprised me. Very complete and useful, but i think my teacher request was easier. He just said: ""Try to build a diversified portfolio. Then try to add a commodity (like silver or gold) and understand how the risk vary introducing an asset like this."" So, i'm basically making a stocks portfolio and i'm calculating its expected return and risk. (for example 40%FB, 10%JNJ, 20%GS, 10%F and 20%MCD) then i'm adding GLD (so now i have something like 20%FB, 10%JNJ, 10%GS, 10%F and 20%MCD 30%GLD) and i'm actually making an excel spreadsheet where i calculate all the: -Expected returns -St Deviation -Covariance  At the end i compare the returns and the risks on the 2 different portfolios." "So, there is no truly ""correct"" way to calculate return.  Professionals will often calculate many different rates of return depending on what they wish to understand about their portfolio.  However, the two most common ways of calculating multi-period return though are time-weighted return and money-weighted return. I'll leave the details to this good Investopeadia article, but the big picture is time-weighted returns help you understand how the stock performed during the period in question independent of how you invested it it.  Whereas money-weighted return helps you understand how you performed investing in the stock in question.  From your question, it appears both methods would be useful in combination to help you evaluate your portfolio. Both methods should be fairly easy to calculate yourself in a spread sheet, but if you are interested there are plenty of examples of both in google docs on the web." &gt; A short position also loses money if the stock just appreciates more slowly than the broader market, which is one way an overvaluation can correct itself.  Is there a derivative based on the literal second derivative (acceleration) of the stock price? If so, you'd be able to short those, yes? On expiry, with the underlying share price at $46, we have : You ask :  How come they substract 600-100. Why ? Because you have sold the $45 call to open you position, you must now buy it back to close your position.  This will cost you $100, so you are debited for $100 and this debit is being represented as a negative (subtracted); i.e., -$100 Because you have purchased the $40 call to open your position, you must now sell it to close your position.  Upon selling this option you will receive $600, so you are credited with $600 and this credit is represented as a positive (added) ; i.e., +$600. Therefore, upon settlement, closing your position will get you $600-$100 = $500.  This is the first point you are questioning.   (However, you should also note that this is the value of the spread at settlement and it does not include the costs of opening the spread position, which are given as $200, so you net profit is $500-$200 = $300.) You then comment :  I know I am selling 45 Call that means : As a writer: I want stock price to go down or stay at strike. As a buyer: I want stock price to go up. Here, note that for every penny that the underlying share price rises above $45, the money you will pay to buy back your short $45 call option will be offset by the money you will receive by selling the long $40 call option.  Your $40 call option is covering the losses on your short $45 call option. No matter how high the underlying price settles above $45, you will receive the same $500 net credit on settlement.  For example, if the underlying price settles at $50, then you will receive a credit of $1000 for selling your $40 call, but you will incur a debit of $500 against for buying back your short $45 call.  The net being $500 = $1000-$500.  This point is made in response to your comments posted under Dr. Jones answer. Having all of the numbers you posted is a start. It's what you need to perform the calculation.  The final word, however, comes from the company itself, who are required to issue a determination on how the spin-off is valued. Say a company is split into two. Instead of some number of shares of each new company, imagine for this example it's one for one. i.e. One share of company A becomes a share each in company B and company C. This tell us nothing about relative valuation, right? Was B worth 1/2 of the original company A, or some other fraction? Say it is exactly a 50/50 split. Company A releases a statement that B and C each should have 1/2 the cost basis of your original A shares. Now, B and C may very well trade ahead of the stock splitting, as 'when issued' shares. At no point in time will B and C necessarily trade at exactly the same price, and the day that B and C are officially trading, with no more A shares, they may have already diverged in price. That is, there's nothing you can pull from the trading data to identify that the basis should have been assigned as 50% to each new share. This is my very long-winded was of explaining that the company must issue a notice through your broker, and on their investor section of their web site, to spell out the way you should assign your basis to each new stock. Here's another attempt at explanation: it's basically because parabolas are flat at the bottom. Let me explain.  As you might know, the variance of the log stock price in Black Scholes is vol^2 * T, in other words, variance of the log stock price is linear in time to expiry. Now, that means that the standard deviation of your log stock price is square root in time. This is consequential.  For normally distributed random variables, in 68% of cases we end up within one standard deviation. So, basically, we expect our log stock price to be within something something times square root of T. So, if your stock has a vol of 16%, it'll be plus/minus 32% in 4 years, plus/minus 16% for one year, plus/minus 8% for 3m, plus/minus 4% for 3-ish weeks, and plus/minus 1% for a business day. As you see, the decay is slow at first, but much more rapid as we get closer.  How does the square root function look? It's a sideways parabola. As we come closer to zero, the slope of the square root function goes to infinity. (That is related to the fact that Brownian motion is almost surely no-where differentiable - it just shoots off with infinite slope, returning immediately, of course :-) Another way of looking at it is the old traders rule of thumb that an at-the-money option is worth approximately S * 0.4 * vol * sqrt(T). (Just do a Taylor expansion of Black Scholes). Again, you have the square root of time to expiry in there, and as outlined above, as we get closer to zero, the square root drops slowly at first, and then precipitously. Let's suppose your friend gave your $100 and you invested all of it (plus your own money, $500) into one stock. Therefore, the total investment becomes $100 + $500 = $600. After few months, when you want to sell the stock or give back the money to your friend, check the percentage of profit/loss. So, let's assume you get 10% return on total investment of $600.  Now, you have two choices. Either you exit the stock entirely, OR you just sell his portion. If you want to exit, sell everything and go home with $600 + 10% of 600 = $660. Out of $660, give you friend his initial capital + 10% of initial capital. Therefore, your friend will get $100 + 10% of $100 = $110. If you choose the later, to sell his portion, then you'll need to work everything opposite. Take his initial capital and add 10% of initial capital to it; which is $100 + 10% of $100 = $110. Sell the stocks that would be worth equivalent to that money and that's it. Similarly, you can apply the same logic if you broke his $100 into parts. Do the maths. Something like cost = a × avg_spreadb + c × volatilityd × (order_size/avg_volume)e. Different brokers have different formulas, and different trading patterns will have different coefficients. This link does it ok:  http://investexcel.net/1979/calculate-historical-volatility-excel/ Basically, you calculate percentage return by doing stock price now / stock price before.  You're not calculating the rate of return hence no subtraction of 100%.  The standard is to do this on a daily basis: stock price today / stock price yesterday. The most important and most misunderstood part is that you now have to analyze the data geometrically not arithmetically.  To easily do this, convert all percentage returns with the natural log, ln(). Next, you take the standard deviation of all of those results, and apply exp().  This answers the title of your question. For convenience's sake, it's best to annualize since volatility (implied or statistical) is now almost always quoted annualized.  There are ~240 trading days each year.  You multiply your stdev() result by (240 / # of trading days per return) ^ 0.5, so if you're doing this for daily returns, multiply the stdev() result by 240^0.5; if you were doing it weekly, you'd want to multiply by (240 / ~5)^0.5; etc.  This is your number for sigma.  This answers the intent of your question. For black-scholes, you do not convert anything back with exp(); BS is already set up for geometric analysis, so you need to stay there. The reason why analysis is done geometrically is because the distribution of stock returns is assumed to be lognormal (even though it's really more like logLaplace). An expiration 2 years out will have Sqr(2) (yes the square root of 2!) times the premium of the 1 year expiration. So if the option a year out sell for $1.00, two is only $1.41.  And if the stock trades for $10, but the strike is $12, why aren't you just waiting for expiration to write the next one?