Thursday, January 21, 2010

Update on the Distribution of Returns

When I first calculated the distribution of returns, I used data from SPY, which only goes back to 1993. Today I finally got around to checking with data for SPX, which goes back to 1950. I didn't do the full analysis. I just used the 16 day variance normalization. The normalized returns are very close to a normal distribution. The lowest z-score is -3.84 and the highest is 3.53. The '87 crash has a z-score of -3.75 (third lowest). I have two graphs showing the distribution.

The first one would be a straight line if the distribution were normal.

The second one shows the actual cdf in blue with the normal cdf in green. You can see the slight negative fat tail in the second graph where the blue line dips below the green one. But then the blue line goes above the green line, showing that slightly negative returns are less likely than expected.

At any rate, this shows that the normalized returns are very close to a normal distribution.


Wednesday, August 12, 2009

The distribution of returns over time

I have noticed that when testing trading strategies, the results improve if I normalize price movements over time based on recent volatility. I decided to determine what the best normalization method is. To do this, I have tested several normalization techniques to see how constant the distribution of returns is over time.

I tried three normalization techniques:
  1. ATR normalization: (close[0]-close[1])/atr[1] - the change in price divided by the Average True Range
  2. variance normalization: (close[0]/close[1]-1)/sqrt(sma(daily variance)) - the percent change in price divided by the square root of the mean of the squares of the percent change
  3. volatility normalization: (close[0]/close[1]-1)/sma(abs(daily percent change)) - the percent change in price divided by the mean of the absolute value of the percent change

I tried all of these methods with lookback periods ranging from 1 to 100 days. Then I split the distributions of the normalized returns into 100 day chunks and compared all of them with the 2-sample Cramer-von Mises test. My data is the first 4100 days of returns on SPY, which goes from Jan 29, 1993 to May 8, 2009. Since the samples were broken up into 41 groups, there were 820 pairs of distributions to compare. This should provide a reasonably good estimate of how constant the distributions are.

After calculating the distribution of the test statistic for each set of normalized returns, I compared them to a randomly generated distribution using the Cramer-von Mises test again. This tells me how well the assumption that the normalized returns come from a constant distribution matches the observed returns.

The following graph shows the results in terms of p-scores. The x-axis is the period of the normalization method. The y-axis shows the probability that the test would have given a better result if the normalized returns actually all came from the same distribution (in other words, it is roughly the probability that the distribution is not constant).

The blue line shows the atr normalized returns, the green line shows the variance normalized returns, and the red line shows the volatility normalized returns. It is clear that volatility normalization still leaves a lot of variability in the distribution of returns.

It looks like the ATR normalization works fairly well for an ATR setting in the range of 14-21. The distribution of returns still changes some, but not substantially. The variance normalization works even better and is pretty good with a period of 11-19. The minimums are both at 16 (which is probably a coincidence).

Something interesting to do with normalized returns is to look at what the market would have done if volatility had been constant. The following graph shows what the closing price for SPY would have been if the ATR had been constant (blue), if the variance had been constant (green), and the actual closing prices (red).

In theory, if you rebalance daily based on the ATR, you would be able to produce the returns shown in blue. Of course, the transaction costs would reduce your returns considerably. You could also produce the returns shown in green by rebalancing every day based on the trailing variance, but with the same transaction costs problem.

Notice that the "black swan" we got last fall did not actually have very unusual market activity. It just had high volatility. The normalized distribution of market returns for this past fall include only a small number of extreme days. Using variance normalization, there were no days more than 3 standard deviations below the mean, and only 8 that were more than 2 standard deviations below the mean (out of 254). The expected number is 5.8, so 8 is not very high. The fall seemed very rapid, but the volatility increased at a slow enough rate that people should have been able to see it coming.

Another thing that you can see is that it is quite clear that volatility is actually higher when the market is falling then when it is rising. That is why the volatility adjusted cumulative returns are higher than the normal ones.

This also matters when trying to back-test strategies. Using the adjusted returns keeps the distribution roughly constant, which allows your strategy to make predictions in a constant distribution, rather than trying to guess how the distribution is changing as well as where in the distribution the returns are going to be.

Also, the normalized returns have an almost normal distribution (more so for the ATR normalization than the variance normalization). Which suggests that the reason that stock market returns have fat tails is mostly that the variance isn't constant.

Also note that this probably works better for indices than for individual stocks. Individual stocks have news events that can generate sudden jumps in prices that may not be preceded by increasing volatility. Such events are rarely completely unexpected across an entire index, so major news events tend to be preceded by increasing volatility. Exceptions include things like terrorist attacks and natural disasters (particularly earthquakes and volcanic eruptions that don't provide even a few days of warning the way that hurricanes do). I have not yet tested this on any individual stocks, any other indices, or even SPX before SPY started trading.


Saturday, March 07, 2009

Evaluating Leveraged Trading Systems

Trading systems generate some return on every trade. When comparing trading systems to determine which one to use, it is important to properly evaluate the expected returns and risk. This is particularly important when evaluating leveraged trading systems. This is a description of the main quantities I use to analyze the value of a trading system with an example of applying it to a new system.

The basic assumption is that the distribution of returns is constant. If this is not true, then the trading system doesn't work. It's just lucky sometimes. The other basic assumption is that there is no serial correlation in the trade results. If there is serial correlation, you should account for it in your system until there isn't (for example, if the wins and losses come in streaks, you should only take a trade when the previous one would have been profitable). The only assumption about the distribution of returns is that the returns are all small enough that no one trade will wipe you out.

Using the formula for log expectancy, you can easily derive the Kelly ratio for optimal leverage: l=mu/sig^2. Furthermore, you can determine that the long-run average trade value is mu-sig^2/2. The central limit theorem says that this formula will be valid when you average over at least 30 trades, regardless of the distribution (if it is close to normal, the formula is valid for fewer trades). When you use fixed leverage l, the average trade return becomes l*mu-l^2*sig^2/2. With optimal leverage, this is mu^2/sig^2-mu^2/sig^2/2=(mu/sig)^2/2. So with fixed leverage, the best return you can get will be from the system that has the highest Sharpe ratio. The Sharpe ratio should be calculated based on however often you readjust your leverage. If you adjust it daily, you should look at the daily Sharpe ratio. If you adjust it once per trade, you should use the per-trade Sharpe ratio.

At the moment, my trading account is fairly small. Since I am planning on trading e-mini futures, the amount of additional money required to add another contract is a large percentage of my account balance. When trading a fixed number of contracts, the optimal performance criteria is different. At that point, the main question is how small of an account can you safely trade with. After a reasonable number of trades, the mean value of the trades will have a normal distribution with mean n*mu and standard deviation sqrt(n)*sig. That means that an m standard deviation drawdown will be n*mu-m*sqrt(n)*sig. Differentiating with respect to n shows that the max drawdown will be at (m*sig/(2*mu))^2 trades. Putting this into the maximum drawdown formula, the max drawdown is m^2*sig^2/(4*mu)-m^2*sig^2/(2*mu)=-(m/2)^2*(sig^2/mu). Which means that you want to minimize sig^2/mu, which is the same as maximizing mu/sig^2 (which is also the optimal leverage).

To determine the minimum amount of money to trade a leveraged system safely, you multiply the expected drawdown by the contract value: MIN=(m^2*sig^2/4/mu)*VAL. For 2 standard deviations, this is VAL/l, where l is the optimal leverage. For 3 standard deviations, it is 9/4 of that value (a little more than twice as high).

You should also check what the value of n comes out to. If it is very low, then the max expected drawdown is actually higher because you can't assume that the distribution of the means will be normal.

For example, a trading system I have been working on for trading the NASDAQ 100 futures has mu=0.837% and sig=2.327%. The Sharpe ratio is 0.35, so the maximum return per trade (with leverage) is 6.47%. The optimal leverage is 15.47 (the maximum leverage due to current margin requirements is about 5.4). The maximum expected drawdown value for 2 standard deviations is $1391 and for 3 standard deviations it is $3130. However, for 2 standard deviations, n=7.7 trades and for 3 standard deviations, n=17.4 trades, so those estimates are probably low. For 4 standard deviations, n=30.9 trades, which is enough for the formula to be valid. The maximum expected drawdown amount for 4 standard deviations is $5565. Since the margin requirement is $4000, this system should not be traded in an account with less than about $9565 in it if you want to be really safe, although it is probably ok to trade with as little as $7170.

I haven't actually worked out the math for how differently skewed trade results change all of this. Based on actual simulations, there is a 1% chance of a 12% drawdown ($2507) and a 2% chance of a 10% drawdown ($2125). The simulated result with a probability corresponding to 4 standard deviations is a drawdown of 23% ($4970). That suggests that this system can be safely traded with as little as $9000, or $6500 if you don't mind a 1% chance of dropping below the margin requirements. A second contract should be safe to add once you are above $10K, although it isn't entirely safe until you are above $14K. Above $12k, it is probably best to trade this system with maximum allowable leverage (about 5.4). This will produce an expected logarithmic return of about 3.7% per trade (about 19 trades to double). With about 1.5 trades per month, this is an expected doubling time of about 1 year.


Thursday, February 26, 2009

Information Theory and TA Indicators

Information theory is a branch of math that deals with determining how random something is. As such, it is useful to think about information theory when trying to find patterns in mostly random data (like stock prices).

In finance, the basic problem is determining what the next value in a time series is. With technical analysis, this problem is solved by looking for historical patterns that are similar to the current time series and seeing what the next value was after the match. In other words, TA is basically the practice of putting each day into a bin of quantitatively similar days and then prediciting that the next return will be close to the mean value of returns for that bin.

An important question to consider is how many bins to sort your data into. If you take the RSI indicator, it produces a number from 0-1. You can clculate that number to a fairly large number of decimal places. But realistically it won't matter past at most 2 (which is one reason it makes sense to scale it to 0-100). And it mostly won't matter beyond high, low, and neutral. You might be able to add very high and very low. But you don't actually have enough reliable information to split it into more than maybe 5 or 6 bins.

In information theory, a common way to express the amount of information you have is in bits. A bit basically represents a 50% chance of guessing what the information is when you haven't actually received it yet. More bits of information represent a lower probability of randomly guessing correctly. So with 2 bits of information, you would have about a 25% chance of guessing correctly. Note that in information theory, bits are not discrete, so it is perfectly valid to say you have 2.5 bits of information.

My feeling is that most technical analysis indicators give you at most 2-3 bits of information. That is equivalent to saying that you could divide the numbers into 4-8 bins where the different bins actually mean something, but that if you try to go further than that you aren't actually improving your sorting.

Furthermore, most TA indicators are fairly highly correlated, which means you can't improve your predictions much by adding more indicators. So if you have 3 oscillators operating on the same time scale which all provide 2 bits of information, you will probably get about 2.2-3 bits by using 2 of them and 2.5-3.5 bits by using all three of them. The reason for this is that if one of your oscillators is oversold, it is likely that the other two are as well (and so on). I would guess that the most information you can get from technical analysis is probably on the order of 4-5 bits. With 4 bits of information, you would expect to get the market direction right at least 80% of the time, which is more than enough to make money.

One problem that many system developers run into is that they pretend to have more information than they really have. One example is curve-fitting. Let's say you have an oscillator and you are choosing the period, overbought, and oversold levels. You are introducing about 5-10 bits of information based on what levels you choose. That makes you indicator appear to produce substantially more information than it really does. The best setting will produce phenomenal results, but they aren't likely to continue out of sample.

Another way to produce imagined information is by using overly complicated indicators. For example, it has been widely reported that you can make a decent trading system based on looking at whether today was an up day or a down day. This produces almost 1 bit of information (slightly less because it isn't a 50/50 split). If you look at 2 day patterns of up or down, you get about 1.8 bits, and you can make a better prediction. But if you keep adding more days, eventually you aren't adding useful information any more. If you go out to 20 days, you have about 16-19 bits of information, but most of it won't help you predict what will happen the next day. In fact I would expect the returns from the strategy to start dropping as you add more days past a certain point (probably 3-5 days).

One way of knowing when you have overestimated your information level is by looking at your sample sizes. 5 bits of information gives you 32 bins. You probably want at least 50 samples per bin, so you need about 1600 days to reliably get 5 bits of predictive information (and that's under ideal conditions). If you look at 20 days of up/down data, you have just over 1 million bins, so you need about 50 million days of data to expect your information to be reliable. When a system is curve-fit, varying the parameters just a little bit will move only a small number of observations from one bin to another. In terms of information, the two systems are different by only a small fraction of a bit. If that produces large changes in your system's performance, then you are using unreliable information to produce the extra performance. Larger sample sizes would increase the number of observations sorted differently, which would increase the information difference and increase your confidence that the difference is real.

Labels: ,

Tuesday, February 10, 2009

The Economy

For at least the past 20 years, the US and world economies have been based on borrowing money in order to spend. GDP growth has been based on the consumer class buying enough to keep everyone employed, but that required spending more money than the consumers were earning. Borrowing was done to make up the difference. This meant that the world economy could grow as long as bankers could come up with ways to lend out more and more money to consumers.

But eventually a debt-based economy will collapse. I keep seeing people say that the economy collapsed because of housing. But the housing market isn't the source of this trouble and fixing housing won't help. The housing bubble was created as a means of justifying writing such huge loans to consumers - the loans were considered safe because they were backed by houses. The mortgages didn't go bad because the housing market collapsed. The housing market collapsed because the banks couldn't come up with loans creative enough to push house prices higher while keeping the monthly payments low enough. In other words, the banks had pushed lending as far as it could go and even their insanely low lending standards were too restrictive to allow further lending.

So now we have an economy that relies on consumer spending for growth, but consumers are too scared of the future to spend any more than they have to. You don't want to see what the equilibrium point is for that. It involves everyone learning how to grow their own vegetables. And having enough land to grow their own vegetables. Which doesn't work very well for a society that has many people living in cities and suburbs.

This isn't a problem that can be fixed by getting the banks loaning money again. That is probably necessary in the short-term while the structural problems are fixed. And this isn't a problem that can be fixed with tax cuts. Tax cuts allow people who are earning money to keep more of it. But the problem is the people who aren't currently earning money, and the people who are concerned that sometime soon they won't be earning money. Cutting taxes doesn't help someone who is laid off. And people know that, so it has no psychological benefit of convincing people to continue spending while they still have a job.

If the government spends enough money to get us back towards full employment, then people will go back to spending. But there has been a large psychological shift now. People are not going to load up on debt the way they did before. And even if they were willing to, the banks aren't going to write loans as freely. We need to fix the income distribution problem. It is actually likely that raising taxes (particularly on the wealthy) will help solve the problem, by pulling money away from people who aren't spending it and transferring it to people who will spend it. Raising taxes on the wealthy will almost definitely be part of the long-term solution, but the reasons for that deserve a separate post.

The Senate has removed most of the stimulus from Obama's stimulus bill and replaced it with useless tax cuts. Hopefully the House will have the sense to insist on the stimulus being put back in (the tax cuts aren't terribly relevant right now, just a waste of money).

And for longer term solutions, we need to get to work on the income distribution problem. Which for the most part hasn't even been mentioned yet.


Wednesday, December 03, 2008

Oscillator Time Scales

Most technical analysis indicators are some form of oscillator. An oscillator can be roughly defined as a numerical indicator that goes up and down in a somewhat fixed range. Non-oscillating indicators (like moving averages) are harder to use because they don't have many repeated values. But most non-oscillating indicators can be turned into oscillators by comparing relative values (for example, the ratio of two moving averages is an oscillator). So for the most part, numerical technical analysis is the art of finding oscillators with predictive value. Charting is an entirely separate practice.

For the most part, oscillators are either positively or negatively correlated with price: if the price goes up, the oscillator goes up/down, and if prices go down, the oscillator goes down/up. There are a few exceptions (mostly breadth-based indicators), but the vast majority of indicators follow this pattern. Inversion of an oscillator allows every oscillator to be turned into a positively correlated oscillator. So a simple analysis of postively correlated oscillators will cover most things that can be practically achieved with TA. Also, you can use just about any oscillator you want to, since they all tell you the same thing.

The main thing that will change from one oscillator to another is how the indicator accounts for past price changes. A fast indicator will mostly just use the last few bars of prices, while a slow indicator will use a larger number of bars. Different indicators will have varying weightings over the period they look at, so some indicators will do a better job of picking up net price movements in a choppy market than others will. But the speed ends up being the most important factor.

There are also two ways to trade the market: momentum and mean-reversion. Momentum trading is when you buy when prices have risen and sell when prices have fallen. Mean-reversion trading is when you sell when prices have risen and buy when prices have fallen. Both styles are profitable most of the time at some time scale. The key trick to trading profitably is to determine what time scale works best for mean-reversion and what time scale works best for momentum.

As an example, consider the RSI_ema indicator. The Matlab code for this indicator is
function [x] = rsi(price, period)


The u variable is the up movement in the price each day (0 if the price dropped). The d is the down movement (0 if price went up). us and ds are the ema's of the variables. Then you compute the fraction of the total price movement that is up movement. The standard RSI indicator uses sma's instead of ema's. Most people also multiply the value by 100 to get a range of 0-100 instead of 0-1.

The RSI_ema indicator is a simple, positively correlated oscillator. To trade in momentum mode, you buy when the indicator crosses above some threshold (somewhere between .7 and .95 normally) and sell when the indicator crosses below some other threshold (somewhere between .05 and .3 normally). you can stay in until the reverse signal is generated, or you can set a threshold closer to .5 for closing your trades. So you might go long when the indicator crosses above .9 and then close your position when it drops below .5 and go short when it crosses below .1 and then cover when it crosses above .5, or whatever values you have chosen. You can even use asymmetric values if you want to go long or short more easily. To trade in mean reversion mode, you take the opposite trades.

The test I am performing determines how RSI_ema responds to different oscillation rates in the market. For this test, I am using a sine wave plus a constant to generate the price signal. The market never moves in perfect patterns like sine waves, but this will demonstrate how indicator performance will vary based on market conditions.

The first test is to see how different values for the RSI_ema period perform at different market frequencies. I ran a sine wave with a period from 10 to 200 bars through the momentum trading strategy. For each RSI_ema period, the sell threshold was set to .1 plus the 20th percentile value of the indicator (to adjust the level somewhat based on what range the indicator actually moved in). The buy threshold was set to one minus the sell thrshold. The system is always in once it makes its first trade.

Here is the result of a very choppy market (sine wave period=10):

As you can see, the choppy market is moving too fast for most values of the RSI_ema indicator to even try trading it. The ones that do manage to trade it lose money. They would make money if they had been traded in mean reversion instead.

Slowing down the choppiness a bit:

The faster settings of RSI_ema start making money. The crossover seems to be around 1/3 of the sine wave period.

And slowing it down even more:

Here, the crossover can be seen better. Again, trying to trade a slow moving market with a fast momentum indicator works well. Trying to trade a slow market with a slow momentum indicator does not work. The slower settings should be used for mean reversion.

Now for one more graph. This one shows how the profitability changes with a fixed RSI_ema period of 4 as the sine wave period is varied:

Once again, for very fast markets, the indicator does not provide any signals. As the market slows down a little bit, the indicator makes money when used in mean-reversion mode (remember that mean-reversion trades opposite to momentum, so a momentum loss is a mean-reversion profit). As the market slows down even more, the indicator makes money in momentum mode. The odd spikes occur when the sine wave period is a multiple of the RSI_ema period and should be ignored.

Of course, no security is ever going to trade with a perfect sine wave (and if it does, you don't need an indicator to trade it). But, knowing how oscillators vary based on the market speed is useful for building an adaptive trading system. There is no single setting for any indicator that will always work. Sometimes the market is very choppy and you want a fast mean-reversion system to maximize your profits. Sometimes the market is moving in long trends and you want a momentum strategy. Looking at the recent performance of trading strategies based on a range of indicator speed settings will provide some guidance as to how fast the market has been changing directions recently. If you assume that this fundamental period will change slowly, then you can measure the recent value and use that to choose optimal indicator settings.

For example, RSI_ema crosses over from making money to losing money when the setting is about 1/3 of the sine wave period. If you plot the profitability of RSI_ema strategies over the revent past, you should see a graph moderately similar to the ones above. That will show you roughly where the crossover point is from mean-reversion to momentum. You can use this information to determine whether you should be trying to catch trends or watching for reversals. You could also do this with any other oscillator.

Note that in real markets, you won't get a nice clean drop-off like you do when trading a sine wave. Real markets have a balance between mean-reversion and momentum going on at all sorts of time scales. A graph of the profitability based on the time setting of the indicator is likely to cross zero several times as you pick up on various trends and reversals at different time scales. The trick is finding regions that are relatively stable on one side or the other (momentum or mean reversion).

This can also be used to determine the underlying characteristics of the market. The time scale-profit graph is one of the signatures of who is trading and how. Interpreting it correctly can provide an edge in trading.

Labels: ,

Thursday, November 20, 2008

Parabolic growth, exponential decay

The leveraged etfs are fairly complex devices to fully understand. Their short-term behavior is simple enough, but most people don't understand where they will go long-term. I'm going to do my best to analyze them.

The math:

First, the variables have to be defined. I'm going to use x for the change in price of the underlying index each day (a 1% increase would be x=.01), a for the long term ratio of the index level (a 1% increase would be a=1.01), and p for the price of the index. The corresponding values for the leveraged etf will be y, b, and q.

If you have a continuously adjusted leveraged etf, where the leverage is l, then the differential return on the etf would be
Integrating both sides (and starting with p=q=1)
So a double leveraged etf will have q=p^2, and an inverse double leveraged etf will have q=p^(-2). In particular, at the end of the day the double leveraged etf return is
But this is only if you rebalance continuously. If you rebalance once a day, then the daily return is
which means that the return is low by a factor of x^2 each day. With the inverse double etf, the continuous return is
The daily rebalanced return is y=-2x, which is low by 3x^2 every day (the terms beyond x^2 are generally too small to matter, with the exception of single day returns above 7% or so). Note that for typical daily returns of about 1%, the leveraged etfs are underperforming continuous rebalancing by 1-3bp, which doesn't add up very quickly. But when volatility increases and daily returns are typically about 3%-7%, the double etfs will underperform by about 10-50bp/day, and the double short etfs will underperform by 30-150bp/day.

You can try to work out the long term return by multiplying the series together, but it will be much easier to take the logarithms. For the index, the long term logarithm is
Again, the x^3 terms can be ignored most of the time. The continuously rebalanced etf returns would be
double long:ln(b)=2ln(a)=2*sum(x)-sum(x^2)
double short:ln(b)=-2ln(a)=-2*sum(x)+sum(x^2)
With daily rebalancing, the returns are instead
double long:ln(b)=sum(y)-sum(y^2)/2=2*sum(x)-2*sum(x^2)
double short:ln(b)=sum(y)-sum(y^2)/2=-2*sum(x)-2*sum(x^2)
So here again, the double etf is underperforming by x^2 each day, while the double short etf is underperforming by 3x^2 each day.

It is useful to call the sum(x^2) term the variance (technically it isn't the variance, but it is pretty close and it is what you can trade as variance futures on SPX), represented by v.

As I said, the double long etf should have a return of b=a^2. But, with daily rebalancing the formula is instead
double long:ln(b)=2*ln(a)-ln(v) or b=a^2*exp(-v)
double short:ln(b)=-2*ln(a)-3*ln(v) or b=(1/a)^2*exp(-3v)

I tested these formulas against simulated double long and double short etfs (which eliminates tracking errors and expenses), and found that they match very well. The only exception is that the '87 crash (20% in a day) caused a jump change of about 2-3% in the value relative to what was expected. The formulas are not valid when there is a move over about 7% because the higher order terms start mattering. I'm surprised that the results matched as closely as they did over the 20% move. If the error from the '87 crash is ignored, the formula has an error on the order of 40-60bp over a few decades. I think that is close enough to call it valid.

The corresponding formula for other leveraged etfs comes out to
1x short:b=(1/a)*exp(-v)
triple long:b=a^3*exp(-3v)
triple short:b=(1/a)^3*exp(-6v)
quadruple long:b=a^4*exp(-6v)
quadruple short:b=(1/a)^4*exp(-10v)
5x long:b=a^5*exp(-10v)
5x short:b=(1/a)^5*exp(-15v)
The coefficient in front of the v is l/2-l^2/2 (and remember that l is negative for short funds).

The double leveraged etfs will have parabolic price curves relative to the underlying indices. But those parabolas decay at an exponential rate based on the volatility. Which provides for some interesting possibilities when trading combinations of them, or options based on them. The major indices aren't terribly volatile, but some of the smaller indices are. The financial and semiconductor indices are probably sufficiently volatile that both the double long and double short etfs will eventually be pushed to 0. But remember that there will be wild swings on the way, so you can only short them if you have a lot of capital.

You can use combinations of the double etfs to trade consolidation and breakout patterns. If you are certain that the market will be consolidating, then you can short both etfs. The volatility decline will puch their prices down, and small movements will be basically offset. If you are expecting a breakout (perhaps at the point of a triangle) you can buy both. The parabolic return profile will mean that you make money as long as the market actually makes a big move, regardless of the direction. But remember that you have a volatility decay eating away at the prices every day.

A quick way to estimate variance is that the variance is equal to the square of the volatility. So when VIX is at 20, the expected variance for the year is .04. With VIX at about 70, the expected variance for the year is .49 (or .04/month). The exponential decay will cut the value in half whenever the exponent goes up by about .7, so SSO is expected to drop by 50% (relative to the parabolic curve from SPX returns) every 17 years normally, or every 17 months if VIX stays at 70. SDS is expected to drop by 50% every 6 years normally, or every 6 months right now. Which is why SDS is only up a little bit despite the huge drop in SPX. And SSO is plummeting due to the parabolic returns compounded by exponential decay.

Another point is that the equations are valid for other rebalancing periods as well (as long as the returns are small enough for the x^3 terms to be ignored). So you can change the rate of decay by changing the rebalancing frequency. The formulas are probably good up to about monthly rebalancing (and will certainly work for intraday rebalancing). According to EMH and random-walk theories, the variance will add up at the same rate regardless of the rebalancing frequency. But I don't think many people take the random-walk theory seriously anymore.

At some point I will look at how these formulas compare to the actual etfs, which will show the effects of tracking error and costs.


Wednesday, November 19, 2008

What's in a name

Just a quick explanation of what feanen means. It comes from JRR Tolkien's Elvish language and means spirit-water. This is related to Chinese philosophy and 5-element theory. The water element is associated with long-term goal setting and planning. It is what allows people to come up with a plan to take care of any situation. The image to help picture this is a river flowing down to the ocean. You can put a dam in front of the river, but eventually it will spill over the dam and get past it. Any obstacle in the path of the river causes at most a delay. The water is going to get to the ocean. It may have to change course a few times, but nothing is going to stop it entirely.

This will be my trading blog. I think the above image represents my approach to trading reasonably well. The market will change over time and unpredictable things will happen, but I will do my best to keep the goal in mind and keep going.

For now, I wish to remain semi-anonymous. I generally leave comments on other blogs as jkw. I expect this to be a fairly math-heavy study of the markets. Feel free to ask for clarifications. This will mostly be for my own benefit, so that I have somewhere to write down the math that I have worked out.