This Spring Term graduate course is about financial time series --- in two complementary respects. First it engages all the usual data and the associated theoretical models, just as one would expect. Second, it looks hard at the algorithms that are used to estimate these models. In some cases, there is considerably more subtlety to these algorithms than many analysts recognize. Finally, to make the two themes lively, the course looks at a variety of assets. We'll certainly spend some time trying to understand such phenomena as" sector rotation" (if it exists). We'll also dig into some understudied assets like closed end funds and structured products. These are often found to exhibit interesting (and anomalous) behavior in comparison to more classical (and more "efficient") assets.

Course Blog

What you find below is the course blog for the completed course of Spring 2008. This will give you an idea of how the Spring 2009 course may go. As with any blog, it is in reverse chronological order, so you may want to begin reading from the bottom. You should also expect differences of many kinds due to the changes in the financial markets. I'll keep this blog up until December 2008, after which the new blog will start and the old blog will be archived.

bamboo rule

5/23 Cool Regression Trick. We have often asked ourselves "which day parameter should I use for an exponential smooth that I plan to use for prediction?" A good suggestion from Dean Foster is the following. Consider the lagged EMA(k) for some set of k's, say k=3,6,16,32,64. Next run the forecasting regression with these smooths and say the previous lagged value of the series. Now use this fitted model the way you would have used the EMA(k) in the past. There are "in sample/out of sample" issues here, but this should give you the basic trick and you can consider the variations. I think that in MANY situations, this is the smart way to go.

5/5 Sidebar and Oil Up-date. First, please review the project deliverables. Also, a while back I speculated that we would see oil at $100/bl before we would see it at $140/bl, and, despite today's up-tick, I will still take that bet --- say for a lunch at the truck of your choice!

5/1 Sidebar --- LB P-Values and a Subprime Forecast: The old RMetrics Newsletter of Aug 2007 is even more interesting when read now --- eight months after issued. The table of LB p-values on page 4 make a great "in extremes story," but it's not the familiar LTCM "in extremes everything is correlated" story. What the table suggests is that in extremes you get increasing predictability --- what an interesting irony! Is it exploitable?

PROJECT DEVLIVEABLES: Your project is due on May 12 at noon. You should provide BOTH a hard copy to my office mail box and an electronic copy to my email box.

Please NOTE on your first page if you give your permission to have your paper POSTED on the web.

I won't post any project without your approval, but with your permission I would like to post a few --- either because they show an especially good design for project reports or because they open some discussion that merits further development.

WSJ Rates

Graphic Comment. This graph from the 4/27 on-line WSJ argues that the current oil shock is more substantial than the three previous shocks. It is a growth-rate to growth-rate argument that seems pretty flaky to me. If instead you look at energy expense as a fraction of income, the current shock is the most minor of the four. In Stat 956 we are usually fans of rates vs levels, but this time rates just don't seem like the relevant measure.

Sidebar: Sharpe Ratio's for Put Writers. David Bates observed "Furthermore, the post-’87 Sharpe ratios from writing put options or straddles seem extraordinarily high –-- two to six times that of investing directly in the stock market. These speculative opportunities appear to have been present in the stock index options markets for almost 20 years. I believe the stock index options markets are functioning more as insurance markets, rather than as genuine two-sided markets for trading financial risks."

Sidebar: ASA

Sidebar: Currency Deposit ETFs. There is a piece at SeekingAlpha that does a useful job explaining that these are pretty dodgy assets, especially via Rydex but possibly even via the usually solid Barclay's.

Sidebar: BXU is a ML Buy-Write ETN with a monthly pay out that annualizes to 8%. The prospectus is 112 pages long. Do the (perhaps elderly) purchasers of these notes understand what they are buying? Do even their "advisors" understand?

Note: It is definitely OK to talk about your projects in class. It helps everyone. You should also be very clear in your writing. In particular, if you examine a set of strategies, you should specify the strategies very clearly. It may help to think of your work as a "brick in the wall" --- something solid and true that can be relied upon by others. I'll say more about style and scope in class.

[Apr 23] We're getting down to the wire, and I am getting lots of questions about projects --- design, scope, and ideas. We'll spend some time on these at the beginning of class. You should also take advantage of the workshops (if you can) or the office hours (if you can).

Sidebar on the "Dividend Capture Strategy": This is a strategy that seeks to exploit (1) the currently favorable tax treatment of dividends, (2) the possibility that stock prices only imperfectly adjust after going ex-dividend, and (3) the possibility of capturing more than four "quarterly dividends" per year. Within the last few years some large CEFs have been launched on the basis of this story. These CEFs or the strategy itself can make for a very good final project.

Sidebar on FX ETFs: Barclays iPath offers ETNs (exchange traded notes) that are designed to provide exposure to the movement of single foreign currencies ( ERO, GBB, JYN). These looked quite yummy for while since it looked like you could get foreign deposit returns and have favorable US dividend or capital gains tax treatment. The IRS ruled against this, but these are still interesting. The project would be to look at the return on these notes compared to the return implied by the foreign deposit rate and the change in the exchange rates. This could have interesting time series features. For example, a MA component is likely to be present, just as we saw with inflation rates and short-term interest rates.

Incidentally, if you like the short side, you skip the Barclay ETNs and consider the Rydex Currency ETFs. The have more (direct and indirect) expenses --- and these are good things if you are short! For example, long GBB and short FXB looks like it may offer some cheese if you get a decent rebate on your short. (The fly in the ointment may be that that shorting is not easy or that the float is too small.)

Sidebar on Oil: The records keep rolling --- $119 and change today. Is this the natural consequence of 6% annual increased demand and flat supply, or do we have a speculative bubble? Odds are that we have a little bit of both. My "Fermi bet"? We'll see $100/bl before we see $140/bl, but this is fully in the domain of idle speculation.

[Apr 20] First we'll briefly ponder a new record; oil hits $117/bl. Next we'll do a brief "look ahead" at the much more mathematical content of the sister course Stat 955. That course is really quite different from 956, but there are points of overlap. In particular, it puts a new spin on the key idea of volatility drag. I'll try to give some taste of what stochastic calculus can do for you. Also, at least at the level of metaphor, it will be useful to introduce the (badly named) notion of a risk-neutral measure.

We'll also look at a look at Armerin's Gentle Introduction to Stochastic Volatility. In particular, we'll look at the argument that SV models are (in theory) more realistic than either the Black-Scholes model or our favorite GARCH models.

We'll then get back to the old stand-by --- understanding the empirical behavior of assets, one asset class a time. We have a fine basket of stylized facts, but these have been mostly built by looking at US assets. For your final projects, you might consider what the corresponding facts may be in other countries. At the top level, this is easiest to examine with Country ETFs, but you can also consider Country CEFs many of which have been around much longer then the ETF cousins. There are surely other country resources in WRDS which you can explore and tell us about.

The country ETFs come with some surprisingly large differences in sector weights. For example, EWW the key Mexico ETF is more than 37% telecommunications, and key Canada ETF has a surprisingly large financial component. In fact, you can think of the Canadian market as "Energy plus Banks." For Brazil, the ETF is dominated by energy and materials --- and this explains a lot of the recent performance of EWZ.

Country Sector Chart

Despite these (perhaps unanticipated) variations from country to country, we are still interested in the same issues that concerned us with the SPDR sector ETFs. Specifically, is relative performance predictable in any shape or form? One can take either a time series predictive approach to this question, or look at portfolio strategies. Both are interesting and both add to our collective conversation.

Job Opening : If you are finishing this year and you are interested in a position in currency derivatives, a 434 Alumnus would be happy to hear from you. Let me know if you are interested.

Sidebar: An Amusing January Story for Energy. This piece from January 2008 makes some interesting observations about the XLE and a curious January effect. It also brings up the famous MACD, the indicator that is so visually seductive yet which never manages to provide cheese when honestly tested.

Sidebar --- Warren Buffett and Wharton Visitors: "Before we start in on questions, I would like to tell you about one thing going on recently. It may have some meaning to you if you're still being taught efficient-market theory, which was standard procedure 25 years ago. But we've had a recent illustration of why the theory is misguided. In the past seven or eight or nine weeks, Berkshire has built up a position in auction-rate securities [bonds whose interest rates are periodically reset at auction; for more, see box on page 74] of about $4 billion. And what we have seen there is really quite phenomenal. Every day we get bid lists. The fascinating thing is that on these bid lists, frequently the same credit will appear more than once. "

"Here's one from yesterday. We bid on this particular issue - this happens to be Citizens Insurance, which is a creature of the state of Florida. It was set up to take care of hurricane insurance, and it's backed by premium taxes, and if they have a big hurricane and the fund becomes inadequate, they raise the premium taxes. There's nothing wrong with the credit. So we bid on three different Citizens securities that day. We got one bid at an 11.33% interest rate. One that we didn't buy went for 9.87%, and one went for 6.0%. It's the same bond, the same time, the same dealer. And a big issue. This is not some little anomaly, as they like to say in academic circles every time they find something that disagrees with their theory."

For more background, you might start with the Venerable Wiki on Auction Rate Securities. This also contains handy information on the key trick of a Dutch Auction. One tidbit? In the Netherlands this type of auction is known as a "Chinese auction" and in China it is known as an "Irish auction". Go figure!

And from the WSJ on Auction-Rate Securities: "New York state's attorney general, Andrew Cuomo, has launched a broad investigation into auction-rate securities, instruments used by municipalities, schools, closed-end mutual funds and others to raise money."

Weekend Sidebar: A Really Goofy Topic?. Consider small country currencies that float! For example, Take a look at Iceland. When your currency becomes illiquid, anything can happen: pigs may fly and it may rain frogs.

[Apr 16] We've looked at many aspects of sector momentum, but there is also momentum to be found in the nine box styles of (small cap, mid cap, large cap) by (value, blend, growth). The simplest of the most common claims is that there are longish periods where small cap value does especially well. This can be explored most simply through the Barclay's iShare ETFs but Vanguard has ETFs that cover most of the same territory. The expense ratio of the Vanguard ETFs may be a little lower, but Barclay's had the first mover advantage --- and by now it has established substantially larger volumes (and smaller bid/ask spreads).

AB has a 2004 piece on style tilt that is worth reviewing, even though there is perhaps a modest "sales" bias in support of active management. Here's a picture from the piece, which is interesting --- but has room for improvement. Q: How would John Tukey have graphed this data?

AB style pic

Even given a good graphic, one is still stuck with the curse of our "one sample path." It is hard to say which historical features of the data honestly represent something that is likely to continue.

The parable of the mathematician and the gambler is perhaps our best source of wisdom. Formal tests that attend to multiple comparisons leave us completely empty handed. Nevertheless, it does seem more sensible to let behavior be informed by the data than to ignore the data completely. At a minimum, we can find some things that are truly bad bets.

Another place where momentum is to be found is by country or region. There are also national differences in smoothness and even feasible lead, lag relationships. You have to be clock-careful in some of these analyses. The other place to look for feasible momentum is in mutual funds, either open-end or closed-end. The suite of iShares also give one a way to consider country momentum strategies (and by proxy currency momentum). At a minimum, it seems worthwhile to have a mental picture of the running returns and volatilities.

SCJ is the iShare implementation of a Japan Small Cap Index portfolio, and it could be an interesting object to consider. A December 2006 Bloomberg piece argues that small cap Japan is a "canary in the mine shaft." Sticking this together with other folk tales about Japan Small Cap will leave one with lots of possibilities.

Crude Oil ETFs. UCR is an "up crude" ETF and DCR is a "down crude" ETF with some absolutely bizarre features vis-a-vis the nominal NAV. This is just a heads up. Their behavior is too baffling to me to have confidence that I understand the assets, so I will leave a more extensive discussion for a later time. "The price-NAV discrepancies in UCR and DCR are, in both absolute and percentage terms, among the largest ever seen in ETF history." --- from a post at Seeking Alpha.

Classic "Strategies": We'll look in more detail at the notion of a buy-write strategy in more and consider some of the CEF or ETFs that are based on the strategy. These are interesting for a variety of reasons; in particular, they can exhibit anomalous time series properties. We'll look at some CODE PURPLE strategies, and you can think about how to add to the list.

Last of the HW (and Final Project Info) : I did not make it clear in class, but the HMM last HW is due on Wednesday April 16. The final project itself, a much bigger fish to fry, will be due on May 12. On April 18 and April 25, I will hold special "Project Workshops" which are really just super office hours where some people will want to just come and watch. We'll sort out the details of the times with a class questionnaire.

[Apr 14] Jensen Effect Illustrated with EEM and EEV. EEM is the most widely traded emerging market ETF (a proxy for the MSCM emerging market index). EEV is the derivative "Power Bear" version which has a daily return that closely represents being short "two times EEM." This leads to an interesting volatility drag computation which explains what might be otherwise mysterious price plots. Fees matter and carrying costs matter, but the main source of erosion to the EEV returns are from volatility drag. We'll look at the computation in class.

Daily Rebalancing with EEV and EEM? As a strange side possibility, one might consider the (1/3, 2/3) daily rebalanced portfolio on (EEV, EEM). In theory this should return zero, but in the data it will return less (one expects). My own guess is that the short fall will be even more than can be explained by fees.

Incidentally, EEM is from Barclay's and is a retail product with honest institutional quality, but EEV is a Proshare product and it is open to more than the usual levels of banditry. The expense ratio is 95bp. This is the management fee after all of the trading and other carrying costs of the fund's assets. It takes a very special circumstance for one to buy EEV.

More on the Jensen Effect. If you think that a potted plant understands the difference between average rate of return and the annual compounding rate of return, there is a recent Money Magazine article for you. It has quotes from research, but still completely misses the Jensen effect. (BTW: There is a strange thing in biology/sociology/IQ theory called the "Jensen effect" but that is not what is referenced here.)

Sidebar: Volume and Market Impact. There is an interesting Barra piece that incorporates some of the stylized facts associated with volume. The official objective is to model market impact costs, but that part of the story does no seem super compelling. It is amusing that the piece uses GE (circa 1997) as its leading example. For us, the main point here is just a reminder that one can (should?) use volume as one of the inputs to our analysis. In particular, it would be nice to work out a good list of the stylized facts of volume.

Today (Friday 4/11/08) we have seen GE have quite an impact on the overall market. Incidentally, is it more than a coincidence that big drop days for GE have been Mondays and Fridays? Many academic papers have discussed a variety of calendar effects, but and various explanations have been offered for the empirical discoveries. Still, these all seem a little unsatisfying, and "calendar effects" won't make it to list of most folks "stylistic facts." Sullivan, Timmermann, and White make multiple cases against the reality of calendar effects, but I can't help but feeling that they are just missing out on the fun. For example of the later take a quick look at Giles, or more sensibly Jacobsen and Bouman on the "Halloween Effect" (or the sell in May and Go Away Effect.) This effect can seem pretty scary as May approaches, especially if one looks at the sector data. We'll take a look at the practical summary of the calendar effects at CXO.

This may also be a good time to contemplate the composition of the SP500.

[Apr 9] We'll look at the last HW problem in more detail and start the conversation about the final project.

We'll also try to put some preferences on the features of merit for portfolio strategies, and special attention is given to alpha though it is not a wildly popular metric. We should not forget the (unique to this class in the world) permutation test for portfolio returns. It gives you a p-value and it looks at what you like to look at --- the wealth process.

I expected that the next big item on deck would be "graphical models." This is an interesting new development with lots of room for discovery. For example, it put Neural Nets and HMMs into the same framework. Unfortunately, the area it is not mature enough to make for good classroom material. We'll look long enough just to get a taste. In particular, we'll look at some ways to generalize HMMs. These models are explicit, yet very new. We'll see how these generalizations are actually "special cases" and as a consequence we'll see that the results of Bickel and Ritov show that an appropriate version of Baum-Welsh will converge to the model parameters. Note: This does not mean that there are not other Baum-Welsh variants lurking in these models.

Regression View. One issue we will explore is the "regression view" of time series. This can be taken to be either an "approximation" or a "lie," if you believe in an underlying time series model. If you do not have a cut-in-stone believe, then the "regression view" is just another model. The sign-prediction model suggests that the "regression view" may even be a good model. Moreover, when you are free from "fitting worries" you can get very creative with your model.

It is conceivable that we are now entering what is called the "early part of the [Fed] cycle." This is a good time to look at the "SP500 market timing strategy". It's a little goofy, but it may provide guidance about some things --- though that is what they say about astrology too.

[Apr 7] The mini-projects provided many interesting discoveries, and we'll discuss these at the beginning of class. This will also give the opportunity to discuss the tools for measuring the quality of a portfolio strategy --- and ways to present such information when many strategies are considered. We'll then look harder at the tools in R for fitting HMMs in R, and introduce the last homework exercise. Finally, there are some amusing sidebars that have accumulated over the last few days and we'll consider some of those as time permits.

HMM Fitting in R. Matthew Franklin-Lyons has written up three highly relevant examples illustrating the R package "HiddenMarkov." You an run these on the SP500 test data, or on your favorite return series. These examples show you how to get going with the package with a minimum of overhead.. They may also encourage you to snoop around in David Harte's manual for the HiddenMarkov package, but Matthew's examples already cover the HMMs that we find most useful.

Installation Note: The package " HiddenMarkov" is reasonably new and it will not show up on your "install packages" pull-down menu unless you have a pretty recent version of R. The current release is 2.6.2 and it is a good idea to up-date.

In particular, these examples give you what you need to do the "bake off" between the HMM approach and the Higher Order (order two?) HMM approach to prediction of "next period signs." David Harte also has a down-to-earth paper on the mathematics of the HMM package which we may discuss more fully in class.

Graphical models are a giant class of probability (or statistical) models that include HMMs, Neural Net models, and huge clusters of models that have no specific name. Shortly, we'll look at a survey of these models to see what opportunities they suggest for financial time series. This is a hot topic that can provide a useful research direction almost no matter what your core research interests may be.

As a heads-up, on Monday we will also go over the discoveries of the first mini-project and lay out the task that remain for the final project. The new item is to look at the idea of a Graphical Model which generalizes many things, including the HMM.

Sidebar: Mathematics of the EM Algorithm. In class, I mentioned Jeff Wu's patch of the DLR argument for convergence of the EM algorithm. There is a new approach to this via an interesting variational principle that I may mention in a later class.

Sidebar: Job Openings at Towers Perrin Catastrophe Modeling"This is not an actuarial track position, our work is mostly mathematical in the areas of probability, statistics, and operations research." (Catastrophe Risk Analyst, Catastrophe Risk Modeling Consultant)

Sidebar: Some Examples of Negative Feedback Economics. Jonathan Reiss pointed out an interesting high-autocorrelation feedback in the Pension Guarantee Corporation; specifically the same events that would make their portfolio under perform are likely to bring incremental liabilities to their balance sheet because of an increase in the number of firms with benefit programs going busts. This is a (loose) kind of negative feedback, though "common factor" is a better explanation in this specific case.

There is a more classical negative feedback possibility in the economics of wind power. The issue with wind is that it produces half of the energy in 15% of the time. Energy is hard to store, so this pulse generation is a big problem if the wind contribution becomes a serious fraction of the total. Bottom line: If each new project is analyzed with the historical rates of return, the second movers may cause big pricing problems for the whole industry. We've seen this pattern before. NYC planned recycling projects using historical prices, but when their projects came on-line the prices for recycled materials sank like a stone. Much of the NYC recycling effort was subsequently shut down.

Sidebar: Efficient Markets at El Farol . "One model that researchers have used to study contrarian behavior is called the minority game. The game is based on a now-classic problem posed in 1994 by the economist W. Brian Arthur set in a bar called El Farol. Everyone likes El Farol but also knows that the place is not much fun when it’s crowded. What, then, is the best strategy to maximize the fun. Avoid weekends? Try Thursdays and Sundays? Won’t everyone else be doing the same?" --- from "How to Turn a Herd on Wall St." , NY Times, 4/6/08

Sidebar (with thanks to Matthew Franklin-Lyons) : There is a default package "HiddenMarkov" which can be installed directly from the R interface. The package also has extensive (but perhaps slightly obscure) on-line documentation. This may be a useful tool for the final projects, and it would be very nice if someone were to work out a simple (tutorial type) example for us that uses this software ---say some example like the HMM for "signs" that I sketched in class.

Sidebar Follow Up: There is a more specialized package that permits the observation distributions (i.e. the "b"-functions) to be estimated non-parametrically. Personally, I doubt that even daily series are long enough to complete these estimations, but still there may be some situations where this works out.

Sidebar: The Brilliance of Wikipedia and Common Culture. My wife and I recently had a conversation about our family cats which eventually turned to a discussion of the cats of the Simpson Family. To resolve some details of the discussion we eventually turned to the Wikipedia where we were once again amazed, enriched, and delighted to discover that our common culture is so carefully documented. The hallowed archive of the Wikipedia may offer no greater example its intellectual integrity than the definitive treatment of Lisa's cats, Snowball 1-5.

[Apr 2] We considered the EM Algorithm and noted that it is one of the most versatile tools of computational statistics. As an illustration of its usefulness beyond pure "missing data" problems, we looked at the "block bootstrap" for time series and suggested that by "erasing" a few observations near the boundary of blocks and then applying the EM algorithm, one may actually do better in some cases than one does by the pure bootstrap. This is a new suggestion which might be developed into a publishable project.

We finally got to the main task which was to go over the EM recursion equations for estimating a HMM (i.e. we completed the pure HMM part of Rabiner's tutorial). Finally we looked at a few of the more novel stylized facts that motivated Ryden, et. al (1998).

[Mar 31] I'll comment on some of the mini-projects and start digging into the mathematics of the hidden Markov models. There is at least some circumstantial evidence that these were part of the early Renaissance methodology. There is no question that they have had an important role at NSA and it many parts of communication methodology. For motivation, we'll take an introductory look at the paper of Ryden, et. al (1998).

The paper of Bickel, Ritov, and Ryden (1998) is mostly too technical for our class, but it has some nice examples in the beginning, and it serves as a reminder that a chunk of theory has been done. You can surely write many papers by taking a piece of this theory and seeing if it really works. Win, lose, or draw this is always interesting.

The history and technology of HMMs are closely intertwined with the history and technology of the EM Algorithm. This is one of those funny circumstances where there is debate about "which technology contains the other," and where the fight always ends with someone saying "you're both right."

[March 26] Jonathan Reiss presented on Risk and Time Horizon,and he also engaged our questions about current Wall Street restructuring, cool currency trades, and the agency and convexity problems embedded in the mandate of the Pension Benefit Guaranty Corporation. If a project related to this presentation is of interest to you, Jonathan is quite happy to discuss these problems further with you. (additional background Information)

Sidebar: Background On the Equity Premium.

Sidebar: The Hedge Fund Game. A recommended paper from Dean Foster's Research.

Other Notes: Case/Schiller is off 10.6% from High.

[Mar 24] The first order of business is to discuss the results of your first mini-projects which is due today. I hope that you will have many new observations to bring into the collective discussion.

We have mentioned the strategy of portfolio rebalancing several times, but I recently learned a nice theoretical explanation from Chris Rogers. He gives a pure "Jensen" argument which miraculously enough does not require mean reversion of the asset returns. What I love about this argument is that it reconciles two empirical "facts": (1) Rebalancing of risky assets does seem to add to compound return and (2) only on time scales of order of several years does one find much evidence for mean reversion. Tagged into this, I will also note how Black's leverage effect contributes to our understanding of the empirical phenomenon of intertemporal risk/reward trade offs. You can check for yourself, but it seems to me that the Black effect does not provide a complete explanation, but this could be a defect of the models that try to capture the leverage effect.

We'll also look a several other topics that engage the "cross sectional" features of time series. One of these is "within sector dispersion." I think it is a very interesting time series idea that may have predictive juice. It has many things to like. Specifically, it is (1) robust, (2) understudied, (3) non-linear, (4) benchmark linked. These are all valuable features in a cheese hunt.

In preparation for Jonathan Reiss's presentation on Wednesday, I'll give a quick survey of some time series features of Future and Options. In particular I'll say a bit about The House Price Indexes are amazingly smooth, and now that there is a futures market for these indexes, there is a lot of room for interesting time series work. If you get curious about how the index is actually defined, Standard-and-Poors has useful coverage of the methodology of the Case-Schiller index. There are several kinds of projects one can do with the House Price Indexes.

We'll also have some discussion of what could be called "weird" ETFs. Barclays iPath has a new ETN (exchange traded note) that captures the return on the GSCI (Goldman Sachs Commodity Index) plus the return on the T-bills that would be used to hold a futures position on the GSCI futures. The ETN has symbol GSG and it trades like an ETF. The expense ratio for GSG is 0.75 which is not cheap, but it is reasonable given the asset class. If we have tons of time, I'll give some pointers to the web blog for 2007 which has much more on these assets.

Finally, we'll consider the behavioral notion of "recency" and the fact that the journalistically most appealing "explanation" is seldom right. I'll also recall the great tale of the Beardstown Ladies.

Sidebar: Fed "Cycle" and Stocks. "Studying 33 years data ending in 2005, researchers found that a strategy of rotating to cyclical industries when the Fed cut rates and shifting to non-cyclicals when the Fed reversed field improved returns by about 3 percentage points annually over sticking with a broad benchmark."

This is from a newspaper article which is naive in places, but still suggestive. Naturally there is the assertion that this time is different. Also, the "theory" is close the "SP Sector Rotation" which has kicked around forever. Still, extra cheese is reported.

Sidebar: Things Change. (1) Bloomberg notes: "China's richest person is 26-year-old Yang Huiyan. She is the owner of property company Country Garden Holdings Co., listed at 125 with $7.4 billion [market cap]." (2) Mao's Red Book, Chapter 21: " New things always have to experience difficulties and setbacks as they grow. It is sheer fantasy to imagine that the cause of socialism is all plain sailing and easy success, without difficulties and setbacks or the exertion of tremendous efforts."

Sidebar: Calling It. "Such is the exuberance on Wall Street that only a brave man insists that the American stock market is overdue for a crash. Down the long history of bubbles ready to burst, it was ever thus. —The Economist, March 25, 2000". Well, I'd have to say this author nailed it; the only issue is whether he had been "nailing it every day" since January 1997.

For more on calling the turn, I recommended a piece by Mark Thornton which has unfortunately disappeared from the web. One point to keep in mind: we would delighted to be able to call the straightaways, or even to convince ourselves that there are more of these than turns.

I hope you have all been giving lots of thought to your first mini-project, and I hope you will discuss any quandaries with the rest of the class. Please do bring your questions and issues to class on Wednesday. In general, in these projects there is (1) flexibility if you want it or (2) a concrete suggestion if you prefer. Either way, the learning experience comes from the doing and the questioning. By now you should have a nice collection of theses to be confused about. Projects give you a chance to have data speak to speculation.

We'll look at a resource page which details the ways in which one can recast ARIMA models as state space modes. It is useful to note that there are often several different ways that one can represent the same probability model. Specifically, there are multiple ways to represent an AR(p) model as a state space model.

Sidebar. Scenario Analysis. There are several things called Scenario Analysis, and we'll consider some of the merits (and demerits) of the approach. There is a recent 12-step dooms day scenario that we won't discuss in detail, but which may be useful in some strange pessimistic way.

Sidebar. Persistence Forecasting and Flow of Funds. Steve Trout, a famous old marketing guy, has a recent Forbes piece that is 60% crafted from the Laura Lee's book Bad Predictions which itself is pretty much on the remainder shelf. What is wrong with the piece and the book that it confuses journalism with analysis. It also misses an agency problem. Makers of predictions of the kind used by journalists know that they get much more value out of having their names picked up by the press than they get for being right. So, in this case, what will be maximized --- outrageousness or likelihood?

Sidebar. Prediction and Agency Problems (Part II). Now consider other kinds of predictors --- security analysts. They have two things to optimize --- (1) not standing out from the pack too often and (2) having a better than average chance of being right when they do chose to stand out. Here the agency problem gives rise to the kind of rolling revisions that can help explain why (at least on the sector level) one empirically observes momentum in markets. [BTW: The claim of rolling revisions deserves to be checked. I've seen some support, but I would like to see a lot more].

[Mar 3] One issue that every one has to face is that of multiple comparisons. I'll discuss the Bonferroni criterion and the Holms procedure. We'll look briefly at a resource page on multiple comparisons.

In financial time series, multiple comparisons often present us with a bad news/good news situation. In the land of the pure Bonferroni correction, many of the phenomena that we would really like to believe may start to look less compelling. This is good news for EMH fans (or nihilists in general) On the other hand, it does force one to face certain honest truths. Ironically, it is mainly cheese hunters who have their feet put to the fire. Over thousands of square miles of "ordinary social science" you'll never hear a peep about the issue, though the fundamental facts hardly change.

We'll also look in at the "sign prediction problem". Here one throws away the information about the magnitude of the change in an asset and just looks at the direction of the change. This is a massive "non-linear" transformation, so even if subsequent analyses are "linearish" you have the chance for some predictability. In a final paper for Stat 956 in 2007 Alex Braunstein made the nice discovery that bagging plus plain vanilla logistic regression was good enough to be able to win the sign bets 60% of the time. We'll look at his results.

Alex also wrote a nice mid-term mini-project on the TIAA Real Estate Account (not formally a mutual fund). His analysis confirms that it is a very weird, but probably very useful asset to those who have access to it.

Sidebar: Shiller's NYTs Piece (3/2). Some nice Greenspan quotes and a pointer to a "noisy trader" model that is able to echo some of what we seem to see in bubbles. Still leaves us stuck with the issues that we care the most about. The problem that we only know its a bubble ex-post, even when if feels like we really should have known.

Sidebar: Beamer. The tool of choice these days for scientific presentations is Beamer. I have been a slow adopter, but I finally took the step. I wrote a brief page of what it took to make Beamer work.

Sidebar: The Buffett Letter. "For example, in 2001 and 2002 we purchased €310 million Amazon.com, Inc. 6 7/8 of 2010 at 57% of par. At the time, Amazon bonds were priced as “junk” credits, though they were anything but. (Yes, Virginia, you can occasionally find markets that are ridiculously inefficient – or at least you can find them anywhere except at the finance departments of some leading business schools.) " --- Page 16 of the 2007 Letter to Shareholders. BTW, these annual letters are great reading, always insightful, funny, and packed with great quotes.

Incidentally, there is one slightly irrational aspect to Buffett's letter. He takes himself to task for paying for See's Candies with BRK stock instead of cash, and he makes this visceral by several computations. Nevertheless, WB had plenty of times when he has held plenty of cash and did not buy back BRK stock. Why isn't this just as much of a cause for regret?

Sidebar: Follow Up on The Doors Story. I decided the experiment was not so hot after all. My comment to the NYTs: "What would be irrational would be to draw a real world inference from such a silly game. Consider this variation: Have doors "wiggle" more when not clicked for a while. Dollars to donuts, you will find that people switch more than is "rational". Bottom Line: The connection to the "keeping your options open" story is bogus, bogus, (wiggle) bogus."

Sidebar: Schwab Research put out an elementary but pleasant think piece and graphic that speaks to the tug of war between trend-following (or momentum) the mean-reversion (or equilibrium) . They find what others have found:"It depends on time scale." Naturally, there is more to the story.

A clever feature of the Schwab graphic is that it looks at the spread from the market, so a recorded 2.5% is an excess return to the market. This bakes some stabilization into the analysis. You should always look for such opportunities in your analyses and in your graphic displays.

BottomFishing

Part of the message here is that in general you are much more likely to "see" more momentum than you are to "see" any mean reversal. We'll chase down the cases. NB: There is some analytical ambiguity to this picture; we'll assume the most favorable interpretation and cross our fingers.

Here is a new puzzle: Why doesn't this picture argue against rebalancing? Or does it at least suggest that one should not rebalance more than (say) yearly? Think about this as an interview problem (except that I don't know the answer).

It reminds us also of one of our basic questions: when should one expect rebalancing to be beneficial --- either in terms of mean or variance?

There also parts of this story that not been considered in detail. Specifically, how does the right time-scale for momentum or reversion depend on the kind of asset you are considering, e.g. single stock, sector ETF, or style ETF? We've seen before that stock, sectors, and styles have substantially different time series properties.

Sidebar: Predictive Accuracy. Still on our list is to take a look at a paper of Diebold and Mariano on "Predictive accuracy." What I like most about the paper is the agenda that it sets.

Sidebar: Turning Points and Persistence Forecasts. Almost all methods of statistical time series are focused on some aspect of "persistence" --- even it is is the persistence of a oscillation. As a corollary, statistical methods are particularly lame at the detection of "turning points." Still, there is no reason to be embarrassed. Conventional wisdom (say as reflected in a old IHT piece) is that turning points are simply damn hard to predict. One really should be quite satisfied with much less, say a modestly reliable measure that a given "trend" that we see is more likely than not to persist.

The poor-man's method is simply "persistence forecasting" --- the statement that it will be tomorrow as it is today. This may seem dim-witted, but for monthly CPI rates, or for most interest rates, or exchange rates even this trivial forecast is surprisingly reasonable. It always provides a good starting place, which one can sometimes improve upon a bit.

One of the perennial targets of the forecasting business is speculation about future health care costs. These almost always strike fear in the hearts of the people with responsibilities for large organizations.

Sidebar: Completive Analysis --- Mathematics vs Eyeballs. We'll probably never get to his little epiphany in class, but I wanted to record it for posterity. The basic observation is that --- despite the many (false?) illusions that "price" pictures can throw in our way --- many thousands of people look at them every day. Even to me (a mostly anti-EMH guy ) this suggests that if there were some powerful trading signal to be found by such gazing, the cheese should have melted by now.

The good news here is that vastly less effort has been focused on thoughtful graphics for multiple time series. For believers in inter-ocular test (the ones that hit you between the eyes), this could be a very fertile area for research. In general, cheese --- if it is to be found --- is much more likely to be found in the relation of multiple time series to themselves rather than the relation of a single series to the time axis.

Univariate time series p lots only inform us of one realization of the many possible worlds, but when you consider the plot GLD vs SPX, it is hard not to ask, "Why didn't I guess this?" or if you were lucky enough to make the guess, "Why didn't I back this guess more?" Still, we have no tool to tell us if this was cheese that got away, or if there really was enough ex-ante signal there for us to take a useful action.

{Feb 27] We'll start by spending some time with a paper of Granger on asset price forecasting. There is wisdom in the paper, though there are plenty of places where it might have benefited from a little more precision. I'll make a comment or two about martingales before we dig in.

Note: This paper is a little old now. Some kind soul might want to do a citation search to find the more recent up-dates to share with the class.

We'll also look in more detail at the "permutation test" approach to "pure significance test" of a timing strategy. Ultimately one would like to understand separately the "intertemporal and the cross-sectional contributions" to a strategy. These would help one understand what really gave us the "extra cheese."

For example, if the cheese is always just from extra risk --- well, that is not happy news --- even if it is news you can use. This topic skirts close to honest research, and it may suggest richer projects to you. We can talk.

Also on our to-do list is the proto-type state space model of "AR(1) observed with error." There is a nice finance story that motivates this, and the model puts another interesting level of "error" into our thinking.

To put this in a bigger context, we'll take a first look at the venerable Wiki's bit on the Kalman filter. It's damn good --- and, for me, pointing at the screen will be easier than chalking up a bunch of recursions (with errors). The article also has the best Kalman-Filter picture that I have even seen.

The full story is huge, so we will just start nibbling. The tools in R for State Space Modeling are extensive. You might want to start checking them out for possible applications in your projects.

Sidebar: Old Predictions of Future Nobels. Check out a 1990 piece from UPenn Library that used citation hits as a predictor of future Nobel (hum, Bank of Sweden) Prizes in Economics. As a general issue, it is often fun to look at old predictions. With Google, it is easy to find "Best stocks for 2005" and see how well the picker did.

Sidebar: Movie Receipts Time Series. The NYTs has produced a lovely and innovative graphic that shows multiple revenue streams overtime with a natural wax and wane. One has to ask about possible distortions, but I don't see any. The "area" under the curve is the total revenue, and this looks like a good thing to me. [Thanks to Blake McShane for the Tip]

Sidebar: Predictably Irrational. You're young and smart! Have some fun; play the game! After you have played, take a look a some of the interferences that have been made about the game and ponder what they may have to tell you about life, negotiation, and financial counter-parties.

Sidebar: Exunt Equity Premium? There is a 2/24 Economist Piece that looks at the last ten years of stocks vs bonds on a world wide basis and argues that the long-running equity premium (on which so many pension funds hang their hat) may be past its prime. This analysis seems to depend more than one might like on the bond index. The choice used here may have more currency kicker than the average Joe has in mind.

stock bond spread

[Feb 25] First, a brief comment on "event studies" and the somewhat compelling impact of the Ambac/MBIA story on Friday's market.

We'll then continue with our own predictability story, stirring two new elements into the pot. One element is non-linearity, which does not have to be any fancy thing --- any statement about "order" or "sign" pushes a time series into the land of the non-linear. In particular, we'll look at the results of Jagadeesh and Titman where "winner deciles" are considered.

To me this makes a good case in favor of the momentum side of the debate. Naturally, there are critiques, and we will consider these --- and perhaps look for our own.

We'll also lean harder on the extent to which one can measure the Markov nature of asset returns. This speaks to the famous "lack of memory" property which the market may have --- or not. This can be written out in terms of "signs" or in terms of "ranks". Either approach introduces a pleasing element of non-linearity into our story. This eventually becomes important.

[Feb 21pm] Bret Arens writing in the WSJ Today called the current 0.78% yield on five year TIPS crazy. OK, so he's not a EMH kind of guy; neither am I. Still, "crazy" seems a little strong. One has to take into account that institutions can borrow short-term at 3% (LIBOR plus a haircut) which is an approximately negative real rate, so for some (rich) folks borrowing to buy TIPS is actually a money pump. That is, modulo the usual short-term/long-term yield curve issues, there is from 50bp to 100bp real pick up. This may be "picking up nickels in front of a steam roller" but --- golly--- the steam roller is moving very, very slowly. Why not scoop up a nickel or two?

Quote of the Day: "Inflation shot up by 4.1% in 2007, the biggest jump in 17 years." This is an especially unhappy event when the economy is slowing and one would traditionally have price pressures abating.

[Feb 21am] "I think we're in for one of the more significant economic storms of the last 30 years." --- John Bogle, quoted in Knowledge@Wharton's (1/23) piece on the bear market. The Bogle quote is all the more disquieting since Bogle is almost always offers a soothing voice of reassurance. Even now he is mostly of the "stay the course" point of view. Franklin Allen was remarkably pessimistic and brought up the death-star scenario of Japan 1990-present.

Bear Market

[Feb 20] We'll first go over the incoming home work --- surveying both how well R fits a GARCH and what you have discovered about the predictability of the sector ETFs.

We'll then take up the notion of co-integration and look at some of the ways that this can be relevant to "trading" --- notably the old idea of pairs trading. This is also a good time to "review" the cash flows from short selling. (Incidentally, There are many sites that provide information on the current short interest, or the current short ratio. We should look into what WRDS has on this; it could be a hot research topic.)

To continue with some "old business" we'll also discuss the leverage effect some more and (c.f. After Class Note below). Naturally, there will be new homework.

Homework Reminder (Due Feb 20).

[Feb 18] After Class Note. Granddaddy said, "more risk, more return" and cross-sectionally he was largely right, yet I have argued that inter-temporally he is largely wrong. Ironically, my simple-minded empirical test of this effect may be explainable by Black's leverage effect.

Here the simple experiment. Take your return series and for each month compute the return and compute a contemporaneous measure of the month's "volatility" by taking the sum of the squares of the returns. If you now regress return on volatility you will typically get a significant negative slope. This argues that Granddaddy was wrong --- regarding intertemporal risks and rewards.

But there is another explanation. If you have a month with a big negative return, Black tells us to expect lots of volatility in the rest of the month --- much more volatility than if we had a correspondingly big positive return. This "little" bias may be enough to explain why we get the negative slope in our simple experiment. This explanation comes with a EMH benefit; it shows that you can have a significant intertemporal negative slope effect and still not have any way to make extra cheese.

[Feb 18] We'll first take a look at some almost raw data, the (careful: slow loading 10M) classic all-pairs plot for sectors. It may tell more than numbers can. We'll then look at the sidebars that have accumulated, one on python, some on commodities, some on sectors, others on more ragged points --- including Google errors, bird flu, and a nice dynamic graphic on recession.

The main task is to close the loop on the univariate stylistic facts by going over Rama Cont's list. A few items on the list are not persuasive to me but we'll discuss them anyway. In Sections 6.2 and 6.3 opens the discussion of cross-sectional relations, which is what our scatter plot tries to tell us about. Here is a simple question to ponder: Which changes more, the volatility of a series or the correlation of that series with other series? Wouldn't it be great if asset series correlations were at least relatively stable?

Finally, we make an excursion into the Garch Zoo, just to dip our toe. We won't be done with GARCH for quite a while, but before we go wild we need to bring the multivariate series into the fore.

Sidebar: Python for CRSP Data. Justin Rising has put together a Python script that will take CRSP output for multiple tickers and transform it into a format that's much easier to work with in R. If you are curious about Python this may be the motivation just nudged you over the line. It's just possible that you have a native R script that will do the same trick, all without leaving R. If you have written such a script, pass it along and I will post it with attribution. I have been using S-Plus to handle this short of thing, but that is kind of "cheating" if we are committed to becoming R crafts persons.

Sidebar: Iron Ore Prices. The series is short and (probably) not stationary. What is a fellah to do? It is tempting (maybe correct) to "punt" but surely something thoughtful can be said. Let's start a list of relevant wisdom. While we are at it, we may consider a general argument (perhaps beginning with Victor Niederhoffer) that the asymptotic real value of an investment in GSG is zero. As a pointer to the future, we'll look at farmers from the view points of volatility drag and portfolio theory. Hint: It is not a happy picture, but it does add to our counter parties story.

Sidebar: Jack Albin (Harris Bank) Sector Views. This is a marginal (one sector at a time) look at the 8 SPDR sectors. It does not intersect substantially with the kinds of analyses that we do, but it is instructive and widely followed, as is the slightly different SP view on sector earnings.

Sidebar: Google Finance Errors. All data has to be approached skeptically, but financial data from Google or Yahoo! are brutally error prone. One amusing error at Google is given by the P/E ratios of BRK.A and BRK.B which Google gives as 16 and .53 respectively.

Sidebar: Eliot Spitzer. The current Governor of New York has been characterized as a walking bear market. It's simply true that for much of his career Spitzer has not been good for most portfolios, even if one must grudgingly admit that from time to time he has generated a few scraps of public good --- so it may all work out in the long-run --- if we live so long.

One pundit recently observed that Spitzer is inclined to "shoot the wounded," and this seems to be a useful insight. We can chat about this before or after class. Still, this is weekend stuff which I hope is interesting, though I confess that can't see a way to squeeze a quantitative nickel out of it.

Sidebar: Quidel. Crazy Cramer (2/15/08) made a trumpet call for Quidel and while this usually would not interest us in the least, he added a concept that is worth at least a little thought. The concept is "not in the numbers." Generically, this is the task of having some insight that has been missed by the other analysts --- thus, a way of generating a view of future earnings that differs from that of other analysts.

Ironically, QDEL is a "bird flu stock" which showed up on my screen about 18 months ago when I had a slight case of bird flu paranoia and kept the blog --- Bird Flu Economics. Mainly I was just moved by the predictive power of a pandemic, especially when the WHO flu gurus regard it as inevitable. Like most blogs, the life of BFE has exceeded the attention span of the author. Still, some of the post were amusing, like the BF/PH mindshare piece. The useful point now might be that the systematic use of the Google mindshare tool might be relevant to financial time series.

Here, the specific Cramer claim is that the substantial flu season observed this year is not reflected in the earnings estimates of Quidel, a firm with much of its earnings coming from Flu diagnostic tests. It is not easy to study this particular claim. Still, you may be able to think of some honest quantitative approach to this type of question. This will not be easy, but the shear difficulty of the task suggests that it could be a source of persistent cheese.

We can't pursue the idea to any depth in our class. It's mostly for others to pursue. Still, in general, it is a reminder that there cannot be anything like an efficient market unless there is some mechanism for the discovery of prices that create (more or less) rational efficiency. The other part of this puzzle is that the people who do the hard work of price discovery, need to get paid.

Sidebar: Elegant Recession/Bear Market Graphics. The dynamic graph from Forbes is not exactly happy talk, but it is instructive. In the more-for-fun category, there are always the mesmerized economists.

[Feb 13] In class today we went over some blog sidebars, introduced the new homework, and continued the story of Garch Models, picking up the T-Garch and the Stochastic Volatility model. We also summarized the set of "stylized facts" that we have accumulated so far. Rama Cont has a nice list stylized facts; we'll discuss it more next time.

I'd say Conts list is close to complete, at least as far as univariate series are concerned. The whole insure of stylized facts is much less well developed for multiple return series, so this will be a useful topic for us to explore. Most of today's class will be about GARCH models and the more mysterious (to me) Stochastic Volatility models. We'll also look harder at the notion of predictability and we have the usual selection of "odd topics" to consider, including a mild paradox.

Sidebar: Endowments.Last time I mentioned David Swensen's claim of incremental returns from rebalancing parts of the Yale Endowment Fund, and there is a page that follows up on this.

Homework: Due Wednesday Feb 20. This is a two part assignment. Part 1. Write an R function that simulates a GARCH(1,1) model and then see if you can get the fitting tool in rMetrics to recapture your coefficients. Part 2. Consider the sector ETFs and write a thoughtful report about the "predictability" of these series. The absolute minimum would be to rank the sector ETFs by the p-values of the Ljung-Box test applied to daily values. I'll give you lots of other ideas to try, but I don't want my ideas to limit yours. What I want --- what lots of people want ---is insight into predictability. Even tentative and relative insights will be useful.

[Feb 11] Xiao Liu has passed along an interesting piece from Seeking Alpha: Rebalancing Can Be Hazardous to Your Portfolio. It reports on a simulation study with two asset classes and with period t returns calculated by an independent two -dimension normal draws with the historical means and covariances. This is indeed the kind of model that many financial advisor firms use to illustrate a feasible range of future outcomes to their clients. For the purpose of illustrating variability, the model has some value, even though we know that the normality is brutally wrong. In this study, there is something else wrong too.

Here the author looks at the effects of rebalancing and he finds no benefit. This is not a surprise; the benefit of rebalancing depends on mean reversion which is not a part of this model. There is no time series effect to the model --- it is vector IID. What I found slightly amusing is that in this model there was an observed "negative benefit" to rebalancing. In retrospect this is also obvious. The returns are independent so sometimes by chance you will own more bonds that would be optimal. That is the full story, Voi-la. Moreover, doing rebalancing with historical data (using our one sample path of historical returns) does show some small benefit to rebalancing, so by our method of "simulation p-values" we we would reject the feasibility of this model.

To link back to our earlier discussion of perfect foresight, note that in the model with independent returns we a baking it into the cake that no foresight is possible. This makes any allocation strategy irrelevant, not just the specific rebalancing strategy.

Sidebar: P/E Goes to Infinity? Here is something that seems paradoxical to me, but I may just be missing something simple. Pension funds and others assume future returns to equities of about 6% (real). At the same time they assume growth in the economy to be about 4%(real). If we assume real profits grow at the rate of the real economy, doesn't this imply that the P/E ratio diverges to infinity? Perhaps not, but I can't yet resolve the paradox for myself.

[Feb 9 and 10] We won't have an official HW due on Wednesday the 13, but you can use your time to build a data set in R that has the daily returns from the start of 1993 to the end of 2006 for all of the SPDR sector ETFs. Also, you should start checking out rMetrics. We'll soon be taking a look at the rMetrics white paper on GARCH modeling. (Note: At a minimum the notation in this paper is not as careful as I would like, so parts must be read with a grain of salt.)

Sidebar: Size Rotation, TAA, and Graphics. There was a quantitative group at Mellon (now morphed into BNY Mellon Asset Advisors) with an instructive piece on Size Rotation as part of a tactical asset allocation scheme. There are two novel plots they used and which you may want to think more about. From a core statisticians point of view, econometicians and financial data analysts are under users of graphical ideas. There are many situations where a good plot is worth its weight in p-values.

This paper also provides a reminder of a very useful analytical benchmark. Consider the returns to perfect foresight! For example, each month you guess perfectly and hold the Russell 1000 or Russell 2000 according to the one that does best that month. The return to this prophetic switching process provides you with an upper bound to the excess returns you might get by any switching strategy. You can then ask yourself questions like:"If I could get 30% of the extra return from perfect switching, would this be worthwhile.?"

Sidebar: Equity Premium and Pension Fund Assumptions. The single empirical fact that has the most influence over investors is that over almost all 20 year spans US equities have substantially out-performed fixed income investments. This is at least a little paradoxical --- and practically it is of paramount importance. How big has the equity premium been in the past and how big can we expect it to be in the future? We'll discuss some of the points made by Arnot and Bernstein about this important issue.

Sidebar: Bellwether, Smellwether? "We think investors
have a more favorable view of the 2008 prospects of United Health Group, which has by far the largest market cap in the group and which we think some investors consider a bellwether for the group."
-- from and SP Research report on the managed care segment. Here is the question: Can you give analytical evidence one way or the other that UNH leads the other components of the sector such as HUM, CI, AET, WLP, etc?

Incidentally, this question plays into two big themes that seem to me to have real potential for quantitative investigations. First, if something is indeed widely believed then it can become a "self-fulfilling prophecy." Second, there is the old (but instructive) quote: " It is easier to find gold where someone has already found a few nuggets."

Sidebar: Sector Rotation. There is quite a bit of information, debate, speculation, and interest in sector rotation. I have an introductory page on sector rotation which I will augment and revise over the semester. You might check it out periodically. I've already mentioned the sister page on style rotation.

sector rotation

This is the classic picture of the S and P sector view -- Here Red is Wall Street and Green is Main Street. If you believe that we are now in "early recession" this you can see that this particular view is pretty far off base --- or perhaps not. It tells us that the Finance Sector should be doing well, but of late it has been getting hammered. This is right in line with Mark Twain's observation:"History may not repeat itself, but it rhymes." Basically, this picture seems "broken" but that does not mean that the whole idea of cycles or rotation is broken. It's just a lot more nuanced that one might have hoped. There are features of self-reinforcement in markets that logically can't go away, even if --- damn it all -- they seem to manifest themselves in different forms each time they appear.

From Today's News. "If we're in a recession now, which is pretty likely, we've probably seen most of the worst of the downside to the stock market," Ellison said in a non-by-line piece in CNNMoney.com "The market tends to rebound when the economy reaches its worst quarter." Oh, really? What is the sample size for this inference? Eleven at the most, and I'll bet if you looked into the details of these you'll find a much more nuanced story.

Sidebar: Wealth Management Baloney. Please check out the rich factual content of the Merrill Lynch "Wealth Management Process." What is it in human beings that makes them susceptible to this kind of vacuity? Alternatively, why are people so disinclined to work out the erosive effects of reducing their net returns by 150 to 250bp? If you think this is harsh, you should read David Swensen's excellent book (especially Chapters 7,8,9 and 12). Sigma Investing has a summary.

MLBull

[Feb 7] You saw from HW3 that the CPI-U "returns" are quite unlike any traded asset returns. A graph from the Saint Louis Fed adds some insight by superimposing the periods of the "official" recessions. This series may be stationary in the strict sense we use in class, but it definitely looks like it has different "regimes" that one cannot expect to capture with a plain vanilla ARMA model. We'll shortly discuss the Hidden Markov Models that may do a more useful job --- we'll see! There are plenty of heavy duty papers that address the modeling of inflation, and we won't even scratch the surface. Still, you might want to look at the time-scatter plots in one recent paper. This is a kind of graphic which I find interesting, and I think it would be useful to create an R function for making them.

Follow-Up: More on the ETF Contest from Clear Indices. I have received some additional information that you may want to review.

[Feb 6] The ETF Contest from Clear Indices . I got an e-mail from Clear Indexes LLC inviting our class to participate in their ETF contest. This is amusing enough to take a look; I am sure that our class could win its fare share of the prizes --- we'd certainly deserve to win, though there is always a little luck involved in any "contest." Naturally, due diligence is required before deciding to participate in the contest, but my guess is that this is still a positive expectation activity. We'll kick the idea around.

Sidebar: WRDS and SAS Class. This Friday Feb 8, WRDS is offering another set of  WRDS lab sessions in JMHH F80.  The time is 1:30 – 4:00 PM with a multi-level agenda.  (a) 1:30-2:00pm Open for questions, including programming problems (b) 2:00-2:45pm WRDS Web Querying and Intro to PC SAS CONNECT to WRDS and after a break (3) 3:00-4:00pm Intro to SAS Programming.The  second session is probably our most popular class and will be run by Mireia Gine The last session could be titled “What is the minimum amount of SAS I need to know?”   The idea is to introduce SAS and its strengths in data management and manipulation  to anyone that expects to use R or Matlab, or even Stata for most of their work.   This one hour session will  be most useful to anyone who wants to explore using SAS as a tool to prepare data  for importing into another package.   We will cover SAS ‘data step’ basics, including defining libraries and data transformations,  simple printouts, and both PROC IMPORT and PROC EXPORT.  Time permitting I will introduce PROC TRANSPOSE and PROC SQL.  So if you are interested, please reply so there will be a count of the likely attendees.   Also do not hesitate to ask any questions to see if these sessions would be at the right level for you. 

Sidebar: Tornadoes and Other Bad Events. There was a terrible tornado yesterday that killed more than 30 people. Does such an even have market impact? Answer: Almost certainly not. Even momentous events sometimes have surprisingly little impact, and, of course, reasonably minor events are sometimes credited with substantial impact. This is a big story that has been elaborated in many papers. Personally, I hang my hat on the Kobe scenario and the theory that "sharp events" matter less than a "persistent drumbeat." Still, it is terribly hard to test this kind of claim; there simply are not enough examples to make statistical tools appropriate. This is more in the domain of trying to get insight by making lists of historically analogous events.

Sidebar: Media as a Bellwether? "Strong media earnings could also boost the broader market. Media firms can be an indicator of strength or weakness in the overall economy because these firms depend on consumer spending and advertising." --- thus sayeth a random CNN scribbler. Is there anything to the claim?

SIdebar: Wall Street Political Contributions Here is a table that is interesting, even if not quite "linear" in its implications:

Political Contribution

[Feb 3] Dominated Assets. We say that asset A is dominated if there exists an asset B such that in all futures states of the world asset B has a greater return that asset A. In a world of rational investors, there would be no dominated assets, but there are hundreds of billions of dollars invested in dominated assets. For a simple example, Black Rock SP500 index fund CIECX charges a has annual expenses of 1.17% but Vanguard SP500 have and expense ratio of 0.15%. If you expect the SP500 to return 8%, then by buying Black Rock's fund, you have in one brief decision completely squandered 1/8 of your dynastic wealth. Black Rock is one of the largest money managers in the world, and on the institutional level in they provide honest value --- especially in fixed income. Their retail products are almost without exception major rip-offs.

[Feb 2] As you contemplate your 3nd home work (due Feb 6) you can think ahead a little to one of the recurring themes of the course ---style rotation and sector rotation. There are raging debates about such strategies. The EMH purist naturally rejects the possibility that they worth ones bother. Still, there is rigorous academic work that suggests that there is "cheese" in sector rotation strategies and in style rotation strategies, though future returns may vary. ETFScreen.com has some nice resources for discussing these issues. We'll first look at their screen for the Russell Boxes. Among other things, this will give us a chance to discuss the Russell indices (and index design in general.)

Sidebar: Clean Energy Indices. The conventional wisdom in Suite 400 of JMHH is that this whole global warming thing is a bunch of hoowie, but most folks there do admit to being a little out of step with the rest of the planet on this issue. There is also the issue that many billions of dollars are being redirected every year in the direction of clean energy. If these issues interest you as finance and economics, you might enjoy looking at the new indices introduced by HSBC to measure this activity. These could be very interesting as time series.

[Feb 1] We'll start sneaking up on the famous GARCH models in the next few classes. If you already have an idea about these models you might want to look at a "R and Garch" resource page that I have started concerning the estimation of GARCH models in R. When we are done with this part of the course, I hope that this page will answer once and for our whole community what is the most pleasant way there is to fit a GARCH model using R.

[Jan 30] One of the classical "straw men" that any forecaster has to consider as a competitor is the "persistence forecast." One of the places in financial time series where such forecasts work pretty well and in the Fed Funds Rate. Today, FOMC is meeting and will make an announcement about the rate at 2:15pm. The market is looking for a 50bp cut, so if the FOMC cuts less, expect a brutal sell-off. If the FOMC cuts the expected 50bp you may see a "relief" rally, but one is unlikely to have an explosion to the up-side. See, one can make predictions --- its only hard to make predictions that can be reliably converted into money.

Fed Funds Rate

Homework (due Wed Feb 6). Consider four series, the "returns on the CPI", the returns of two of the SPDR sector ETFs, and the spread between the sector ETF returns. Use ARIMA modeling in R to see how predictable these return series are. Present your analysis in a two (or at most three) page write-up. Make sensible summaries that integrate and explain what you find. In particular, don't just hand in R out-put. Be prepared to discuss your results in class next Wednesday. Note: For your CPI analysis you will have to use monthly data.

Sidebar on the CPI (or CPIs): You may take this opportunity to learn a bit about "the" CPI. In particular, you should note that the CPI comes in many flavors, the most important of which is the national CPI-U. For purposes of prediction via ARIMA modeling, we convert the levels to returns. Why is this so?

[Jan 28] Notice: Special Introduction to WRDS. On Friday, Feb 1 in JMHH F80 at 10:30-12:00 Michael Boldin will give an introduction to WRDS, including a tour of the resources and general background on databases. If you plan on doing serious work (a paper, or a thesis) that calls on financial data, this should useful for you. More advanced versions are also expected later in the semester.

[Jan 27] Sunday Note on Taxes (and R). To give examples of R functions that do some useful tasks, I wrote a couple of baby functions to calculate the effective compound returns where one pays the taxes year-by-year or where one defers the taxes until some terminal point. The bottom line is that deferral of 20 years or more will give you about a 50bp/year kicker --- which is certainly worthwhile ---but not overwhelming. Many people (most people?) piddle away three times as much by buying mutual funds without regard to the funds expense ratio. Play with the code and see what you discover.

Sidebar: Bond Ratings and Default Rates. We'll bring interest rates into the picture shortly, and it seems useful to have a reference to bond ratings and historical default rates. We look briefly at the Moody experience.

Sidebar: Rational Forecasts: "One characteristic of a rational forecast is that it should be less variable than the object being forecasted." ---Kevin J. Lansing writing in the FRBSF Letter (10/26/07). Lansing reprises Shiller's argument that the stock market is "too volatile" when compared to the rational model that says current stock price is a forecast of the present value of the future returns.

Sidebar: EMH. Buffett's March 2007 Shareholder's letter has some interesting (and uncomplimentary) things to say about EMT, as well as some comments about misprisings and his direct management of the BRK currency derivatives portfolio.

[Jan 25] Homework Reminder (due Wed Jan 30) : Your task is to design your own test for normality and to apply it to your earlier set of returns. To design your test, take (almost) any scale and location invariant function of your data, then use simulation to see what p-value you get under the null hypothesis that your data is normal. You will want to use the R function rnorm and you will want to learn how to write your own R function and use this function in a loop. For information on writing functions and loops in R, you can access the FREE BOOK Venables and Smith: An Introduction to R. Reminder: You can do the HWs in teams of two if you like. Definitions and Hints: A function F of a vector x is said to be scale and location invariant provided that one has F(ax+b)=F(x) for all real a and b. An easy way (indeed a canonical way) to get such an F is to take F(x)=G(y) where y is the x vector normalized to have mean zero and variance one and where G is ANY function you like. Naturally, some G's will yield lame tests, like the zero function, the sum function, or the sum of squares function. Virtually anything else will work. One point of this exercise is that is criminally easy to construct ad hoc tests; moreover, ad hoc tests are about all the tests we have, outside of some special situations where we can compute the provably optimal likelihood ratio tests.

Sidebar: Well, well, the Rogue Trader Cup has just been won by a French Bank, taking the title from an English Bank. The Cup has not been owned by an American Bank for more than fourteen years.

Over 45 years, I have heard again and again about ‘unauthorized’ trading losses,” UBS’s Art Cashin says. “Never have I ever heard of ‘unauthorized’ trading profits. When the rogues hit the bulls-eye, they get authorized.” [Annelena Lobb WSJ 1/25]. Cashin's comment deserves academic follow-up. It was a similar insight that led to the discovery that some executives had been compensated with back-dated stock options. This is not a very statistical project, but it is a "business" project that could be a major winner.

[Jan 23] European markets had second thoughts and decided to go south, perhaps thinking that a US rate cut was not a good thing after all. After a brief consideration of this ephemeral silliness, we'll go over the HW results, and then we'll do a serious dose of theory. In the middle, we'll look as some bread and butter issues --- like why the DJIA is lame, why the SP500 is not, why CRSP dominates Yahoo!, and why we "always" look at returns not prices. It's a short week, with a short HW that encourages you to explore WRDS and R more extensively.

We'll also briefly discuss the VIX, its recent values, its logic, and a bizarre asymmetry that is involved. The GIF below shows a quadratic fit, something that we would be most reluctant to do. There are VIX futures now, and it is perhaps the futures contract where you have the hardest time relating the futures prices and the spot prices. We'll start this story but it will be many weeks before it ends.

CORRECTION: The legend on the graph makes it clear that we are talking about returns here. In class I asserted that TheStreet.com had used levels --- which would be insane nonsense. Now we have some honest questions: Does the empirical asymmetry make sense? Is it compatible with the Black-Scholes model? If it is incompatible, what breaks and where does it break? There is a good academic paper buried here!

vixpix

[Jan 22] Lots of money has been lost so far in 2008. My guess is that the average Wharton professor (a typical middle class guy or gal?) has lost the monetary equivalent of at least a few of these classic toys --- the S-Class Benz.

benz

[Jan 21] The Die Is Cast? "The scenario for a massive sell off to 20,000 [for the Hang Seng] is building, and a 75 basis point rate cut will count for nothing --- the die is cast," according to Andrew Clarke, a trader for SG Securities in Hong Kong. Later, in Europe, Christoph Lindner, a trader at Baader Bank in Frankfurt characterized the day:"This is a Black Monday."

“It is well enough that the people of the nation do not understand our banking system, for if they did, I believe there would be a revolution before tomorrow morning.”

- Henry Ford Sr.

[Jan 17] The Class Begins! We've got a nice sized class and a diverse collection of backgrounds. I think we will have a lot of fun exploring financial time series together.

First Assignment (Due Wednesday Jan 23) 1. Install R on your personal machine. 2. Use WRDS and CRSP to get the daily returns for at least a few years for your favorite stock. Non-Wharton students will need to get a Wharton account so they can access WRDS1. 3. Using the series that you get from CRSP Daily Stocks (Upper Left of CRSP page), test the normality of returns with the available R tools. You will note that the much-used Jarque-Bera Test not in this lists! Nevertheless, it is in R. One finds it by looking more explicitly; one must often do this when using R. Take this opportunity to review the whole idea of a normality test. In addition to doing formal tests, you should also make an appropriate qnorm plot. Students who have not had a "modern" statistics course will want to take some time to get up-to-speed on such graphical methods. 4. Write up your results in a way that is well organized and professional. Hint: Report all of your p-values in some nicely unified table of your own design. Integrate discussion, tables, and graphics. You can do this beautifully in 2 pages. If you hand me a bunch of raw clippings from R output, you will get a bad mark.

Useful Hints on R. I have started a little FAQ that answers some questions I have had about getting started with R. In particular it offers some coaching about how to get data into R and about how to use the libraries of functions, like the nortest library of normality tests.

General Information about Assignments. If you like, you can do your assignments in groups of two (but not larger groups). For this assignment, a two person group would need to consider two stocks, and, in general, a group is always expected to do a bit more than an individual. Latex is the preferred report form. If you don't know latex, you can use Word, but you might take this class as encouragement to learn Latex. Anyone doing a Ph.d in a quantitative field will eventually want to learn Latex. I personally recommend the MikTex implementation of Latex and the WinEdt editing environment. WinEdt is shareware and it comes nicely bundled with MikTex.

Free Book! Venables and Smith: An Introduction to R This a general purpose book that handles many questions. It does not cover time series, but I will pass along a link for that later.

Sidebar: Long shot/Favorite Bias. One of the "paradoxes" that has been observed in specialized financial markets (such as horse racing) is that people have an apparently irrational preference for long shot bets over more favorable bets. This issue is not at the core of our course, but it is interesting --- and it does reflect on some fundamental problems of the von Neumann style utility theory that we have used in our first two theoretical calculations. One theme of the course is that if you expect to win money, you should ask yourself who you expect to win it from --- and why they might be silly enough to let you. That is, you should think through the strategies of your counter parties.

jan17

Sidebar: DJIA. The guy in the street typically looks at the DJIA as a measure of "the stock market," but the DJIA is a brutally flawed index --- the component weights are economic non-sense. Our only "use" of the index is as a "tell" --- if it is used in a paper, you should suspect that the authors are not experts on financial data. Still, we will meet one stunning exception to the rule --- perhaps it "proves the rule." [NTS: Dog Story]

Sidebar: NTS, BTW, TLA

Sidebar: Banking Crises --- 1933 vs 2008.We seem to have ourselves in a bit of a financial pickle. For entertainment, you might want to read what FDR did in 1933 after some banks got into trouble. His use of simple language is masterful and informative, even seventy-five years later. The crisis of 1933 did not lead to a collapse of the banks, but it was a close call and the economy was not out of the woods until 1939-1940 when Lend-Lease kicked in. The seven years 1933-1939 were among the worst in US history, and, when you looked around the world, you saw that the US did not have the worst of it.

[Dec 23] I've started a page on Uncertainty (and the distinction from Risk). This is an important topic that has been missing from many of the conversations about financial products. For the next few years at least, it is sure to be higher on the agenda.

[Dec 2] It is possible that in addition to R, we will use a bit of Python. For the moment, I'll start a little page of Python resources --- mostly thanks to CS391. There are many reason that statisticians (and econometicians and others) might want to have a little python in their pocket. Still, most of our effort will be channeled through R, for which we have the resource page.

[Nov 30] This is the first blog entry for "Spring 2008" and it is only here to serve as a pointer to the Archived 2007 Blog. At this early stage of the game, the odds are that you'll profit most from looking at the bread and butter items below.

Is thiS A Course for you?

  • Top Down. This course course should be useful for a wide range of students in finance, economics, and statistics. If you are interested in models for asset returns and if you are interested in the algorithms that drive widely used empirical estimation methods, then this course should be on your shopping list. Still, there is stuff you need to know to get value out of the course.
  • Prerequisites. Students who have had one or more graduate level courses in statistics or econometrics should be well-prepared. The full range of linear algebra tools will be fair game. Similarly, students will be expected to know about maximum likelihood and Bayes's theorem. It is not expected that students have a background in numerical analysis, but a healthy curiosity about numerical methods will help.
  • Expectations. The more advanced feature of this course is that (at least to some extent) students will engage reasonably current research papers. After we develop some fundamentals students should be ready to digest, summarize, and --- on occasion --- to go beyond current research work. I hope that at some students will find some issues here that they would like to pursue as research projects. These can be done in cooperation with other projects that may interest you.

Course Policies

  • Housekeeping. Please no cell phones, no open lap tops, no newspapers, no hoagies, etc. A coffee or a soft drink is OK, but be mindful of your neighbor's space.
  • Homework and Projects. There will be regular homework exercises, and there will be two mi co-projects plus a final project. The projects can be done in teams of size two. Latex will be needed for the micro-projects and for the final project.
  • Grading. Homework will count for (10%) and there will be two micro projects (worth 20% each) and a final project ( worth 50%).
  • Balance. The first micro project will cover basic skills and will be more like an early take-home mid-term. There is some flexibility in the second micro project and the final project. All of the homeworks and projects are recommended to be done in two person teams, but individuals who prefer to go it alone are welcome to do so. Teams larger than two are acceptable only under extreme circumstances.
  • Auditing --- Certainly! You are most welcome. Still, we hope that you will contribute actively. Naturally, auditors are also expected to follow the usual housekeeping rules.

Course Topics

  • As our baseline, will rely on Shumway and Stoffer Time Series Analysis and Its Applications (with R Examples) Second Edition, Springer 2006.
  • You can get a rough idea of the style of Stat 956 by looking at the web page for the undergraduate course 434, but we will cover the material of 434 very quickly, and it will represent at most a fourth of our effort. There is a formal syllabus, but it drifts out of date.
  • Stat 956 assumes that you have much more knowledge of statistical theory and statistical computing.
  • To be sure, we will cover ARIMA and GARCH in some detail, and we will also look at the reformulations of the estimation algorithms in terms of the Kalman filtering algorithm.
  • We will also discuss a variety of non-linear models including TAR, TGARCH, EGARCH, and other models in the GARCH zoo.
  • This will lead us to explore the function optimization tools that are used in S-plus and R, so we will get to take a look at some "classical" optimization methods --- and their implementations.
  • A favorite topic will be the Hidden Markov model. It's structure underlies the logic of many many process --- recognized and unrecognized.
  • We'll also look hard at some of the ways that time series methods can inform investment decisions. To start off the list,we'll take a hard look at Style Rotation.
  • We'll do a bit with the approximation of continuous time models. Here we mainly want to understand the gap between these and the discrete time analogs. This may lead to some discussion of numerical tools for pricing contingent claims.
  • Finally, if time and interest permit, we will discuss competitive algorithms and evolutionary learning algorithms --- two "hot topics."