The Plan

15/06/2024

Once upon a time, in a land far far far away, there was another version of me who came up with plans and would dream of putting them into practise. 

These plans always seemed great, they proved fruitful in backtests, had sure-fire logic and....oh right...no risk management.

So just one failed trade would blow the account.

Perhaps fortunate that this version of me is long gone. 

Over the last, pfff, 18 months? ... I have been working on a system that will *always* work - given a long enough test period.

For the initiated or those not familiar with the basics of markets, let's go through some facts :

1. Markets trend up over a long period of time. This is because money printing, measured by M2 supply, is always rising. The more the government has debt, the more money it needs to print. And because the dollar has no fixed supply (it's a magic number generated from thin air), the more money you print, the lower the value of each dollar.

Basic supply and demand. If you have the only orange in the world, it's worth a lot. If there are a billion oranges in the world and you own 1...it's not worth so much. So the more money the government prints, the lower the value of each dollar, which makes everything more expensive.

When items become more expensive, we say the prices have inflated - and we call this process, inflation.

2. Interest rates are high. Mostly due to the COVID pandemic, when interest rates became so cheap due to government policies and support for the economy, it created a bubble. 

In this bubble, a lot of companies with effectively no profits and even no employees, were able to secure very cheap loans and boost their market caps. Some IPO'd at absurd valuations and because everyone was at home due to lockdown, there was  a lot more speculative activity in markets - hence people invested in very risky assets en masse.

See GME, AMC, BYND, etc. All of which are not profitable companies and yet made moves more than 2000% in the space of a few weeks.

Meme stock craze of 2021
Meme stock craze of 2021


The government also began printing a TON of money. But instead of investing in policies or businesses, they invested in the stock market. They were effectively propping up the market with a huge influx of cash every day, every week, every month for almost a year. If you had invested at the lows of the COVID crash into a leveraged ETF such as TQQQ and held till the top you would have made 1400% in just over a year.

The process the FED began was called Quantative Easing, or QE for short. This is where they print money to support the economy by directly investing into the market. It's a very expensive process because it always ends in higher inflation and a lower dollar.

The amount of money printed
The amount of money printed

The end result was that in 2022, when COVID was no longer a serious risk to public health, and lockdown ended, interest rates rose again, the government popped their own bubble and all those companies with the cheap loans were now paying suddenly higher interest payments every month.

On top of that, oil recovered, inflation resumed, house prices rose, QE cancelled and QT began (the opposite of QE) and the market suffered a general prolonged downturn.

3. Skip to October 2022. The Nasdaq is at 10k levels. The FED, in charge of interest rates and economic policies, has been hiking rates for the past year, and now begins hinting at cuts to interest rates, a stable strong workforce, and resumption of QE - or more accurately a reduce QT - they were allowing more of their money to remain in the market but still reduce some cash and they weren't adding more.

Interest rate %'s and related events
Interest rate %'s and related events

Now, markets generally need some thematic event to occur which defines that era of market moves. For example, in 1995 - 2002 it was the dot com rush, which ended in the dot com bubble. This was effectively the era of investing in internet start-ups, and yes defined by very speculative moves, investing in promises of companies rather than actual results.

You might think - "oh but the internet is still here, so investing in the dot com bubble would have been fine."

And you aren't wrong. The dot com bubble at it's height pushed the Nasdaq to 4900, it's now almost 20k.

But you would have waited 17 years to breakeven if you bought the Nasdaq high.

And if you had bought some companies, you would still be waiting to break even now.

CSCO for example reached 81/share in the dot com bubble, it has never reached this valuation again, currently trading at 45/share.

There are worse examples, which are now delisted stocks due to going bust, being fraudulent Ponzi's or trading at sub $1 which removes them from most exchanges.

But the key point is, that if you invest in the index, be that Nasdaq, SPX500,  RTY or otherwise, you would always breakeven over a given period of time, and any drawdown is just a chance to buy cheaper.

The common theme of markets since 2022, has been AI. In October 2022, OpenAI went public with its first GPT model, and it began a craze for GPU's supplied by semiconductor companies and the largest tech companies began investing huge sums of their CAPEX into AI themed investments and ideas.

Whether it's a bubble or not, is undecided, many believe it is and yet AI, similar to the Internet, is a very useful and advantageous technology which is more than likely to exist for decades to come.

The NASDAQ100 has doubled since the lows of 2022, and valuations for tech companies are not cheap relative to historical averages. Just see NVDA...up more than 1500% since GPT's launch...they recently had to perform a 10 to 1 stock split because their shares reached more than 1200 each. That was a week ago and now they already trade at 1300 pre split equivalent.

NVDA AI Craze Monthly Chart
NVDA AI Craze Monthly Chart

On the other hand, companies that cannot afford the AI investment CAPEX craze due to their high debt and high interest rates, have not benefitted from the AI craze. The small cap index RTY is barely positive in the last 2-3 years.

So I see an opportunity here now that the Fed is speculating on rate cuts.

Small caps typically outperform tech and large cap stocks after the first rate cut, and small caps are currently trading at valuations equivalent to 2000's relative to tech.

Small cap gains as a ratio of large cap gains is historically very cheap
Small cap gains as a ratio of large cap gains is historically very cheap

There are significant reasons to believe small caps are unfairly undervalued both relative to tech and just generally.

It's not relevant to this post entirely, but important to understand, as my main focus for this year will be investing into small cap ETF's based on the concept I will explain later.

Here are some of the reasons small caps *will* begin to outperform and turn a corner in the current downtrend.

𝟏. 𝐉𝐮𝐧𝐞, 𝐉𝐮𝐥𝐲, 𝐀𝐮𝐠𝐮𝐬𝐭 𝐚𝐫𝐞 𝐭𝐡𝐞 𝐛𝐞𝐬𝐭 𝟑 𝐦𝐨𝐧𝐭𝐡𝐬 𝐨𝐟 𝐚𝐧 𝐞𝐥𝐞𝐜𝐭𝐢𝐨𝐧 𝐲𝐞𝐚𝐫, 𝐠𝐨𝐢𝐧𝐠 𝐛𝐚𝐜𝐤 𝐭𝐨 𝟏𝟗𝟐𝟖.

  • I don't actually like election year theories, because as show in attached image, election years are actually just more volatile in both directions. They tend to have black swans ( shocker ), and there tends to be a panic, followed by a panic induced rally ( due to panic cuts ) 
  • See : www.carsongroup.com/insights/blog/not-all-rate-cuts-are-the-same/ For panic cut data. 
Election years are simply more volatile years. Shows % Movement every week in the Nasdaq. Colour coded. Red = Election Year, Yellow = Pre election year. Green = year 1 of presidency, Blue = Year 2 of presidency. Noteworthy that black swans are most likely to occur during an election year.
Election years are simply more volatile years. Shows % Movement every week in the Nasdaq. Colour coded. Red = Election Year, Yellow = Pre election year. Green = year 1 of presidency, Blue = Year 2 of presidency. Noteworthy that black swans are most likely to occur during an election year.

𝟐. 𝐒𝐦𝐚𝐥𝐥 𝐜𝐚𝐩 𝐩𝐫𝐨𝐟𝐢𝐭𝐬 𝐚𝐫𝐞 𝐞𝐱𝐩𝐞𝐜𝐭𝐞𝐝 𝐭𝐨 𝐫𝐞𝐜𝐨𝐯𝐞𝐫 𝐨𝐯𝐞𝐫 𝐭𝐡𝐞 𝐧𝐞𝐱𝐭 𝐬𝐞𝐯𝐞𝐫𝐚𝐥 𝐪𝐮𝐚𝐫𝐭𝐞𝐫𝐬 Quarterly Y/Y bottom up EPS growth trajectory - yes you didn't understand that - for the SPX600 vs the $SPX500 is expected to rise.

  • 𝟑. 𝐒𝐦𝐚𝐥𝐥 𝐜𝐚𝐩𝐬 $𝐑𝐓𝐘 𝐚𝐫𝐞 𝐭𝐫𝐚𝐝𝐢𝐧𝐠 𝐚𝐭 𝐭𝐡𝐞 𝐥𝐨𝐰𝐞𝐬𝐭 𝐥𝐞𝐯𝐞𝐥𝐬 (𝐚𝐥𝐦𝐨𝐬𝐭) 𝐞𝐯𝐞𝐫 𝐫𝐞𝐥𝐚𝐭𝐢𝐯𝐞 𝐭𝐨 𝐥𝐚𝐫𝐠𝐞 𝐜𝐚𝐩𝐬, 𝐚𝐧𝐝 𝐩𝐚𝐫𝐭𝐢𝐜𝐮𝐥𝐚𝐫𝐥𝐲 𝐭𝐞𝐜𝐡 $NSDQ100.
  • We are literally trading at valuations equivalent to 1970's and dot com levels. In case you didn't know, small caps historically outperform tech. Yes, that shit company you have never heard of is better than $NVDA (NVIDIA Corporation) Who woulda thought it. 

𝟒. 𝐖𝐞 𝐚𝐫𝐞 𝐜𝐮𝐫𝐫𝐞𝐧𝐭𝐥𝐲 𝐚𝐭 𝐭𝐡𝐞 𝟑𝐫𝐝 𝐥𝐨𝐧𝐠𝐞𝐬𝐭 𝐝𝐮𝐫𝐚𝐭𝐢𝐨𝐧 𝐄𝐕𝐄𝐑 𝐟𝐨𝐫 $RTY 𝐭𝐨 𝐧𝐨𝐭 𝐦𝐚𝐤𝐞 𝐚 𝐧𝐞𝐰 𝐀𝐓𝐇. 

  • 647 days. The longest time ever was 959 days and that was the result of the GFC. 2nd highest was 845 days and that was the dot com burst If you think that's fair, I am sorry but you need to go to a doctor.

𝟓. 𝐒𝐦𝐚𝐥𝐥 𝐜𝐚𝐩𝐬 𝐭𝐲𝐩𝐢𝐜𝐚𝐥 𝐨𝐮𝐭𝐩𝐞𝐫𝐟𝐨𝐫𝐦 𝐭𝐡𝐞𝐢𝐫 𝐥𝐚𝐫𝐠𝐞 𝐜𝐚𝐩 𝐩𝐚𝐫𝐭𝐧𝐞𝐫𝐬 𝐢𝐧 𝐭𝐡𝐞 𝟔-𝟏𝟐 𝐦𝐨𝐧𝐭𝐡𝐬 𝐚𝐟𝐭𝐞𝐫 𝐭𝐡𝐞 𝐟𝐢𝐫𝐬𝐭 𝐫𝐚𝐭𝐞 𝐜𝐮𝐭. 

  • Yes, ok - We haven't had a US cut yet, but the ECB cut, BoC cut, Sweden cut. BoE would probably cut if they didn't have some dumb election. There isn't much reason the fed won't cut at some point this year.

𝟔. 𝐓𝐡𝐞 𝐢𝐦𝐩𝐚𝐜𝐭 𝐨𝐟 𝐚 𝐫𝐚𝐭𝐞 𝐡𝐢𝐤𝐞 𝐢𝐬 𝐥𝐚𝐠𝐠𝐞𝐝 𝐛𝐲 𝐚𝐛𝐨𝐮𝐭 𝟏𝟐 𝐦𝐨𝐧𝐭𝐡𝐬. 

  • "During each of the last six instances, small-cap returns have provided positive average returns during the 12, 18 and 36-month periods following Fed tightening. Notably, small-cap stocks generally performed very strongly for the first twelve months following a rate hike, followed by a pull back during the ensuring six-month period."

𝟕. % 𝐨𝐟 𝐬𝐭𝐨𝐜𝐤𝐬 𝐭𝐫𝐚𝐝𝐢𝐧𝐠 above 𝐭𝐡𝐞𝐢𝐫 𝟓𝟎𝐃 𝐚𝐯𝐞𝐫𝐚𝐠𝐞𝐬 𝐢𝐧 𝐭𝐡𝐞 𝐑𝐮𝐬𝐬𝐞𝐥𝐥 𝐢𝐬 𝐚𝐭 𝟑𝟗% Historically this represents a very cheap market, where levels are overly sold off. 30% tends to mark a reversal point Weekly chart ( percent based so 0 to 100)

  • Ticker ; R2FI

𝟖. 𝐒𝐦𝐚𝐥𝐥 𝐜𝐚𝐩𝐬 𝐫𝐞𝐦𝐚𝐢𝐧 𝐫𝐞𝐥𝐚𝐭𝐢𝐯𝐞𝐥𝐲 𝐜𝐡𝐞𝐚𝐩 𝐭𝐨 𝐭𝐡𝐞𝐢𝐫 𝐥𝐚𝐫𝐠𝐞 𝐜𝐚𝐩 𝐩𝐞𝐞𝐫𝐬. 

If none of the above makes any sense, just take my word for it. It's not particularly relevant to this strategy, as whatever happens, small caps will always trend up over time even if at a slower pace than tech. 

Macro-economics is just fun and makes me seem smarter than I am. Call it a very nerdy hobby if you want.

My algorithm on RTY monthly charts
My algorithm on RTY monthly charts



The idea

Now I have the basics covered, let's explain the concept.

We know that markets trend up over time, due to various factors explained above, we know there are drawdowns but that if you invest into an ETF or an Index, which contains multiple stocks at different % weightings for diversification, you will always trend upwards over a given time.

We can use this to our advantage.

Let's imagine 2 random conditions, it doesn't matter what those conditions are - let's say 1 is if it's raining and the other is if its sunny.

If we buy the index or ETF when its raining, and sell when it's sunny and we are in profit - we would always have a profitable strategy. It's not a very sensible system because you are basing your logic on conditions that the market probably has nothing to do with ( there are theories that the weather influences markets, but it's not significant).

So what about if we coded our own conditions based on market movements?

Well we can do that. Or at least I have done this.  I will explain the conditions later.

But what's the problem with this? 

Well how do we know how much to buy? Let's see we have a $10k account to invest. We definitely don't want to be investing 100% per buy signal. Because if a signal behaves poorly, and we have a bad entry where the price drops further, we can't add more since we have used up all our available liquidity.

So perhaps we invest 5% per trade? 

Sure. If we do 5% per trade, we have a maximum of 20 buy signals (without a sell signal in between), before we use up all our capital.

Assuming our conditions do not generate many false-positives, this is a much better system But 20 buys isn't that much.

Maybe some rules based exposure?

Exactly. I went through the exact questions over a few months this year to come up with what i consider to be the best way to expose my capital to markets without risking being overly exposed or having no cash to buy further dips.

Here is what I will do :

Imagine 10 buy entries, at 3% invested per trade :

  • 1st trade - Buy
  • 2nd trade -Buy
  • 3rd trade - ignore
  • 4th trade - Buy
  • 5th trade - ignore
  • 6th trade -Buy
  • 7th trade - Buy
  • 8th trade - ignore
  • 9th trade - ignore
  • 10th trade- Buy

Yes you read correctly, we ignore some trades. This is done with the idea that the more trades that appear without a sell signal in between, the more likely we are in a downtrend, and therefore we want to be more careful with our cash.

It also assumes that each buy signal appears lower than the previous buy signal, which is most often true.

With this logic, instead of 10 trades at 3% per trade, equalling 30% exposure of our total capital, we only risk 18%, which gives us a lot more "wiggle room".

To put these numbers into perspective, from the heights of the COVID bubble in 2021, to the low of 2022 there were 64 buy signals. This equates to an exposure of 135%, if i never closed any position.

In reality, about 75% of positions were closed within the same "set" there were opened in.

This will make sense when I show the algorithms display.

Finally, we have one additional rule to apply. We are faced with the problem that it's not possible to perfectly time markets. We can never buy exact lows and definitely can never sell at exact highs.

We therefore want an exit signal that is not "permanent" - in other words once we exit a position, we still want the chance to profit if the asset rises further.

But Aiden - how can you profit from something rising in price if you have already sold?

Well...instead of selling the whole position in profit, you can instead choose to close the position for the total profit unrealised.

For example if a $1000 purchase has a $200 profit (20%), we can close the $200, put that into our bank balance as cash, and leave the rest of the trade to move further and generate us more cash.

This means that if the market rises further, we can still profit, albeit slightly less than if we just left the position.

But if the market declined, we have more cash available to buy dips, since we have closed some profits.

This also means we can reduce risk when the market rises and increase risk when market drops, which is the very essence of investing.

One final point to make is that if we choose to invest in leveraged ETF's, we get a more volatile strategy, but in a 3x leveraged etf, every 1% invested is worth 3%, which allows us to be more exposed without needing to invest more.

The volatility is not an issue if we have cash on hand to benefit.

The algorithm

The system should be fairly explanatory.

Every green X, is a buy entry

Every red X is a sell entry, for the partial profits unrealised in the active trades.

The number of buys is counted up until there is an exit signal, and so each set of buys before a sell is referred to as a "set".

And you will notice that when the price of the chart bottoms out and is followed by a strong uptrend, the system places multiple buy entries at these points. This is because it considers a higher probability of an uptrend forming, so it increase the number of buys generated.

It can be wrong of course, which is why we have our exposure rules.

I have coded a backtest of this strategy, based on investing 3% per entry, and starting with 100k equity, running on a 4 hour chart of QQQ, an ETF that tracks the value of the NASDAQ100


Green line shows the current value of the system - $152,412.38.

Orange line shows the value of the closed positions , or in other words realised profits - $48,580.10

Blue line shows the value of the open positions, or in other words the total value of positions not closed - $3,562.28

This is vs QQQ which went from 150 to 479 in the same period, excluding dividends.

If you haven't realised already - this system underperforms the NASDAQ across the same period of time, so what's the purpose?

Well...almost every trading system will underperform the benchmark unless you use leverage.

But the use of leverage is risky and excessive use is not worth it.

The goal is to be able to trade actively, and take regular profits which I can use to build a sustainable income. This system definitely does that. There is no point comparing an active trading system to the buy and hold return, because you would only ever outperform the buy and hold return if you attempt to either use leverage or trade an asset that has decline from the start of the period. 

There are very few ETF's tracking large markets which have a negative buy and hold return. And ideally you want to be trading something that does trend up over time so you have that safety net for trades that are poorly timed.

0 trades are closed at a loss over the period - since this isn't possible, we ignore any exit signals if the position is at a loss. And just 14% are closed at breakeven. There is a total of 380 trades, not including when you apply the rules on exposure.

Additionally, we will be applying this system across a large variety of ETF's. Primarily across China, America, Europe, and Commodities such as Uranium and Gold.

Here is a backtest of Uranium on a 4hr chart, based on 3% invested per trade.

You will notice the strategy returns a net profit of  more than 164% over the period vs the buy and hold return of 53%. This is because the chart of Uranium is (ironically) quite volatile. Due to various impacts of environmental activity and a hesitancy in governments to invest in Nuclear Power. 

Since the system actively trades, it takes advantage of the lower prices and the volatility to close trades somewhat regularly, so the system turned $100k into $267k since 2015

How the algorithm works

I have to be somewhat careful here. Not to sound too mysterious, or secretive or acting like a 1995 era CIA spy, but sharing how strategies work, particularly when they are efficient, is never a great idea.

A working strategy that becomes popularised will eventually break simply because the market does not want people to succeed en masse at short or mid term trading. It's not a conspiracy, it's fact. Hence groups like the Turtles no longer publicise exactly what trades they take, and hedge fund activities are all made public weeks or months after they have been made.

If we could all emulate the best investors or traders in the world, they would eventually have no advantage over other market participants. That's exactly what a market is - it's a competition between different people with different mindsets, goals and ideas, to outperform each other.

So I won't be sharing the code in full. Just aspects and some screenshots.

There are 2 parts of my code, there is the library which contains all the main functions, and then there is the main script which imports the functions the library creates and then utilises them to generate the data and plot to the chart.

I should mention I am coding in Pinescript V5, through a custom built charting system based on Tradingview which I overlay onto my PC and mobile wallpaper, allowing me to update scripts with ease and monitor market events without loading additional apps.

In a very short explanation, I have created a trend detection strategy, which weights the probability of an uptrend based on multiple data points both historical and current, and buys based on the probability it calculates.

There is a high correlation (upwards of 0.95), between a high probability buy and an uptrend occurring.

To detect trends, we have created some functions to measure the change from one point to another and then compare to a customised moving average. We use the values generated to determine some conditions.

Our condition for a buy generated is referred to as the bool type ema_up. When this value is true, or in other words is not na(), we plot a label to the chart in the form of the green X.

Our condition for a sell generated is referred to as the bool type ema_dwn. When this value is true, or in other words is not na(0, we plot a label to the chart in the form of the red X.

The exact conditions for ema_up and ema_dwn are more complicated and will remain obscure.

Whilst the main script can be shared if requested, the library used to perform the calculations will remain private, protected by copyright and IP laws.

I have also created a script which draws some simple lines from the point of the final buy entry in a "set", to the final exit signal in a "set". This shows the efficiency of the system.

Attached is the day timeframe of RTY. 

A green line is drawn from the point of the last buy entry in a "set", to each exit in the "set"

Each red line shows the point from the last sell in a previous "set" to the last buy in the following "set"

The greyish lines show resistance and support points, where historically the system has generated a strong uptrend previously. These tend to act as strong regions for the price to bounce off.

This is a 4hr chart of QQQ, a NASDAQ100 ETF. 

You can see more clearly how the green lines drawn show the point of purchase to each exit signal generated, and still the green lines follow the trend perfectly, whilst the red lines follow a downtrend perfectly.

This is exactly what the system should do - and always will do, because of how it's coded.

Summary

I imagine if a person reads this without any knowledge of financial markets, this might make absolutely no sense.
It could seem gibberish and arbitrary, but after almost 2 years, I am confident enough to put large sums of money into this strategy and generate an income which I can both live off and use to compound to generate higher future returns.


I am actively looking for private equity investors to invest in my strategy, which is most likely to happen once I prove sustainable returns on a live trading system.

My portfolio is currently consisting of long term trades in small caps based on the thesis I have underlined previously. My goal is to profit enough in these trades by the end of year to have a capital I consider high enough to begin running this more mid term strategy actively.

The strategy itself is mostly automated, with coded alarms on signals and it is possible to automate the trade taking process itself as well - although I would need a new broker or create my own API which might be complex and risky if a bug occurs.

My goal is to reach $1M equity in under 15 years through both monthly deposits and trading gains.

After gaining confidence in my strategy and proving real results in a live trading system, I am comfortable to implement a small amount of leverage to increase the potential gains, but without significantly higher risk.

Most likely this will be x2 leverage on ETF's with a strong long term upward trajectory


For those interested you can find the main script and the chart overlay script here:


https://www.tradingview.com/script/quuW9RVM-Underwater-Oscillator-Trend-Line-Overlay/

https://www.tradingview.com/script/HFs6gxpc-The-Underwater-Oscilator/


And my expectations on the US economy and general trajectories here:


September 2023:

https://www.tradingview.com/chart/BTCUSD/HjF6xaog-BTC-LONG-100K/

November 2023:

https://www.tradingview.com/chart/SPX500/ySX1NO28-New-Bull-Market-Starting/

June 1st:

https://www.tradingview.com/chart/RTY/3pR3Bb2h-Small-cap-recovery/

https://www.tradingview.com/chart/RTY/wpJhGozP-Small-cap-recovery/













© 2023 Marau All rights reserved.
@Marau2021
Powered by Webnode Cookies
Create your website for free! This website was made with Webnode. Create your own for free today! Get started