QuantDesk® Machine Learning Forecast
for the Week of August 22
US equities ended the week almost flat while world markets edged lower. The US Federal reserve hinted of a possible rate hike consideration in September, but general opinion is that the Fed will not do anything prior to the November election. With no channel for yield, sentiment remains bullish for stocks and riskier assets.
The VIX spiked higher mid-week but retracted back to a historical low, finishing the week at 11.34%.

Image 1: VIX Aug 15th to August 19th – Source: Google Finance
Past performance is not indicative of future returns.
On the oil front, West Texas Intermediate Crude rallied to $48.00 from $43.83 last Friday. Brent crude rose to $50.46 from $43.32.

Image 2: USO Aug 15th to Aug 19th – Source: Google Finance
Past performance is not indicative of future returns.
Cointegration in Foreign Exchange
Tucker Balch, Ph.D. and I had a great time in NYC and enjoyed our presentation at Baruch College with the Market Technicians Association (MTA). I want to take the opportunity and thank Tyler Wood, Alvin Kressler and Emily Myer for their gracious hospitality and for giving us the platform to tell our story in front of well-informed market technicians professionals. The topic of the presentation was how Lucena designed and implemented a machine learning-based foreign exchange strategy. During the Q/A session I was asked by two separate attendees whether we’ve considered correlation or further cointegration in our research. My answer was that our approach was predicated primarily on responding to macroeconomic signals among G-10 countries combined with shorter term technical analysis. I have further explained that we have considered cointegration in equity pairs strategy in the past, but found the technology to be already widely exploited. Over the weekend, as I reflected on the presentation, I felt compelled to talk a bit more about cointegration in this week’s newsletter since it is a rather powerful trading technique for statistical arbitrage and therefore relevant to currency pairs.
From Wikipedia: Cointegration is a statistical property of a collection (X1,X2,…,Xk) of time series variables. First, all of the series must be integrated of order 1 (see Order of Integration). Next, if a linear combination of this collection is integrated of order zero, then the collection is said to be co-integrated.
In layman’s terms, cointegration is a measure of how time series data representations are related to each other. The notion is that the difference in behavior of time series graphs can be attributed to a mathematical representation that captures their difference into a variable, P. Whenever that difference is fully aligned (P=0) the time series are considered to be acting perfectly based on historical correlation. In other words, per expectations, hence, cointegrated.
A great analogy taken from Quora: Suppose you see two drunks (i.e., two random walks) wandering around. The drunks don’t know each other (they’re independent), so there’s no meaningful relationship between their paths. But suppose instead you have a drunk walking with her dog. This time there is a connection. What’s the nature of this connection? Notice that although each path individually is still an unpredictable random walk, given the location of one of the drunk or dog, we have a pretty good idea of where the other is; that is, the distance between the two is fairly predictable.
(For example, if the dog wanders too far away from his owner, she’ll tend to move in his direction to avoid losing him, so the two stay close together despite a tendency to wander around on their own.) We describe this relationship by saying that the drunk and her dog form a cointegrating pair.
The same concept can be applied to highly correlated securities. When a pair of securities move predictably in relationship to each other, and that tight correlation is broken, it is fairly safe to assume that eventually they will become correlated again.
Let’s look at a concrete example of how one could potentially profit by identifying the points in which a highly correlated pair diverge. Regardless of which direction the pairs will proceed into the future, the mere fact that they will eventually converge can be exploited. By buying long the security that diverged lower and selling short the security that diverged higher, a trader will profit by closing both the long and short positions when the pair converge back.
This can be done scientifically using our QuantDesk® replication engine. Suppose I’d like to find the most correlated currency pair to the USD/AUD (US Dollar & Australian Dollar currency pair).

Image 3: QuantDesk replication configuration. Looking for a 2-year replication of USD/AUD.
The resulting screen looks as follows:

Image 4: QuantDesk replication identified USD/CAD as the most correlated currency pair to USD/AUD.
It is clearly visible that overall the two pairs USD/AUD and USD/CAD are mostly correlated. But it’s also very easy to see that at times they do diverge and eventually converge again.
If we zoom in to view the last six months, we can easily identify entry and exit opportunities.

Image 5: QuantDesk replication 6 months’ view of correlated currency pair to USD/AUD & USD/CAD. It is clearly visible to see when a divergence is meaningful enough for an entry and when an exit should occur.
Obviously, the example illustrated here is an oversimplification of what a more exhaustive research can produce. As a guideline, the research should be predicated on four main steps:
- First, the research need to assess what constitute the most “predictable” cointegrated pair.
- Identify what level of divergence should be considered for entry.
- Identify what level of convergence should be considered for exit.
- Lastly, consider an exhaustive brute force parametric search in order to consider optimal execution guidelines. Such as:
- Number of pairs to hold.
- Leverage levels and allocation restrictions such as min/max allocation per executed pair.
- Exit criteria or how long to hold if convergence doesn’t occur.
- Stop loss considerations – when the pairs start to wander apart too far.
Analysis
The table below delineates a trailing 12-month performance and a YTD comparison between the two model strategies we cover in this newsletter (BlackDog and Tiebreaker), as well as the two ETFs representing the major US indexes (the DOW and the S&P).

Image 6: Last week’s changes, trailing 12 months, and year-to-date gains/losses.
Past performance is no guarantee of future returns.
Model Tiebreaker: Lucena’s Active Long/Short US Equities Strategy:

Tiebreaker: Paper trading model portfolio performance compared to the SPY and Vanguard Market Neutral Fund from 9/1/2014 to 8/19/2016.
Past performance is no guarantee of future returns.
Model BlackDog 2X, Lucena’s Tactical Asset Allocation Strategy:

BlackDog: Paper trading model portfolio performance compared to the SPY and Vanguard Balanced Index Fund from 4/1/2014 to 8/19/2016.
Past performance is no guarantee of future returns.
Appendix
For those of you unfamiliar with BlackDog and Tiebreaker, here is a brief overview: BlackDog and Tiebreaker are two out of an assortment of model strategies that we offer our clients. Our team of quants is constantly on the hunt for innovative investment ideas. Lucena’s model portfolios are a byproduct of some of our best research, packaged into consumable model-portfolios. The performance stats and charts presented here are a reflection of paper traded portfolios on our platform, QuantDesk®. Actual performance of our clients’ portfolios may vary as it is subject to slippage and the manager’s discretionary implementation. We will be happy to facilitate an introduction with one of our clients for those of you interested in reviewing live brokerage accounts that track our model portfolios.
Tiebreaker:
Tiebreaker is an actively managed long/short equity strategy. It invests in equities from the S&P 500 and Russell 1000 and is rebalanced weekly using Lucena’s Forecaster, Optimizer and Hedger. Tiebreaker splits its cash evenly between its core and hedge holdings, and its hedge positions consist of long and short equities. Tiebreaker has been able to avoid major market drawdowns while still taking full advantage of subsequent run-ups. Tiebreaker is able to adjust its long/short exposure based on idiosyncratic volatility and risk. Lucena’s Hedge Finder is primarily responsible for driving this long/short exposure tilt.
Tiebreaker Live Interactive Brokers Portfolio Performance
Live performance reports are taken from an interactive brokers account which attempts to follow Tiebreaker’s model closely with the following potential differences:
- Transactions Fees - Performance is net of transactions fees.
- Management Fees - Performance is net of management fees.
- Manager’s discretion – Manager can use own discretion as to final trade executions. For example, employing VWAP (volume weighted average price) and/or manually monitoring exit during stop loss and target gain.
- Hard to borrow and restricted stocks - Hard to borrow, and restricted stocks may be substituted with highly correlated alternatives.
- Dividends, interest or any other credits are reinvested.
- Slippage - Depending liquidity, large block purchases could impact certain stock prices unfavorably.
Tiebreaker Model Portfolio Performance Calculation Methodology
Tiebreaker’s model portfolio’s performance is a paper trading simulation and it assumes opening account balance of $1,000,000 cash. Tiebreaker started to paper trade on April 28, 2014 as a cash neutral and Bata neutral strategy. However, it was substantially modified to its current dynamic mode on 9/1/2014. Trade execution and return figures assume positions are opened at the 11:00AM EST price quoted by the primary exchange on which the security is traded and unless a stop is triggered, the positions are closed at the 4:00PM EST price quoted by the primary exchange on which the security is traded. In the case of a stop loss, a trailing 5% stop loss is imposed and is measured from the intra-week high (in the case of longs) and low (in the case of shorts). If the stop loss was triggered, an exit from the position 5% below, in the case of longs, and 5% above, in the case of shorts. Tiebreaker assesses the price at which the position is exited with the following modification: prior to March 1st, 2016, at times but not at all times, if, in consultation with a client executing the strategy, it is found that the client received a less favorable price in closing out a position when a stop loss is triggered, the less favorable price is used in determining the exit price. Since March 1st, 2016, all trades are conducted automatically with no modifications based on the guidelines outlined herein. No manual modifications have been made to the gain stop prices. In instances where a position gaps through the trigger price, the initial open gapped trading price is utilized. Transaction costs are calculated as the larger of 6.95 per trade or $0.0035 * number of shares trades.
BlackDog:
BlackDog is a paper trading simulation of a tactical asset allocation strategy that utilizes highly liquid ETFs of large cap and fixed income instruments. The portfolio is adjusted approximately once per month based on Lucena’s Optimizer in conjunction with Lucena’s macroeconomic ensemble voting model. Due to BlackDog’s low volatility (half the market in backtesting) we leveraged it 2X. By exposing twice its original cash assets, we take full advantage of its potential returns while maintaining market-relative low volatility and risk. As evidenced by the chart below, BlackDog 2X is substantially ahead of its benchmark (S&P 500).
In the past year, we covered QuantDesk’s Forecaster, Back-tester, Optimizer, Hedger and our Event Study. In future briefings, we will keep you up-to-date on how our live portfolios are executing. We will also showcase new technologies and capabilities that we intend to deploy and make available through our premium strategies and QuantDesk® our flagship cloud-based software.
My hope is that those of you who will be following us closely will gain a good understanding of Machine Learning techniques in statistical forecasting and will gain expertise in our suite of offerings and services.
Specifically:
- Forecaster - Pattern recognition price prediction
- Optimizer - Portfolio allocation based on risk profile
- Hedger - Hedge positions to reduce volatility and maximize risk adjusted return
- Event Analyzer - Identify predictable behavior following a meaningful event
- Back Tester - Assess an investment strategy through a historical test drive before risking capital
Your comments and questions are important to us and help to drive the content of this weekly briefing. I encourage you to continue to send us your feedback, your portfolios for analysis, or any questions you wish for us to showcase in future briefings.
Send your emails to: [email protected] and we will do our best to address each email received.
Please remember: This sample portfolio and the content delivered in this newsletter are for educational purposes only and NOT as the basis for one’s investment strategy. Beyond discounting market impact and not counting transaction costs, there are additional factors that can impact success. Hence, additional professional due diligence and investors’ insights should be considered prior to risking capital.
For those of you who are interested in the spreadsheet with all historical forecasts and results, please email me directly and I will gladly send you the data.
If you have any questions or comments on the above, feel free to contact me: [email protected]
Have a great week!

Lucena Research brings elite technology to hedge funds, investment professionals and wealth advisors. Our Artificial Intelligence decision support technology enables investment professionals to find market opportunities and to reduce risk in their portfolio.
We employ Machine Learning technology to help our customers exploit market opportunities with precision and scientifically validate their investment strategies before risking capital.
Disclaimer Pertaining to Content Delivered & Investment Advice
This information has been prepared by Lucena Research Inc. and is intended for informational purposes only. This information should not be construed as investment, legal and/or tax advice. Additionally, this content is not intended as an offer to sell or a solicitation of any investment product or service.
Please note: Lucena is a technology company and not a certified investment advisor. Do not take the opinions expressed explicitly or implicitly in this communication as investment advice. The opinions expressed are of the author and are based on statistical forecasting based on historical data analysis. Past performance does not guarantee future success. In addition, the assumptions and the historical data based on which an opinion is made could be faulty. All results and analyses expressed are hypothetical and are NOT guaranteed. All Trading involves substantial risk. Leverage Trading has large potential reward but also large potential risk. Never trade with money you cannot afford to lose. If you are neither a registered nor a certified investment professional this information is not intended for you. Please consult a registered or a certified investment advisor before risking any capital.