My work probably belongs to a discipline called Computational Finance. This is a branch of applied computer science. My focus is data manipulation and information theory rather than statistics or math. I learned about computers at a trade school after getting a BA in college, so my research is relatively original. It is characterized by analyzing groups of stocks instead of individual securities. My impression is that a data-based orientation is dramatically and demonstrably better than a two dimensional statistics-based framework.
My articles are written to document my work and demonstrate the effectiveness of the processing paradigm. For the past year or so, my concentration has been on algorithmic decision-making.
For the last several months, I've been looking at win rate analysis. In this article, I will try to show that win rate strategies are quite interesting, relatively simple to create, and can make excellent returns if a little rational thought is put into them.
I will try to step through the strategy creation process, as I think it is quite different (and hopefully better) than the usual procedure.
Historical prices are the only input. These must be dividend adjusted. The best thing to do is download price history every day. A sample of data from SPY is shown below:
Price data is downloaded for relevant stocks. Each stock's data is stored in a different spreadsheet. It's worth paying a little money to avoid annoying technical issues when dealing with downloading many data sets.
It takes some practice to master moving between the different data sets, etc. I practiced doing this for at least an hour a day for over 20 years. Probably I'm flattering myself, but I might be a little better than average at it now.
High and Low prices are not used in this article, so the only input is Security, Date, Open, and Close.
When studies are shown, the numbers are all derived from price history data. How one gets from here to there is critical to keep in mind when reverse engineering.
Analyzing an individual stock effectively on a quantitative or technical basis is almost impossible. Any stock is part of the entire market, most of its movement can best be explained by the movement of the overall market.
Short-term direction is vastly more important than long term when predicting immediate returns. An individual stock will not produce enough samples to support decision-making unless the look-back period is long. However, the longer look back will distort decision-making in the present.
It is far better to use portfolios or groups of equities for analysis than analyzing single stocks. This anchors one signal to all securities, making aggregated sample sizes larger and more coherent. Meanwhile, the look-back period is shortened.
Portfolio-based strategies offer far better returns than strategies involving individual stocks. Understanding Complex Strategies With FoxForce5 attempted to demonstrate that. Links to many of my articles are provided at the end.
In this article, the portfolio comprised of the 3x Bulls shown below will be analyzed. These guys are always amusing.
The graphic below shows individual stock performance for the past six months.
This period was definitely not bad for buy and hold.
CC stands for holding from previous close to current close every day in the sample period. That is the buy and hold return. CO is the return for holding previous close to open every day. OC is the return for holding open to close.
Natural logs are absolutely critical to use for this type of analysis. With Natural logs: CC = CO + OC. The Exp Excel function translates natural logs to Current Value of $1, which is shown on the bottom left of the graphic. With Current value: CC = CO * OC. The median return for the six months was more than 100%, $1 is now worth $2.16.
The Win Rate table is the winning percent with no decimals. The strategies that will be demonstrated here, look only at win rate.
KIBS is my current retort to the KISS principle.
Strategy development products are two-dimensional (chart or grid-based) and focus on technical indicators that can be used to analyze individual stocks. All rational indicators show only a slightly different picture of the same thing, and the picture shown for an individual stock is not reliable. Time spent developing on such platforms is very likely wasted.
Portfolio considerations add high dimensionality are issues that two-dimensional products have difficulty dealing with. I'll discuss that in more depth later in this article.
Signals are binary (1/0, true/false, on/off). Strategies depend on proper signal processing which becomes exponentially more complex as more signals are added.
The developer is responsible for managing complexity, and this is best accomplished near the programmable logic layer. Technical operations are facilitated by using number bases that correspond to the powers of two (ie. 2/4/8/16). The binary structure allows a developer to precisely understand up to four true false conditions with hexadecimal - base16.
I put some time into considering base32 which handles five conditions. This just seemed creepy somehow.
In order to analyze a day properly it must be broken into finite states. This is done by splitting CC into CO and OC. CC = OC + CC
The signals are produced by the Specter stock. I always use SPY. After checking other candidates; there is no big difference with other broad indexes - something like IWM would be dubious of course. SPY is better than using either the S&P 500 index, or the ES-emini day session. Overnight futures action must be ignored because that can mess up the daily high and low.
Zombies were introduced in Return of the Zombies. The acronym has been changed slightly to - Zero Optimized Median Binary Inferentiation
The main technical issue was constructing win rate-based signals. It turned out that base4 worked well. Base4 can handle answers to two true/false questions. Base4 is called Quaternary, hence Quat. Quat Zombi can be shortened to Quatz.
Base4 produces values from 0 through 3. The graphic below outlines the logic.
The oQuatz is formed by adding the decision values for the current trade day. If both CO and OC are positive the value will be 3, etc. That value drives the strategy's decision to buy CO at the close. The cQuatz is formed by the previous day's OC and the current day CO. That value drives the decision to participate in the current day OC excursion.
With Finite State Analysis, long positions are always virtually closed at any state transition. If the next state is a buy, the close and buy-back are done virtually and simultaneously.
I try to look these things up after I do them. The graphic is apparently a state transition table.
In automata theory and sequential logic, a state-transition table is a table showing what state (or states in the case of a nondeterministic finite automaton) a finite-state machine will move to, based on the current state and other inputs. It is essentially a truth table in which the inputs include the current state along with other inputs, and the outputs include the next state along with other outputs.
A state-transition table is one of many ways to specify a finite-state machine.
Automata theory seems pretty cool:
Automata theory is the study of abstract machines and automata, as well as the computational problems that can be solved using them. It is a theory in theoretical computer science.
I guess one can learn a lot in college. The trick is learning things well enough to apply them. This took me several months of full-time work to get from wherever I was to here. It would have been useful to know this stuff earlier, but, give a man a fish...
Like all my games, this is a bit primitive. Every day the application looks back 36 trade days for guidance. A month is 21 trade days, probably you want to look back more than that. 42 days is two months, that seems too long. Reasonable look-back periods are something like 27, 31, 36, and 39. These aren't magic numbers.
Win rates above 56% are pretty good. I think that's better odds than a mythical card counter can achieve in Vegas with an ideal deck. One major difference between gambling and investing is that the investor gets great odds but no free drinks or other comps.
If the application finds an aggregated portfolio win rate of greater than 56% for the close oQuatz signal it will go long CO. The cQuatz signals work the same way. If cQuatz has a buy signal, it will go long OC. The o or c tell you where the virtual sell is; that is the second letter in OC and CO. Not easy to keep straight without jotting something down.
Buy and Hold Quatz Breakdown
This is the Buy and Hold study presented above with buy and hold quatz numbers on performance. Note that the total lines cross foot.
High Dimensionality
High Dimensional Probability is post-graduate academic study I think. Personally, academic papers on the subject are difficult. Keep in mind, I'm giving my interpretation of these issues which may be wildly different from academic reality.
One of the reasons I like the study above is that it demonstrates high-dimensionality. The top table shows the individual portfolio members, but they are gone in the bottom tables which have aggregated numbers. A chart can't properly show this because the data is at least three dimensional.
Back to the Strategy
The strategy is also unusual because it is calculated on the aggregate numbers. I did it this way for processing speed and simplicity.
High dimensionality is also demonstrated by the above graphic as the profit for each security is not allocated by the aggregated calculation. The numbers give us a pretty good idea of the profitability though.
The buy and hold profit for the period is 5.21 - 0.29 = 4.92. That is a summation of each security's log return.
The strategy profit is 5.76 (from oQuatz CO) + 1.04 (from cQuatz OC) = 6.80.
The study below shows the two-dimensional results for the portfolio members.
Note that the numbers cross foot properly, with the previous tables. Every security except LABU (which has a mind of its own sometimes) substantially improves over buy and hold. The win percentages are also substantially better with the strategies, again with the exception of LABU. This is even more impressive considering that this is a period where buy and hold returns are very strong and difficult to beat.
Further research is necessary to confirm these results, but I'm close to convinced that they are correct.
The strategy logic is different in important technical respects to my previous work and seems to have important implications for practical finance because of its efficiency and processing speed.
My initial research into longer time periods (2016 to the present) suggests that the strategies perform consistently with these results. The Quatz logic seems better than FoxForce5 which is based on hexadecimal operations.
Similar strategies are often termed naïve by financial sages. They don't seem to mean that as a compliment. I'm hoping my work has some theoretical and practical significance.
I give daily signals and commentary on my website.
I have been describing my equity market research on Seeking Alpha since July 2019.
Finite State Accounting provides an overview of the architectural orientation of the analysis. An important concept is, we are equally interested in equity performance under all conditions.
Specter: A Finite State Trading Strategy proposed that an individual equity's price movement is directly related to the technical condition of the overall market. The article demonstrated that overall technical market conditions vastly outweigh the technical conditions of a specific equity.
Understanding Complex Strategies With FoxForce5 describes a hexadecimal framework to support complex finite state gate logic. The strength of the framework was demonstrated with both Specter and vanilla signals.
FoxForce5: A Force To Be Reckoned With showed how Specter/FF5 consistently beats buy and hold returns over long time periods on all major sector ETFs.
Adjusting Strategies For Underlying Market Conditions described a simple methodology to determine whether an uptrend exists powerful enough to override default flat strategy decisions. This was the introduction to Trend Following.
Goldilocks and the 3x Bulls introduces the rewrite of the logic engine that was used for Return of the Zombies. It also explores equity selection risk.
Return of the Zombies discusses the use of Zombi strategies to mitigate strategy selection risk.
Use Kabbalah To Design Winning Strategies shows how a logic model similar to the Sefirotic Tree reduces the number of FF5 signals from 23 to 11 to improve decision making.
This article was written by
Disclosure: I/we have no positions in any stocks mentioned, and no plans to initiate any positions within the next 72 hours. I wrote this article myself, and it expresses my own opinions. I am not receiving compensation for it (other than from Seeking Alpha). I have no business relationship with any company whose stock is mentioned in this article.