Category: money

Backtesting with historical options data

TradeStation Performance ReportI am in the midst of a trial of the TradeStation platform.  It is a wonderful system that allows you to quickly develop your own trading strategies, and then backtest them against historical data.  TradeStation will then create a Performance Report that shows you everything from your win/loss ratio to your Equity performance graph (showing how your initial capital grows/shrinks over time).

It seemed perfect for what I needed — except.  Except they don’t have historical options data.  They do have six months worth of historical options intraday data for NON-expired options.  But it doesn’t do you much good if you’re trying to backtest an option trading strategy based in front-month contracts only.


So, I am cobbling together a solution that is full of hacks and workarounds.  And I am discovering the beauty of using VBA macros in Excel in order to sew said hacks together.  John Walkenbach’s book at right is helping me do it.

I never really appreciated VBA.  Sure, I tried it in college during my days in the New Media Lab, and I knew many people utilized it for tactical matters, but as a former C#/.NET developer, I was far too “good” for anything as low as VBA.  But VBA is quick, dirty, simple, and plugable.  You can manipulate your data in the very spreadsheets that data sits in.  And it’s easy to get Excel — and that’s all you need to have to access their VBA editor, debugger and help documentation.  Not so for C#, which requires the highly computer-intensive, and wallet-draining, Visual Studio (although there is a free alternative).

But all of this hacking and sewing is really not what I want to be doing, educational though it may be.

Does anyone know of a good backtesting system with both the features and the historical data needed to do option backtesting?

To Succeed, Break it up; Bloomberg and Scrum?


I am FLOORED by the Bloomberg platform, and thrilled to finally have a terminal to call my own.  There are two particularly impressive areas: (1) the customer service Bloomberg provides to users of its terminal, and (2) the platform itself, in areas like my portable, “Bloomberg Anywhere” card that reads my finger print and logs me in by holding the card up to the screen and scanning.

To learn more, I’ve picked up “Bloomberg by Bloomberg” from the Brooklyn Business Library.  It is full of quotables, but here are two on the theme of agile development that struck me:

Start with a small piece; fulfill one goal at a time, on time. Do it with all things in life. Sit down and learn to read one-syllable words. If you try to read Chaucer in elementary school, you’ll never accomplish anything.

Life, I’ve found, works the following way: Daily, you’re presented with many small and surprising opportunities. Sometimes, you seize one that takes you to the top. Most, though, if valuable at all, take you only a little way. To succeed, you must string together many small incremental advances–rather than count on hitting the lottery jackpot once

What is so fascinating to me is that Bloomberg’s methodology is essentially Scrum — but he was doing it before there was such a thing!  Recall, Bloomberg L.P. was started in 1981, and Scrum only has its roots in the paper by Hirotaka Takeuchi and Ikujiro Nonaka (and their paper, “The New New Product Development Game“). Who’s to say that Toyota was the only innovator in this realm?

In reading Bloomberg’s autobiography, it’s clear that the build, review with users, revise, review with users, revise, repeat, was also crucial to advancement at Bloomberg.

The lesson, though, is clear.  Break it up, start small, and be flexible.

Volatility is EMOTION: measuring the market’s Morgan Stanley panic

Most of us can understand at an emotional level how people were feeling about the markets in September:  many of us were, for starters, incredibly nervous about the fate of financials.

  • Lehman Brothers had declared bankruptcy
  • Merrill Lynch was bought by Bank of America
  • There were only two investment banks left in the United States!
    • Morgan Stanley in particular looked very vulnerable.
    • When Morgan’s stock dipped below 20, everyone was wondering “will they be the next one to go?”

Compare the collective sentiment surrounding Morgan Stanley in September with with how people were probably feeling about Coca-cola.

Coca-ColaCoca-cola a soda company. Sure, perhaps people may drink less soda in a rough economic period, but since soda is so cheap and people don’t like to change their habits if they don’t have to, soda-drinkers will probably keep drinking soda for the next few years. Your 401(k) tanking? Your mutual funds worth nose-diving? The least you can do is treat yourself to a soda for lunch.

Compared to Morgan Stanley, emotions around Coca-Cola’s stability were certainly more calm, more subdued.

But these are just feelings — fear about Morgan Stanley, calm about Coca-Cola — what did the market think about this? How did the market display all of the emotion and fear and uncertainty we had about Morgan Stanley during the week of September 15th?

The answer is volatility.

Read more »

Bye bye LEH and I — filling in the blanks

I saw this incredible song, “Bye, bye Lehman Brothers and I” to be sung to Don Mclean’s American Pie on FT’s alphaville — but it was missing several verses.

I thought I’d finish it up:

Helter skelter in the banking sector
The 40th floor needs parachutes and ejectors
We’re eight miles high and falling fast
Soon we’ll land foul on the grass
The Fed hopes this will all just pass
With the treasury buying CDOs at last

Now the mid-week air was sweet perfume
While the hedge funds played a shorting tune
We all prepared to dance
Oh, but we never got the chance!
‘cause the sell-shorts orders in the field
Covered Friday, SEC we yield!
Do you recall free markets repealed
The week the IB died?

Read more »

The History of New York

nycskyline.jpgWhen I was an undergraduate, one of the most popular classes was one taught by Professor Kenneth Jackson: The History of the City of New York. Some came because they heard good things about it; other because they were fascinated by the Burns documentary in which Professor Jackson appears.

My personal fascination was a bit of both: In my first semester, I had a computer science class in a large auditorium. With over 300 students it was easily my biggest class, so nothing seemed strange when I slipped into a seat in the packed lecture hall, out of breath from running. What did seem strange was that the room was dark, but sometimes Professor Sklar would show us videos of robots playing soccer and the like. What was strange, was that we were watching a movie about New York. I kept waiting for the connection — none came. Eventually, I realized I was in the wrong class: and I wasn’t twenty minutes late, I was forty minutes early!

I stayed in my seat, entranced by the commentary. You can look straight up any of the avenues in New York and see all the way to the top of the city. True! Had I noticed it? No! New York was a city founded by the Dutch to make a buck. It began as a real estate transaction between the Dutch and the American Indians. On and on it went.

The class was too demanding when I finally returned my senior year; Professor Jackson mandated the students attend multiple walking tours and write several papers. But I will always regret missing out on the Midnight Bike Ride through the city, that he took the class on every year. I passed by them in a car on the way home from a date. I wanted to follow them; I had no bike. But nostalgia and regret cannot take away from the pleasure of watching the Burns documentary, New York.

Penn Station, 1940It shocks me that the Flatiron building went up in 1903. That New York invented the Express Train. That the first subways cost a nickel, and remained that way for fifty years. That Ellis Island, on its busiest days, let in 16,000 immigrants. How the city tripled in size in the 19th – 20th century due to immigration. How people from all over the world came here, awed by Lady Liberty, settling into a city of skyscrapers and hopes and dreams, and managed not to kill one another. Much.

More Italians than in Naples; more Irish than in Dublin. “By 1905, four out of five New Yorkers were either the children of immigrants, or immigrants themselves. Forever after, many Americans would view New York as a foreign country.” Did you know Penn Station used to be BEAUTIFUL!

LouiseBrooks theme byThemocracy