finance

Regime detection through hidden markov model

Regime detection through hidden markov model It’s rumoured that in the early days of Renaissance Technologies - according to the book ‘The Man Who Solved the Market’ - hidden markov models are used for regime detection. Here I am, a couple of decades later - employing this strategy. This will be integrated into my ‘Jarvis’ - a series of Algorithmic toolkits that advises me in all situations. Hidden markov mode is a statistical unsupervised learning model used to model states.

Regime detection through hidden markov model

Regime detection through hidden markov model It’s rumoured that in the early days of Renaissance Technologies - according to the book ‘The Man Who Solved the Market’ - hidden markov models are used for regime detection. Here I am, a couple of decades later - employing this strategy. This will be integrated into my ‘Jarvis’ - a series of Algorithmic toolkits that advises me in all situations. Hidden markov mode is a statistical unsupervised learning model used to model states.

Market Neutral Strategy - DAX Index and EWG ETF

DAX index and Germany ETF I will keep it short in this post since I espoused on this strategy a couple of times. I discovered another market neutral opportunity this month. And this is based on ratio between Germany DAX index and MSCI based Germany ETF (EWG) Based on backtest, sharpe ratio is close to 1.16. The composition between these 2 indexes are largely similar and any significant deviation shouldn’t persist for long.

Market Neutral Strategy - FTSE Index and EWU ETF

UK index and UK ETF I discovered another market neutral opportunity this month. And this is based on ratio between FTSE 100 index and MSCI based UK ETF (EWU) Based on backtest, sharpe ratio is close to 0.9. The composition between these 2 indexes are largely similar and any significant deviation shouldn’t persist for long. The optimal lookback period for the MA component in bollinger band is approximately 40 days.

Market Neutral Strategy - SnP500 (SPY) to Berkshire Hathaway Ratio

Market neutral strategy As the negative news pile up (trade wars, slump in economy growths, etc), I sought for market neutral stategies that could perform well in any market environment. An idea that struck me recently is to exploit the pair between Berkshire and SnP 500 ETF. The SnP500 ETF/ Berkshire ratio has been falling over the years - insinuating that Berkshire still outperforms the index in the last couple of years.

Prototype Pair Trading Strategy for Silver ETFs

In these 2 weeks, I’ll deploy my pair trading algo strategy into my server. I modified the code below from a renowned quant trader, Ernest Chan. The basic idea is to find z-scores through moving average & moving SD of spread. If it’s more than absolute of z-score, I will either short or long the spread depending on the polarity. In the backtesting below (using a pair of silver ETFs as an example), I assumed a hypothetical amount of 10,000 dollars per trade.

What is low - Regression Approach

What is low - Regression Approach This serves as an alternate compass for me to visualize what is low. See post here for another version of compass. I was inspired by a post written by a local finance blogger. He used a regression line flanked by the intervals to inform whether the prices are low or not. I’m unsure what sort of intervals of intervals he used in his plots, but for my purpose I will use prediction intervals instead.

Investment compass

Investment Compass (Kindly wait 10 seconds for the entire app to load. Best viewed in Desktop) This serves as a compass for me to visualize the potential returns given the % fall from 52 week high. See my linkedin article here for further explanation on why I think this is a good indicator. The app consists of 3 tabs. The ‘Visualize’ tab contains 3 graphs plotting % fall from 52 week high against the expected returns 1 to 3 years later.

Rolling out the Investment Compass interactive app that I promised eons ago

Finally I had some time to sit down to work on the interactive app. From what was an hideous app to a somewhat Minimum Viable Product (MVP) version of an app. (Shhh…I’m not really a User Interface, UI person). This serves as a compass for me to visualize the potential returns given the % fall from 52 week high. See my linkedin article here for further explanation on why I think this is a good indicator.

Updated ETF project codes

Updated ETF watchlist project While watching a world cup match today, I updated my ETF watchlist project (you may click here if you haven’t seen it yet) You may find the github code here. In the revision, I parallelized the crawling - essentially tapping on all the cores in my machines. To create your own watchlist. Follow these steps, Install R and R studio. In Mac or Linux, type the following in command line git clone https://github.