2008 Aug 06 - Wed
Market Notes for August 6, 2008
This article really isn't about today. Nor is it about yesterday. It is about Monday.
But becuase I only read Mark Hulbert's colummn today, which he penned yesterday, which is
about Monday's 332 point gain, I've dated my article for today.
Mark's point of the day revolves around another rule of thumb: the day was not a 9-to-1
up day. This type of day is when 90% of the volume of shares that rose or fell in price was
in shares that went up. The term was coined by Martin Zweig, who used to publish several
investment newsletters. On Monday, for the NYSE, it was only an 8.1-to-1 day.
According to his 1986 book called "Winning on Wall Street", Zweig states "Every bull
market in history, and many good intermediate advances, [has] been launched with a buying stampede
that included one or more 9-to-1 up days".
In Mark's article of yesterday, he mentions that valuations are still a little high. As
such, a bull market may not be in the offing yet. So far July 15 is considered our low of
the current bear market.
I think because of additional mortgage resets happening later this year, we may not be
completely ready for bullish thinking. Maybe a nice little volatile rally, but we may see
some more lows.
2008 Jul 30 - Wed
SmartQuant QuantDeveloper & DataCenter Release
SmartQuant has released a revision
to DataCenter and
QuantDeveloper. DataCenter and QuantDeveloper are at the following revision levels:
DataCenter
Version 3.0.3 (30-Jul-2008)
QuantDeveloper Enterprise Edition
Version 3.0.3 (30-Jul-2008)
QuantDeveloper Source Code
Version 3.0.1 (21-Apr-2008)
* Recent Versions available through
version control
2008 Jul 15 - Tue
Market Notes: 2008/07/15
I guess the markets really are bearish about what is happening in the world. The Dow gapped
downwards on open and played with 10850 for a bit. It seems that with Bernanke's
Congressional testimony later in the morning being hard and to the point, the markets had
their edge taken off and rebounded to a little in the positive zone. OPEC indicated that
their demand forcasts are being reduced, which caused a $5 dollar drop in Brent crude in the
midst of a $10 high low swing for the day as traders took their profits. Usually the Dow
has an exact opposite swing, but
narry a blip occurred, and actually closed down for the day under 11000.
2008 Jul 12 - Sat
Freddie Mac and Fannie Mae
The markets are not very patiently waiting for all the sub-prime mortgages to reset
later this year and next year. I've always thought that it will be during that time period
in which we'll find out if we are in a repression, depression, or a recession.
It seems we have lots of near term worries. Various and sundry resets must already be
taking place. The financial system seems to be stressing all over the place. I'm curious
to know just how leveraged the industry is. After all, in the end, the money has to be some
place. If leverage is the problem, someone is going to be left holding the bag, and I guess
that is starting to happen now.
This reminds me of the great internet expansion a number of years ago. Every who thought
they knew what a fibre optic cable was, starting laying the stuff across land and under
water. Most if not all of those companies reorgainized or got sold at pennies on the
dollar. The smart guys on the sidelines smiled and spent their pennies on valuable
infrastructure. Mean while the original investors and vendors probably didn't fair so well.
in the end, after the market settled, we have high capacity bandwidth at reasonable prices
(well for North America anyway, we in Bermuda still pay an arm and a leg for the privilege,
although that should change with the new consortium laying new fiber later this year).
That story leads me into today's newsletter by
John Mauldin. He is saying
that sub-prime resets aren't our only problem. Orbourous is eating its tail. Lenders to
lenders and lenders to corporate beings are starting to cause problems. A figure like
$1600 billion dollars of losses in the international banking system are being bandied about.
That is a terrific amount of business failure, residential collapse, and bad business
judgement. Is there a figure somewhere that suggests what the equivalent of a world wide
Gross Domestic Product might be? (I know that appears to be a contradiction of terms, but
with the ever shrinking world, there is an element of realism there). With a WW GDP, this
type of loss could be put in to perspective. Grasping at straws, I came up with one form of
perspecitive. According to the
US Federal Reserve Statistical Release, that is $300 Billion more than the M1 money
supply
and about 23% of the M2 money stock measure.
Anyway, his previous articles had some concrete examples as to what sort of numbers
losses were based upon. In this article, there seems to be a bunch more hand waving going
on. Perhaps the Bridgewater Associates report to which he refers offers up some concrete
basis for their opinion.
Finding the headwaters of investment sources is what John Mauldin's friend
David Kotok specializes in. In a recent
newsletter, he is saying
that Freddie and Fannie (F&F), between them, hold about $5000 Billion in mortgages. Me,
coming from the outback, think that a $150,000 mortgage is big. Having one of that
size, and
if I've used the correct number of zeros in my calculations, that could mean about 30
million mortgages. To stretch the statistic even further, that would be a mortgage for 1
out of every 10 US residents. That is a lot of cash flow to them and to their holders of
sub-paper.
Both of the authors tend to agree that holding paper from F&F is not too risky being
that the mortgages that they do hold are reasonably sturdy, and they
both agree that holding shares is valueless. So, so long as the cashflow meets payment
expectations, things shouldn't be too bad.
However, all this is contrary to what the notable publications such as WSJ are
publishing, so no wonder we bounced off the Dow 11,000 level yesterday. I think Mauldin
even joked about the 9XXX level not being too far off the mark in his article.
One other thing Mauldin mentioned is that he is doing a survey. As a reward for filling
out his survey, he provides a link to speech in which he talks about how the markets might
re-arrange themselves. Perhaps this might be similar to what happened with the post
fibre-laying companies... will the new credit/debt institutions be valuable because of what
they got for pennies on the dollar?
I wrote this article in order to set a baseline of expectations of what is to come. Will
we, indeed be seeing more losses, more than what the subprime fiasco has caused directly?
In which direction are the markets headed and what will be their prime motivator? Will it
be more credit problems? I'll be able to look back here and hopefully see what happened
when we start our descent into the 10K category.
2008 Jul 11 - Fri
Alpha Generation Platforms
Sometime ago, SmartQuant sold their QuantDeveloper code to QuantHouse. I now see in an
article at
Wall Street & Technology,
QuantHouse listed as one of five vendors who have Alpha Generation Technology. QuantHouse
must have done some additional work on the platform. QuantDeveloper definitely fit the
defintion of a workflow platform:
- Data acquisition and preparation
- creation of the initial alpha discovery model
- back testing the model using historical data sets
- analyzing the results of back-testing and fine tuning the model
- simulation with live data
- coding the quant research model into production for the live trading environment
Alpha is defined as "excess risk-adjusted returns measured above a benchmark".
Key attributes of the packages reviewe included items such as:
- seamless integration with data sources and databases for rapid data capture
- transformation and storage for analysis
- ease of use in creating back testing and simulation environment
- detailed documentation of model creation process
- charting, reporting and visualization tools
- ease of integration with leading statistical packages
- offers a straight through processing feature that enables quants to move from idea
generation to
order generation in a reduced time frame
- offers a codeless environment for rapid strategy development
QuantDeveloper did offer up all those features but that last one. QD is actually
a C# development environment disguised as an Alpha Generation Platform.
I'm not promoting or demonting QD here. I did use the package for a couple of years and
have since migrated to a custom C++ platform, which I think, in the end, is going offer very
similar capabilities. What with QuickFix tested against OpenFix, QuantLib for the math, and
a myriad of other integrated abilites, it may just have a chance to be seen in the big
leagues.
Yes I do spend much of my time day dreaming. But there is a drop of reality there
somewhere.
As a side note, the article threw out a bunch of names. I'll have to follow up on what
these do sometime: "real-time high performance databases such as Vhayu, KX and OneTIck. On
top of that, analytics and statistical packages are required, such as MATLAB, S+ and R, as
well as optimization tools like Northfield, BARRA, Morningstar, Ibbotson, etc., and
EMSs/OMSs like Portware, FlexTrade, OrcSoftware, Aegis Software and Tethys, etc.".
2008 Jun 15 - Sun
Mean Reversion Thoughts
While still putting together the code for a trading solution, I've been thinking about
what algorithms to implement for a trading strategy. I have access to live intra-day tick
and quote data, so mean-reversion aka contrarian strategies seem like interesting
candidates.
In the course of manual trading, I've learned that one needs to keep track of a number of
items: current portfolio costs, current holding costs, existing profit/losses, expected
market direction, current market location, external influences. This is a lot to do
manually. Hence the desire to implment tools to automate, or even semi-automate the
process.
A paper by Subramanian Ramamoorthy called
A strategy for stock trading based on multiple models and trading rules
discusses a state space mechanism for determining how to manage the portfolio composition.
Another item he brings to the foreground is a description of the Sharpe Ratio, a ratio which
helps one to keep profit consistent rather than widely dynamic.
Using different terminology, the makers of NeoTicker have a blog with an article called
Counter-Trend Trading with Simple Range Exhaustion System. The key point, which could
be hard to do, is "most counter-trend traders will try to time their entries as close to the
extreme reversal points as possible to maximize the profits and minimize the risk
exposures". Using multiple time frame charts, and
reading the tape, along with some possibly helpful technical analysis tools, it might be
possible to home in on the zones of reversal.
Working my way into a little scalping in the futures, an older article at Interactive
Brokers explains the birth of the
Dow Mini Futures. Some interesting points:
- "try to identify the leader in a group and how its price movement can help us predict
movement in others in the group"
- "we start to trade it by hand so we can get a better understanding of the nuances in
that particular trade"
- "We have a trader and a programmer trade together for a while and then we start the
process of automation. We define our risk parameters and write the rules that we feel give
us an opportunity to be profitable."
- "In our back testing we saw that if we were patient it would be profitable for us. The
hard part was learning to be patient because our other successful trades were very high
frequency. In the mini-sized Dow we may be in and out of 5 to 10 trades in a less than
minute."
- hedge the mini dow with the underlying basket of stocks
- "We don't have scalping targets. We generate a theoretical value and make markets
based purely on that value If we our pricing is accurate and we should naturally be able to
scalp."
- "In the Dow because the bid-ask spread is so tight most of our profits are generated
from trading."
- "he dow has a much tighter spread compared to the mini-spu. Also it is much easier to
watch the stocks in the underlying basket to ascertain their effect on the future."
- "The Russell tends to be trendier than other indices."
Adaptive Arrival Price
A keynote lecture at the April 7th Algorithmic Trading Conference in London was by Mr.
Julian Lorenz of ETH Zurich. The abstract for his lecture reads as follows:
Electronic trading of equities and other securities makes heavy use of "arrival price"
algorithms, that balance the market impact cost of rapid execution against the volatility
risk of slow execution. In the standard formulation, mean-variance optimal trading
strategies are static: they donot modify the execution speed in response to price motions
observed during trading. We show that with a more realistic formulation of the mean-variance
tradeoff, with no momentum or mean reversion in the price process, substantial improvements
are possible by using dynamic trading strategies. We develop a technique for computing
optimal dynamic strategies to any desired degree of precision. The asset price process is
observed on a discrete tree with a arbitrary number of levels. We introduce a novel dynamic
programming technique in which the control variables are not only the shares traded at each
time step, but also the maximum expected cost for the remainder of the program; the value
function is the variance ofthe remaining program. The resulting adaptive strategies
are"aggressive-in-the-money": they accelerate the execution when the price moves in the
trader's favor, spending parts of the trading gains to reduce risk. The improvement is
larger for large initial positions.
I think I'll add 'arrival price algorithms' to my key word searches. The above extract
was from a search on 'mean reversion trading system algorithms'.
2008 Jun 08 - Sun
Stocks & Commodities, 2008/06
In a recent issue of Technical Analysis of Stocks and Commodities, there was an interview
with Tom Busby. A number of his comments struck home with some things I've learned. He
also introduced a few more things about which I should think.
He noted that trading can be a twenty four hour operation. There is always some market
open to trade. The world starts off with the Nikkei and the Hang Seng in the far east. In
Europe, primary markets are CAS, FTSE, DAX and the Swiss. I'd say in today's market the
IPE, with the Brent Crude Futures, is also important. Here in the west, we have the morning
New York market and the afternoon California market.
Busby made mention that 'market open' is an important event. As such, it is important to
know the time each of the markets open. I've been working on an algorithm that selects a
series of instruments, selects a direction and lets the instruments run. I've been
wondering what to set for an exit though. Busby, in the interview,
suggests exiting once a third of ATR
(Average True Range) has been reached. I'm not sure why he would use ATR (which accounts
for any opening gap) rather than just the daily average range. Assuming one gets in
sometime in the open, and exits by the end of the day (in order to eliminate what gaps in
the wrong direction can do to one's portfolio), then using ATR doesn't seem quite right.
Anyway, To set the tone for a trading day, he suggests some benchmark indexes to be
watched. Seven, which he calls the Seven Sisters are:
- S&P
- NASDAQ
- Dow Jones Indexes
- DAX
- Crude Oil
- Long Bonds
- Gold
As for micro-signals, he uses three kinds, with each needing to be in the same direction:
- Volume
- Tick (gainers vs loser)
- Trend
To finish things off, he suggests splitting an entry into three parts:
- Tick Part: the trickiest part of the entry based upon the three variables above
- Trade Part: with confidence building, try to make twice the reward vs risk
- Trend Part: capture the full movement of the day
2008 Jun 06 - Fri
SmartQuant QuantDeveloper & DataCenter Release
SmartQuant has released a revision
to DataCenter and
QuantDeveloper. DataCenter and QuantDeveloper are at the following revision levels:
DataCenter
Version 3.0.2 (06-Jun-2008)
QuantDeveloper Enterprise Edition
Version 3.0.2 (06-Jun-2008)
QuantDeveloper Source Code
Version 3.0.1 (21-Apr-2008)
* Recent Versions available through
version control
2008 May 31 - Sat
Decision Trees, Automated Trading, Simulations, and Strategies
A paper called
Stock Picking via Nonsymmetrically Pruned Binary Decision Trees by
Anton V. Andriyashin discusses a method for picking stocks for inclusion in a portfolio. By
integrating technical analysis with binary decision trees, the author indicates that
"BNS clearly outperforms the traditional approach according to the backtesting results and
the
Diebold-Mariano test for statistical significance", where BNS is Best Node Strategy. David
Aronson of Evidence Based Technical Analysis fame may call the use of some the technical
indicators as 'so much snake oil', the paper, at its heart, does describe a methodology for
selecting a potentially profitable portfolio if one can use alternate forms of trading
signals.
Alternate forms of decision tree based automated trading can be found in two papers by
German Creamer and Yoav Freund called
Automated Trading with Boosting and Expert Weighting and
A Boosting Approach for Automated Trading. These represent algorithms used in the
Penn-Lehman Automated Trading Project. Anyway, the two papers get down
and dirty with some of the indiators they use in their trading simulation. Their
bibliography references a number of good sources of information.
In the PLAT paper, here are a few strategies worthy of further investigation:
- Case-based reasoning applied to the parameters of
the SOBI strategy (see text for SOBI description).
- Predictive strategy using money ow (price movement
times volume traded) as a trend indicator.
- Market-maker that positions orders in front of the
nth orders on both books.
- Mixture of a Dynamically Adjusted Market-Maker
which calibrates by recent volatility, and a trendbased
predictive strategy.
- Sells on rising prices, buys on falling prices.
- Trades based on relative spreads in the buy and sell
books, interpreting small standard deviation as a
sign of codence.
- Simple predictive strategy using total volumes in
buy and sell books.
Peter Stone's group has done well with the PLAT simulations. His papers, with this one
as a example,
Two Stock-Trading Agents: Market Making and Technical Analysis have many good
implentable ideas for an automated trading strategy. Outside of the world of finance,
general algorithmic bidding and optimization strategies are described in
The First International Trading Agent Competition: Autonomous Bidding Agents. Another
interesting Peter Stone paper called
Designing Safe, Profitable Automated Stock Trading
Agents Using Evolutionary Algorithms They discuss the concept that common trading
rules have weaknesses under various trading conditions. By identifying the conditions,
and adaptively switching among rules, trading results can be improved. One more Peter Stone
supported effort is the poster:
Safe Strategies for Autonomous Financial Trading Agents:
A Qualitative Multiple-Model Approach.
Through the use of evolutionary reinforcement on data to which us mere mortals have no
access, M.A.H. Dempster has a number of related papers. The bibilographies may be good
sources of further inspiration:
In a sort-of-related paper, Robert Almgren and Julian Lorenz provide an insight into
Adaptive Arrival Price. A couple of extracts from their abstract:
- Electronic trading of equities and other securities makes heavy use
of .arrival price. algorithms, that determine optimal trade schedules
by balancing the market impact cost of rapid execution against
the volatility risk of slow execution.
- We show that with a more realistic formulation of the
mean-variance tradeoff, and even with no momentum or mean reversion
in the price process, substantial improvements are possible
for adaptive strategies that spend trading gains to reduce risk, by
accelerating execution when the price moves in the trader.s favor.
Now for a really un-related paper:
A market-induced mechanism for
stock pinning. The authors suggest that some stock prices can be pinned at strike
prices on option expiration dates. As various market participants cover their positions
with options and the related underlying securities, some interesting market dynamics unfold.
|