Total rookie question....

i mean, given the stock price, strike price, call price, interest rate... etc there should be a way to derive it using the black-scholes formula, correct?

Thanks,

The New Guy
 
very cool, thanks.

I'll start on this, and if anyone else has any links they feel would help i'd greatly appreciate it.

Thanks,

The New Guy
 
Quote from thenewguy:

i mean, given the stock price, strike price, call price, interest rate... etc there should be a way to derive it using the black-scholes formula, correct?

Thanks,

The New Guy

Yes, you can reverse the Black-Scholes or any other option pricing model to solve for Implied Volatility. I wouldn't recommend doing that by hand though. Any decent option calculator should be able to do that for you.
 
Use code keyword so that it looks formatted, like this:

Code:
public class OptionMath
	{
		const double AnualTradingDays = 260.0;

		public static double[] HistoricalVolitilitySeries(double[] prices, int period)
		{
			Debug.Assert(prices.Length-1 >= period);

			double[] v = new double[prices.Length-period];

			for (int j=0,i=1; j < v.Length; j++,i++)
			{
				v[j] = HistoricalVolitility(prices, i, period);
			}

			return v;
		}

		public static double HistoricalVolitility(double[] prices, int index, int period)
		{
			double[] P = prices;
			double[] X = new double[period];

			double mean = 0;

			// get the logarithms of the daily price ratio
			for (int j = 0, i=index; j < period; j++,i++)
			{
				X[j] = Math.Log(P[i]/P[i-1]);

				mean += X[j];
			}

			// compute the mean of the logarithms of the price changes
			mean /= period;

			// compute the deviations from the mean
			double sum = 0;
			for (int k = 0; k < period; k++)
			{
				double d = (X[k] - mean);

				sum += d*d;
			}

            // standard deviation of the daily volatilities over the period
			double v = Math.Sqrt(sum/(period-1));

            // scale to an annualized value for use in the BS equation
			double annualVolatility = v*Math.Sqrt(AnualTradingDays);

			return annualVolatility;
		}
	}
Quote from GTG:

I use the method as described on pages 461 and 462 in Options as a Strategic Investment by McMillan. Basically you take the log of the ratio of each day's price and the previous day's price.

Then you compute the standard deviation of those values.

Next, multiply the standard deviation by the square-root of the number of trading days in a year to convert to an annualized volatility so that you can use it in the Black-Scholes model.

Here's my C# source code to compute a series of historical volatilities.



public class OptionMath
{
const double AnualTradingDays = 260.0;

public static double[] HistoricalVolitilitySeries(double[] prices, int period)
{
Debug.Assert(prices.Length-1 >= period);

double[] v = new double[prices.Length-period];

for (int j=0,i=1; j < v.Length; j++,i++)
{
v[j] = HistoricalVolitility(prices, i, period);
}

return v;
}

public static double HistoricalVolitility(double[] prices, int index, int period)
{
double[] P = prices;
double[] X = new double[period];

double mean = 0;

// get the logarithms of the daily price ratio
for (int j = 0, i=index; j < period; j++,i++)
{
X[j] = Math.Log(P/P[i-1]);

mean += X[j];
}

// compute the mean of the logarithms of the price changes
mean /= period;

// compute the deviations from the mean
double sum = 0;
for (int k = 0; k < period; k++)
{
double d = (X[k] - mean);

sum += d*d;
}

// standard deviation of the daily volatilities over the period
double v = Math.Sqrt(sum/(period-1));

// scale to an annualized value for use in the BS equation
double annualVolatility = v*Math.Sqrt(AnualTradingDays);

return annualVolatility;
}
}


nitro
 
Quote from kut2k2:

This latter is a fallacy. [...] EMA has the exact same lag characteristic as the simple moving average. Those who claim it is closer to the weighted moving average ignore the fact that the EMA represents an infinite series, whereas the SMA and WMA are finite series.

That's an interesting point. I have found EWMA to be useful and produce noticably better results than a simple moving average in some backtests, but I can't really justify it theoretically.

But the rest of these volatility estimators look ad hoc, with a lot of hand-waving to rationalize them.

Yeah, more or less. :) I think the basic idea is that you can always get more information about volatility by looking at a shorter timescale. The more information you have the faster your estimate will converge, resulting in a more responsive estimator. However intraday data is difficult to work with, and less widely available than end of day data. Open-high-low-close bars provides some information about intra-period volatility and results in a slightly faster estimator than open-close bars.

I don't have access to a university library to look up academic papers.

You can find a lot of good stuff through scholar.google.com.

Martin
 
Thanks for all the replies!

In regards to the HV, I've noticed two different approaches, in excel.

ln(today's close/yesterday's close) equals something marginally different than (today's close/yesterday's close - 1) in excel.

Does anyone know which is more accurate?

Thanks,

The New Guy
 
Back
Top