It has been a while since I wrote my last article. There has been hectic time with: work, Xmas break and developing AI based strategies applied to commodities and volatility products.
As I am getting better and better in understanding advanced forms of AI and their potential, I told to myself why not to share with the community what it is and how I am applying it to our preferred strategy: NEXT-alpha.
What is it?
In computer science, artificial intelligence (AI), sometimes called machine intelligence, is intelligence demonstrated by machines, in contrast to the natural intelligence displayed by humans. Leading AI textbooks define it as any device that perceives its environment and takes actions that maximize its chance of successfully achieving its goals. Colloquially, the term "artificial intelligence" is often used to describe machines (or computers) that mimic "cognitive" functions that humans associate with the human mind, such as "learning" and "problem solving".
A typical AI analyzes its environment and takes actions that maximize its chance of success. An AI's intended goal can be as simple as: 1 if the AI wins a game, 0 otherwise, or complex such as repeat actions that have been successful in the past. AI often revolves around the use of algorithms. An algorithm is a set of unambiguous instructions that a mechanical computer can execute. Many AI algorithms are capable of learning from data; they can enhance themselves by learning new strategies, or "rules of thumb", that have worked well in the past. Alternatively in the most complex cases: they can themselves write other algorithms.
Intelligent but not as human mind can do
The cognitive capabilities of current architectures are very limited, using only a simplified version of what intelligence is really capable of. For instance, the human mind has come up with ways to reason beyond measure and logical explanations to different occurrences in life. In simpler words: humans can innovate and move beyond the status quo, machines can only move on a straight line and hardly make evolutionary innovations that goes beyond the current status of the world we live in.
Does AI learn?
Yes, it does. It does it continually and thus constantly improving its ability to take decisions and successfully execute a task. The computer algorithms automatically constantly improve based on what they learn on daily basis!
How to apply this to finance?
The equity market has existed for centuries, the future market for millennial (Yes! From the time of ancient Greece). Like Ray Dalio says understanding the mechanisms behind long and short term cyclicality of the market in its broader sense (stocks, bonds, metals,…) can help to forecast the most likely event to take place in the future.
Now, once a mechanism is well understood, because it is a set of consecutive logical instructions, it can then be transformed in an algorithm, and once we have it in our hands we can then train it using a multitude of historical data that in some cases are tracing back to the beginning of 1900.
With NEXT-alpha this is exactly what we are doing. We have used historical data to train our AI model to understand the most likely asset that is able to generate money in the next 1 to 3 months. Algorithms keep on evolving over time and so it was for NEXT-alpha. It went through some adjustments since it is inception back in 2017. The core principles are still there, the percentage of positive months and magnitude of returns keeps getting better and better.
note: part of the article has been a re-edit from Wikipedia
The short answer is yes (!) and of course there are some “but”. If on one hand, we do not need to be financial geniuses to do that on the other hand we need: discipline, planning and start as soon as we are born (parents need to do some planning as well).
How to do that? Let’s start from the high level requirements. We are teens or less, we have not much money, let’s put this money to work in a passive managed index e.g. the S&P500. We have a bad crisis, money go down by 50-60%, we might not care much: all our life is in front of us, in absolute terms we are not losing much capital and we do not need this money right away. On the opposite side, let’s say we are 70 years old and we have just retired and we have to live out of our savings and we want our savings keep making money for us. Best place to invest them: short term bonds with a pay off of 2.1% per year and a max drawdown of 0.4%. In between these two extreme cases, we can think of allocating more and more money as we grow into bonds and less into e.g. the S&P500.
Let’s now get down to some details and let’s do that in chronological order i.e. from when we are born until we are 100 years old.
We are born and we get 1,000 USD and every year until we graduate from college at 25 y.o. we get in our saving account $500. We (our parents until we are 18 y.o.) take the money and invest them in the financial market, at the beginning 100% in the S&P500 and by age 25, 30% in bond and 70% in the S&P500. We then start working until we are 70. Because we are wise and we understand the importance of compounding, every year we incrementally add in our broker account some of our savings until the age of 70 in which we can comfortably put the equivalent of 2019 $12,000/year. By 2089, this should be 48,000 USD assuming 2% inflation per year. The money that we put on the broker account each year are invested in a combination of bonds and stocks as e.g. indicated in the table below according to a given age range. By 2089, we should have made $3.6M ($870,000 in 2019 money purchasing power).
What next? We start enjoying our well deserved retirement spending 3-4,000 USD/month (2019 value) while investing all the remaining part in bonds giving us a steady 2%/year.
It is not complicated to be a millionaire, it just requires some planning and discipline.
This is what it can be achieved by using the S&P500 and simple bonds, we can then thinking of moving (wisely) to more sophisticated investment instruments and then we get the real deal!
After having written about FOMO and the importance of an entry/exit strategy, it is now time to talk about how to build a portfolio.
We all know that our portfolio should be diversified, but why?
Fundamentally all of us are looking after maximizing the earnings while minimizing the risks. This can be effectively done by holding stocks, commodities and bonds. Easy, right? Yes, not a braniac. The question then become how much to allocate to each of the asset or strategy. We are now entering a trickier territory in which as investors we have to face the trade-off between risk and reward. We all want the strategy that in the long run gives the highest return (even knowing a priory the risk involved) but then in real life when we experience too much drawdown or a bad year we might rush into bad decisions such as revising our approach and thus ineffectively try to chase the tail.
When it comes to portfolio optimization, I personally use two approaches: risk parity and the Markowitz approach. I ll spare the post from the mathematical details, if you want to know more either ask or Wikipedia has good enough info. I find the approaches complementary mostly because the risk parity might not always give the risk-reward profile we are after (despite being very easy to compute, not quite the same for the Markowitz).
In the table below you can see how these two models are applied to a portfolio consisting of stocks (S&P500), gold and bonds (US medium term). The risk parity approach gives returns in between holding solely bonds or equities/gold while having low drawdown, higher Sharpe ratio and low correlation with the market. Using the Markowitz approach, while maximizing the Sharpe, the returns are as equities/gold while the maximum drawdown roughly half of what it is experienced in the last 15 years with these two assets. If on the other hand the drawdown is minimized then the results are very similar to the risk parity theory.
Two approaches and three different answers: up to our risk appetite to decide what to follow.
My previous post was about human psychology and how by nature people have the tendency to buy the highs and sell the lows. Let’s assume we have now managed to control our emotions and we are cold blooded investors capable to take rational decisions. As I see it, the next step in investing is to have a clear exit and entry plans. Instructions to write down to guide us prior pressing the sell or buy button on the screen.
How to come up with these instructions? First we start from some hypothesis. After we have them clearly formulated, we verify through backtesting whether we are right, wrong or we have some fine tuning to do. We keep on adjusting the entry/exit hypothesis until the backtest is satisfactory enough so that the hypothesis now become our set of instruction to entry/exit an investment.
Clear enough? If not or not enough, let me illustrate this process through an example.
You might have noticed that once in a while the S&P500 drops by 3-4% and later there are usually three situations: go back up, move side ways and bloodshed. For simplicity, let’s imagine we are buy & hold investors. Allrighty, in the long term we’ll make money but… would do not be great if we could avoid major drawdowns (bloodshed). Definitely yes. Our hypothesis now become: I exit the trade when the market drop by a given % and I go back into the trade after a certain number of days. The hypothesis will become instructions only after the number of days and the % are properly specified and verified through backtesting. Next, take: Excel or Matlab or Python implement the optimization and backtesting routine and select the case that better suits your needs. In this example, using Matlab, I ran 732 simulations to optimize the entry/exit values for QLD (2x Nasdaq). As compared to a conventional buy & hold, the maximum drawdown can decrease from 84 to 47% while the CAGR from 26.7 to 28.8%. A couple of % points on CAGR might not seem that much but compounded over 13 years might mean more than double your returns. If you wonder about the optimized values for this specific case: 9.5% as trailback stop loss over a 35 days period (7 weeks).
I hope you enjoyed reading this article. Next post will be about portfolio optimization. Drop a line if you have a specific example of portfolio you would like to optimize.
In the meanwhile, wish you all a profitable week.
Since young age I have always been fascinated by philosophy and how human minds work. Even when facing the most unreasonable thoughts, digging deeper, there is (in the vast majority of the cases) a rationale behind.
So, why do 75+% of the investors lose money?
I can pin point at least three reasons: lack of strategy, poor portfolio asset allocation and emotions.
In this post I’ll focus on the emotion part that quite often makes us (yes, I did several mistakes when I started) buying the highs and selling the lows.
Buying low comes from an investment philosophy known as value investing. The basic concept of value investing is to buy investment instruments when they are “on sale.” That means buying when everyone else is selling (and prices are down) and vice versa. A smart value investor buys low, then patiently waits for the “herd” to catch up. Unfortunately, most investors tend to do the exact opposite: tend to chase trends and follow the herd.
A huge part of smart investing is psychological and the image below (sorry for the quality) illustrates one of the many psychological roadblocks investors have.
We may want to buy low and sell high, but that goes against our instincts and biases. When a stock/ETF is falling, we dump it. When a stock/ETF is rising, we buy it. We sell when the price is falling because we are afraid of losing more money; we buy when it is rising because we have a fear of missing out. To compound the problem, most investors are not experts at realizing when something high or low “enough.”
So what to do to avoid the drawbacks of trying to buy low and sell high?
• Understand your goals and risk tolerance: it is critically important to understand what it is you are trying to accomplish and how much risk you are comfortable taking. Once you have that figured out, you can create an investment plan that is appropriate for you and comfortable enough to keep you from impulse buying high and panic selling low.
• Avoid market timing: instead of trying to time investments perfectly and squeeze every last cent out of each one, focus on building a diversified portfolio of stocks and bonds that give you the greatest chance to succeed over the long term.
• Leverage your resources: having a great financial plan and a diversified portfolio is irrelevant if you don’t follow through and stick to it. Becoming self-aware of the pitfalls is a great first step
Stay tuned for a couple of posts to come about: strategy definition and portfolio allocation.
note: part of this post was originally posted on Investopedia