Option FanaticOptions, stock, futures, and system trading, backtesting, money management, and much more!

How Hard is It to Develop a Viable Algorithmic Trading System? (Part 1)

The title of this blog post poses an interesting question that is very difficult to answer.

In his book Building Winning Algorithmic Trading Systems (2014), Kevin Davey claims it takes 100-200 trading ideas to yield one tradable system. In my view, this is a daunting statement because from what I’ve read on trading system development and from the challenges I have faced with coding, this could be a lifetime! The claim is a bit vague, though. What exactly constitutes a “trading idea?” If each parameter value counts as a different trading idea then it might take only a few trading strategies to come up with a “tradable system.” This phrase is vague too. Does “tradable system” mean a system that would be acceptable to me given my particular requirements for profit and my subjective function?

Last year I saw a forum post that got me thinking on this topic. Somebody wrote:

> Any strategy which is publicly available cannot by definition be
> profitable, since nobody would play against it and be the loser
> to make it profitable.

I disagree with his conclusion and I especially think “by definition” is too strong.

However, this does make me wonder what the institutions can do with publicly available strategies. I believe these trading strategies are low-hanging fruit for institutional quants who have tons of computing power and lots of experience doing this work. Being in the public domain, these “big boys” can find the ideas easily, run them through their system development mills, and quickly determine whether Edge exists. If so then they will trade these systems. Edge will run out when enough money is deployed to trade these systems, which will likely happen when enough institutions get on board. For this reason, once in the public domain they probably won’t stay profitable for long.

I will continue this discussion in my next post.

Another Way to be Fooled by Randomness (Part 1)

I have recently been catching up with blog ideas that, at one point or another, struck me as particularly noteworthy. Today’s installment is but a snippet that offers some relevant material for us hopeful traders. Today’s post was inspired by some writing from January 2014:

> Quite often I have read technically-based
> trading strategies that advertise quite well.
> Do they really work, though? Certainly we’re
> brainwashed to think they work (technical
> analysis books, educational seminars, etc.),
> but in trading many things work just by
> random luck alone (like 95% of all cash
> secured puts over the last two years).
>
> Ultimately, I believe the only way to
> determine if a trading idea has merit
> is to put it through the exhaustive steps
> of trading system development. Most people
> don’t know a thing about this so they feel
> comfortable trading in a discretionary
> manner until they experience a catastrophic
> loss that knocks them out of the game or
> leaves them walking quietly into the night
> with tail between their legs.
>
> Admittedly, some things are difficult/impossible
> to backtest. As an example, perhaps I might
> look at S&P 500 stocks in the upper half of
> their Bollinger Bands vs. those in the lower
> half and look at the distribution of price
> changes over the following days to see if
> there’s a difference. If I can’t make a
> statistical determination then I may wonder
> “am I confident trading this idea even though
> I have no more reason to think it works than
> randomness alone?”
>
> If I am then great! If not then I won’t.
>
> Bottom line: I should be honest with myself
> when trading an idea that I have no more
> reason to believe works than randomness alone.
> I think many traders are deluded into thinking
> they know something works based on definitive
> principle when they actually have no good
> reason to believe it at all.

Can We Scientifically Understand the Financial Markets? (Part 2)

In 2013, Jeffrey Mishlove, Ph.D. posted some responses to a very interesting survey question: “When is studying scientific research most useful for understanding financial markets?”

My last post detailed some of those responses. Here are two more:


> Have financial markets been consistent enough
> (knowing all the parts of a valid research study
> that must be there in the research), amidst how
> quickly the world has changed in the last 200 years,
> to even get the kind of research that would still
> be valid today?


> One can fiddle till doomsday with quantitative
> analyses of social reality, but since we are dealing
> with human creations and manipulations, I wouldn’t
> be inclined to believe very much in “scientific,
> empirical” research into financial markets.


To me, this question is about trading system development, which is something I consider a “pseudoscience.” I believe we can follow a methodology to do this in a valid way. I don’t believe we can ever get around some level of subjectivity, however, and that is why I use the prefix “pseudo.” What makes an acceptable trading system for one person (e.g. maximum net profits) may not be acceptable for someone else (e.g. maximal ratio of net profits to drawdown).

Legends abound regarding traders and institutions that have used algorithmic trading systems to earn millions and billions of dollars. The veneer of success and profitability is clear. At the very least, this is all good marketing and advertising. How much of those profits were retained, never to be lost, is something we will never know. If they were all lost and the firms went under then that is certainly something which may be discovered on a case-by-case basis. Most of us don’t have a research team available to help us out with that, though. I know I don’t.

One thing I like about option trading is that it gives me a margin of safety. I can start with a trading strategy that I think has potential and have a good chance to make money even if the strategy ends up being lousy. This certainly doesn’t mean I won’t lose, though, and when loss rears its ugly head I better have good risk management at the ready.

Truth in Backtesting (Part 12)

I will complete (for now) this blog mini-series by detailing a few additional backtesting pitfalls likely to misrepresent potential trading system candidates according to Kevin Davey.

The third backtesting pitfall involves limit orders that fill when price is touched rather than penetrated.  Davey writes:

> One of the tricks unscrupulous system vendors play is to assume that all limit
> orders are filled as soon as the price is touched.  You can recognize this… If the
> method shows trades… bought at the exact low of a bar, and/or sold at the exact
> high…you can bet this game is being played… Of course, the reality is that it is
> hard to buy the low and sell the high.  My experience is that… you can probably
> do this 5-20% of the time.  The other 80-95%… price has to trade through your
> price to get you a fill at the limit price… This can be an issue…  If your back-test
> engine assumes… limit orders are filled when touched, the results will be…
> optimistic.  If the back-test engine assumes price must be penetrated to get a
> fill, then the back-test results will… be… pessimistic.  I always go with the
> pessimistic approach.  My actual results can then only be better
> than the back test [emphasis mine].

The final pitfall Davey describes involves strategies that exit on same bar as entry or have tight stops or profit targets such that a profit and loss exit could occur on the same bar:

> My experience is that it is easy to trick a strategy engine… when entry and
> exits occur on the same bar.  This is due to the assumptions the strategy
> engine must make regarding price travel.  Usually, the results will be overly
> optimistic when compared to real live trading.

A first goal should be to backtest in a way that closely models live trading.

A second goal should be to trade like I backtest.

If these are done then I have a better chance of developing a trading strategy that will work just as well in real time.

Truth in Backtesting (Part 11)

In my last installment of this blog mini-series, I discussed… well honestly, I don’t know.  That was well over two years ago!  I am happy to have found this link, though, because now I have some items to add to it.

I just finished reading Building Winning Algorithmic Trading Systems by Kevin Davey (2014).  For anyone looking to get into algorithmic trading system development, I would definitely recommend this book.  I’ve read a few books on the subject and this gave me a few new ideas that I had not read before.

According to Davey, incubation is the phrase of trading system development where I should wait and watch system performance before I start trading with live money. 

One reason Davey doesn’t feel the need to incubate with any real money (even in small size) is because he is careful to avoid certain backtesting pitfalls he feels would falsely exaggerate live-trading performance. The first such pitfall to avoid involves buy (sell) orders that fill at the low (high) of a bar.  This rarely occurs in real life, Davey says.  Unscrupulous system vendors and naive developers produce strategies that frequently include this.

Davey also makes a point to avoid exotic technical analysis templates like Renko, Kase, and Point-and-Figure charts.  “The way these are built from history,” he writes, backtesting fills often cannot be believed.”

Either of these pitfalls could make a trading system perform better in development then they are likely to trade in real time.  They are therefore good vehicles for misrepresentation and that is why I have categorized this under optionScam.com.

I will conclude with the next post.

The Personal Side to Trading System Development (Part 4)

I have found trading system development to be so individual that I can hardly find anyone interested enough to work with me to do it.

This also makes me realize how limited your takeaway can be as my reader of some of my posts.

Even if I develop and write about systems that I deem worthy, many potential factors may prevent you from trading them–not the least of which is the fact that you would be foolish to trade what I claim to be profitable without replicating the work as part of your own due diligence. My process can be studied and used as a starting point after which to pattern your own work: this is what books have done for me. Only you can take yourself the rest of the way.

It was not my intent to make any grandiose claims with this blog series other than to summarize my experience to date. I originally learned about systematic trading and backtesting as compared to discretionary trading. I then learned about trading systems vs. strategies and trading system development. I purchased what I believed to be the most comprehensive and inexpensive software package and then started to read books. It was at this point that I found different books to have limited overlap. Once I set out on my own system development journey, I edged closer to the holes in understanding that I grapple with today.

I think science can help me understand how the patterns I see in backtesting results correlate with live trading performance. This science will be inherently personal, however: only applicable to my trading concepts and to my trading preferences.

The Personal Side to Trading System Development (Part 3)

Understanding trading system development as a wholly individual pursuit makes me better understand why my past attempts to organize a system development group failed.

My universe of potential prospects started with the limited number of people worldwide who trade. Out of that, I was looking for people with a significant amount of time to devote to system development, which perhaps necessitates people without other full-time jobs. Out of that I was looking for people in/near the city I live in.

Those meeting these criteria were about to be further stratified by what means I was going to use to find them. I tried Meetup.com, which produced three people. Where else? Craigslist? Twitter? Facebook? Maybe some were locatable through each with the others reachable through other avenues unknown to me.

The remaining handful were ill-suited to work with me because I demanded a degree of open-mindedness, willingness to suspend judgment, and substantial freedom from commercial influence (e.g. trader education companies, affiliate programs, etc.). I also insisted they use my preferred software package since I had already spent 18 months arduously trying to learn it.

But wait: THERE’S MORE!

Other excluding factors were also lying in wait: requisite amount of money to trade, brokerage platform, desired markets to trade, desired time frames to trade, attitudes toward fundamentals or other potential means to generate trading candidates, etc.

The generality/specificity monster was rearing its ugly face again because ultimately, I found nobody to work with!

I will conclude this discussion in the next post.

The Personal Side to Trading System Development (Part 2)

I ended the last post discussing books as a starting point to learn about trading system development. Different authors use different software packages so immediately what I read has been passed through a specificity filter.

As available information shrunk in the law example I gave, after making a book choice the usable information narrows further due to personal trading factors. If my brokerage differs from the author’s then the same technology may not be available to me. I may also prefer to watch the market differently than the author (i.e. different time frame) or enter orders differently. Perhaps I use contingent orders with a larger offset or no offset at all just waiting for the fill. What if I don’t get filled? These are unables that can affect system results. How do I factor in slippage to the backtesting? Does the author?

Perhaps worst of all for establishment of a system development discipline is the observation that everything discussed in the last paragraph is not even addressed in many writings. Now, I can only gain partial education from books with the rest destined to be completely individual based on my eventual experience. This means system development will be different for everybody. Furthermore, how can I even attain that “eventual experience” before having a complete understanding of system development? Certainly not through backtesting or paper trading, which some experienced traders believe are nothing like live trading.

The upshot of all this is that I will have to do some gambling to truly learn about system development. If it’s not based on a complete understanding then I am trading to learn from my performance. I may or may not have an edge and if I don’t then I am gambling. Who wants to gamble when they can participate in other forms of discretionary trading that can allegedly be taught?

“Forget system development,” the intelligentsia might say, “because I want to hold onto my money.”

The Personal Side to Trading System Development (Part 1)

Are you familiar with the “Dummies” series of books? I would love to see such a book on trading system development but the truth is that I don’t know if such a book could even be written. That is, System Development for Dummies can’t truly be written because what it is and how to do it vary too much from one person to the next.

I have already addressed subjectivity in system development in some earlier blog posts. Howard Bandy’s books define and discuss the objective function. It struck me that “subjective function” might be a better name after realizing the irony that where system development and backtesting sound like scientific endeavors, since the measure of success varies from one person to the next perhaps there’s nothing objective about them at all.

Some of this subjectivity boils down to a distinction between generality and specificity of knowledge. I can find many general articles on-line about law and the legal profession. If I am trying to find out about something related strictly to Family Law, for example, then the articles will be fewer in number. If I am trying to assess how good one particular lawyer is then I may never find anything outside of that lawyer’s website where the testimonials will certainly be from friends, not foes. Bottom line: the more specific the knowledge, the harder it may be to find it.

Education about system development starts with what I can read in books. Authors of different books use different software packages, though. Use of one software package limits what I can glean from an author who uses another because anything about the programming language, backtesting capabilities, and even system development definitions may be different.

I will continue this discussion in the next post.

The Tone of BS (Part 4)

From just four of 12 paragraphs I have been able to falsify this thesis on trading. For the sake of completeness, I will continue on.

I believe [5] happens quite frequently.

I agree with [6].

[7] seems somewhat meaningless. I don’t care what strategies this author prefers. I have no idea whether this author is a profitable trader, anyway.

[8] opens another can of worms. How do I know if seasonality reduces exposure and improves performance? The author claims this but for evaluation purposes, I would have to see the data or citation behind this conclusion.

[9] is also quite meaningless. This sounds good but how does the author know?! The author could start with “in my experience,” which would leave me to evaluate the author’s trading experience. Without that qualification though, the statement is downright absurd. How am I going to evaluate the easiest way to make money? The author does not even list different approaches for comparison. This is totally baseless.

I agree with [10]. I cannot say whether it is a good or bad thing to do all that research without any live trading, though. Perhaps staying out of the markets would save me from severe losses! Perhaps staying out would prevent me from precious gains. It would be good and bad, respectively, in these two cases.

I think [11] is a restatement of [9]: not very meaningful.

I think [12] is meaningless. Yes, looking for better odds to gain than lose would seem like a solid strategy. Taking what the market gives you, though, is always extremely clear in retrospect rather than in the moment.

Overall, I think these paragraphs are yet another collection of trader gobbledygook. Parts sound good. Most of the rest are platitudes, propaganda, and other nonactionable ideas that would do little more than stop critical thinkers in their tracks with looks of puzzlement on their faces.