## Saturday, December 29, 2012

### Mind Over Money documentary

Interesting documentary around financial auctions and associated economic theories.
They attempted to replicate the famous \$100 Bill Auctionhttp://matdays.blogspot.co.nz/2010/03/about-100-bill-auction.html at the beginning.

## Monday, December 24, 2012

### Excel data analysis 6.0 (Buy Low/Sell High simlation)

If we bought a unit of an index at the end of each down day, and sold on an up day, how would it do?
In this post we look at the raw EV (statistically expected value) of this idea, with excel, in a theoretical trade where we toss all risk management principles out the window.

Buy Low/Sell High -> short gamma

This is an implicitly short gamma trade, since position accumulate with each unfavorable move, increasing risk. Therefore the payoff is concave, and requires significant effort in risk management to implement.

Historical data

We will look at IWM (iShares Russell 2000 Index) daily prices for the period 5/26/00 - 12/21/12. So after sorting the adjusted closing prices, we work out the close to close log returns.

Sample stats:

We can create the next column for buy/sell signals with respect to the latest dIWM. Here I used a threshold of 0.09%, median dIWM of the past 12 years; i.e. if the latest dIWM is above 0.09%, we sell a unit of IWM, and vice versa, where buy signal = 1, sell signal = -1.

This is pretty straight forward, if the signal = 1,  "Buys" column gets the latest price, if not, blank. Same for the "Sells" column.

From the average prices, we can see that this concept had derived an average of \$0.72/share with each round trip, before transaction costs. OK, so it has been +EV.

What about the risks of position accumulation?

Position simulation

I created a column "Position", and it's simply an accumulation of the signals.

We can graph it against the date:

So from this we can see that some trades require more work around risk management to implement in a practical manner.

## Saturday, December 22, 2012

### S&P500 vs. Commodities (Oct. 2007 -> Dec. 2012)

Here we can look at how the S&P500 stock index has done in the past 5 years compared to a few commodities that adjust closely with actual, i.e. real rate of inflation (alternate inflation charts at Shadowstats). It gives a basic sum up of how the buy & hold guys have fared after real adjustment for inflation.

Data applied
All the data are derived from Yahoo Finance. We have the following commodity ETFs: GLD (SPDR Gold Shares), USO (United States Oil Fund), DBA (Powershares DB Agriculture Fund) against the Index ETF, SPY (SPDR S&P500). I have gotten end of day closing values of these ETFs going from 1/5/07 to 12/21/12.

Cumulative Log Returns

We can see that both agricultural commodities and gold have outperformed S&P500, which implies that stock indices are not likely to outpace actual rate of inflation, making buy & hold not all that attractive.

Daily log-return sample stats for the period, 1/5/07 to 12/21/12

## Wednesday, December 19, 2012

### Option delta off expected volatility (in Excel)

I think many of us have used the default delta values off implied volatility, and noticed that it can be off significantly when implied is way out of line against realized vol. This error makes the P&L of individual trades path dependent, and frequently hurt long volatility trades as delta becomes understated. A way reduce this error is to input realized vol for delta calculation, or 1 step better -> Expected Realized Vol.

The increased hedging accuracy would lower the volatility of individual trade returns, path dependance. It all goes toward achieving that positive EV:

EV = BSM(Realized Vol) - BSM(Implied) - transaction/hedging costs - implementation shortfalls
Where BSM() = Black Scholes Merton option valuation model.

Deriving delta

S -> Underlying value
K -> Strike price
r -> “Risk free” rate of return (often off 10year treasury)
V -> Expected realized volatility
T -> Option life with respect to year

We need to solve for d1 from the Black Scholes Merton model,

Then we can derive the “correct deltas”,
delta(Call) = N(d1)
delta(Put) = 1 – N(d1)
where N() = Position within the Standard Normal Distribution

Doing it in excel
So I used the latest SPY values for the example, and an arbitrary interest rate of 0.5% and realized vol of 12% (I didn't bother doing a forecast value since that's already covered in the earlier post).

Formulas:

We end up with

## Saturday, December 15, 2012

### Delta hedged options, return estimate

So if we have a crude plan of delta hedging a long/short option position once a day, we'd like to know how far the underlying could go for us to make/lose money, as accurately as possible. Since gamma is associated with variance, and is a derivative of delta like acceleration off velocity; the return on a delta hedged options position is then like that of the distance formula from mechanical physics.

Distance formula:
distance = (initial velocity)*(time) + (1/2)*(acceleration)*(time)^2

To translate this into a delta hedged options position

initial velocity -> delta
acceleration -> gamma
time -> change in the underlying

P&L of delta-hedged options

With a volatility forecast, the above gives us a pretty good idea of the position's EV (expected value).

## Wednesday, December 12, 2012

### +EV +EV +EV !

Interesting TED talk on achieving positive EV (Expected Value).

Dylan Evans - "What can we learn from expert gamblers?"

## Saturday, December 8, 2012

### Excel data analysis 5.1 (Realized Variance, Future Return Regression)

So in the last post (Excel Data Analysis 5.0) we looked at deriving Robust Realized Variance (RRV), today let's look at if we could use RRV to estimate a bias for future returns on the S&P500 off regression based interpolations.

So moving on with the S&P500 RRV worksheet, next to the 60day (business day) realized variance, we will create a column for the average future 60day log return of the S&P500, "dX.f60",

Here we can see that I took the average of the following 60days of S&P500 log returns. So naturally this column must end 60days prior to the date of our last available data.

Realized variance vs. future average returns regression fit

Next we highlight the columns "RVar(60)", "dX.f60" down to the last value in "dX.f60" and draw a scatter plot. On the plot, we then add a trendline with the highest R-squared (coefficient of determination) value.

The Polynomial Regression had the highest R-squared at 0.0307, it is not statistically significant enough to mean anything. However that doesn't mean this is the end of the road. We can see that the bulk of average daily returns have been increasingly negative about a quarter (60business days) following high realized variance. So what if we analyze only periods of high realized variance?

Here a new column is created for RVV above a certain threshold. The column is named "RVV+", and I chose cell G9 to place the threshold. Next to "RVV+", whenever the realized variance is below the threshold, this column gives a 0. Another new column is created for the following average 60day S&P500 daily returns, "dX.f60+" (matching "RVV+" values). The column "dX.f60+" gives a NA() whenever "RVV+" = 0.

I picked a random point in the realized variance range, 800 as a threshold for this example. Now, let's apply regression between "RVV+" and "dX.f60+",

It looks like a much better fit from the get go. The linear regression gave an R-squared of 0.7373, which is light years better than the earlier regression involving lower realized variance. This crude model could be extended, refined to estimate future index returns or develop risk management tactics, when the realized variance is relatively high.

## Friday, December 7, 2012

### Excel data analysis 5.0 (Robust Realized Variance)

Here I look at a couple of concepts around the S&P500 Robust Realized Variance (RRV), and its behavior with respect to the S&P500 index.

Why is variance important?
• Implied variance of all strikes gives a much more complete feel for a product's option value, whether it's relatively cheap/expensive.
• Profit from delta hedging (long gamma) are proportional to returns squared, i.e.                            Delta Hedged P&L = dX^2 * gamma / 2 - transaction costs; where dX = change in underlying
• Variance Swaps, Variance Futures have become quite popular, and these new product valuations are still relatively inefficient compared to the more developed products.

Data set up
I got the daily closing values of S&P500 off yahoo finance (symbol: ^gspc). The data is sorted with the basic stats at the top as mentioned in Excel data analysis 1.0. So in column C, "dX", we have the day to day log returns; 100*ln[X(t)/X(t-1)], where X = latest value, t = latest time step, in this case the day.

Robust Realized Variance (RRV)

Variance for a normal distribution is the average squared differences from the mean. Since we know that returns on stock indices are not represented by normal distributions, robust statistics is more practical. As Median Absolute Deviation is to Standard Deviation, our RRV utilizes median values instead of mean.

Here we can see that I took the 60 day RVV, annualized.

RVV stats

Here we can get a feel for S&P500 with respect to RVV.

It's pretty obvious that the index is more attractive for buyers when RVV is relatively high.

In the next post I will look at using RVV to analyze expected future S&P500 returns.

## Wednesday, December 5, 2012

### Fiscal Cliff 2012: Options Sentiment

With so much publicity around the coming US Fiscal Cliff event, is everyone expecting a drop in the financial securities? Let's find out what the equity option traders are doing.

The Options Clearing Corporation publishes Weekly Statistics Reports, and here we can get a feel for general sentiment of the small traders (1-10 Transaction Size), and the smart money (FIRM). As option premiums are a result of supply/demand, we can compare the buy open Call premiums against the Puts.

So for the week ending 11/30/2012, we see the following:

Call / Put Premium Ratio :  2.69

We can see that most of the small traders are relatively bullish and have a ton of upside bets going.

Call / Put Premium Ratio :  1.07

We can see that most of the institutinoal traders are relatively flat.

## Tuesday, December 4, 2012

### Excel data analysis 4.2 (Overnight Gap)

In this post we look at the change in price stats for overnight gaps, and its correlation to the sequential open to close price moves.

Historical data
I used IYR Open and Closing Prices for this example, starting from the split at 6/9/05. Daily prices are available at yahoo finance, see this post for data sorting. Once we have the data sorted, logged returns off Gaps "Gap" and sequential open to close price change "dOC" can be derived.

Correlation between "Gap" and "dOC" is done with the correl() function. Here I do a 20day moving correlation.

We end up with these stats

General analysis
Interestingly we can see that for the sample period, the average gap move was down, while the intraday moves had a net positive movement. With correlation near 0, it's unlikely that the overnight gap move offers any valuable edge for trading in the following session.