Thanks for your interest in following Hands-Off Investing. This month marks our first partnership, first monthly newsletter, and latest article! There is a lot of exciting stuff going on but I will try to keep this short and to the point!

Our latest article covers python’s Technical Analysis (TA) library. This new library is being widely underutilized in the industry and has huge potential in speeding up the stock analysis process. In the past, we had to create each indicator by hand. Now, using this library we can get 40+ technical indicators with one line of code! I think its a game changer. …

Using the Technical Analysis (TA) library, we can acquire 40+ technical indicators for any stock.

A correlation of all the technical indicators using Microsoft’s stock data. (Photo by Author)
A correlation of all the technical indicators using Microsoft’s stock data. (Photo by Author)
A correlation of all the technical indicators using Microsoft’s stock data. (Photo by Author)

Technical indicators are exploratory variables usually derived from a stock’s price and volume. They are used to explain a stock’s price movements in hopes of predicting future swings. In other words, they are used to determine whether a stock is “overbought” or “oversold”. Though these indicators are widely exploited by both independent investors and hedge funds alike, many people do not have quick way of obtaining them. They have to resort to calculating each indicator one at a time. This process takes a great deal of time and computational power. Believe me. …

Effortlessly obtain the historical data of over a thousand stocks. For free.

Image for post
Image for post
A word cloud of stock tickers.

Anyone Can Do This

Beginners welcome. I’ve created this guide for Python developers of all skill levels.

Maybe you don’t even know what Python is, and that’s okay! I’ve got you.

If you’ve read any of my articles about automating the stock analysis process, you’ve probably seen this code before. I figured that since this program is so integral for algorithmic investing, I need to break it down further and make sure that everyone understands how to use it!

After running this program you’ll be left with a folder on your device that contains the historical data of thousands of stocks. …

Three years ago I lost every cent to my name, and I’m glad it happened.

Image for post
Image for post
Photo by Jp Valery on Unsplash

I began my investing career in May of 2017. By May of 2018 I had found a way to lose all of my money.

An automated machine learning strategy to determine the optimal stocks for algorithmic trading.

Image for post
Image for post
Photo by Stephen Leonardi on Unsplash

With the increasing popularity of machine learning, many traders are looking for ways in which they can “teach” a computer to trade for them. This process is called algorithmic trading (sometimes called algo-trading).

Algorithmic trading is a hands off strategy for buying and selling stocks that leverages technical indicators instead of human intuition.

In order to implement an algorithmic trading strategy though, you have to narrow down a list of stocks you want to analyze. This walk-through provides an automated process (using python and logistic regression) for determining the best stocks to algo-trade.

I will dive deeper into the logic and code below, but here is a high-level overview of the…

Automate the calculation of RSI for a list of stocks, and then analyze its accuracy at predicting future price movements.

Image for post
Image for post
An outline of the process to calculate RSI and its historical accuracy for a stock. (Image by Author)

The relative strength index is a momentum oscillator commonly used to predict when a company is oversold or overbought. The calculation process is straightforward:

  1. Observe the last 14 closing prices of a stock.
  2. Determine whether the current day’s closing price is higher or lower than the previous day.
  3. Calculate the average gain and loss over the last 14 days.
  4. Compute the relative strength (RS): (AvgGain/AvgLoss)
  5. Compute the relative strength index (RSI): (100–100 / ( 1 + RS))

The RSI will then be a value between 0 and 100. It is widely accepted that when the RSI is 30 or below, the stock is undervalued and when it is 70 or above, the stock is overvalued. …

When 80% of market trades are done by machines, the only people capable of beating the market, are Data Scientists.

Image for post
Image for post

Magnus Carlsen is the highest rated chess grandmaster. He once beat 10 Harvard lawyers in chess simultaneously, while blindfolded. He is widely accepted as the best chess player to ever exist. That is, when it comes to competing against humans. Computers though, are a completely different story. In fact, Magnus has completely given up on the idea of beating the top AI chess engines. He once said,

“I can’t beat the best computers. They have complete information, so how could we expect anything else?”

Like Magnus, Warren Buffet is a master of his craft (net worth 72.6 billion dollars). And like chess, investing heavily relies on a person’s ability to predict future movements. …

Using advanced natural language processing (NLP) techniques to find the similarities in hip hop’s top artists.

Image for post
Image for post

Their words have shaped a new generation, their subject matter is heard by millions. These four rappers have dominated the last two decades of hip hop, Kanye West, Drake, Lil Wayne, and Eminem. While their style is inherently different, their words are not. Using the latest in natural language processing techniques, we can determine what these artists have in common and in turn, what topics have been driving hip hop culture for the last two decades.

To do this I have implemented a Latent Dirichlet Allocation (LDA) model for topic modeling and word clouds for visualizing significant terms in each rapper’s lyrics. …

Learn how to easily calculate and compare the On-Balance Volume for any amount of stocks.

Image for post
Image for post
Photo by Aziz Acharki on Unsplash

The On-Balance Volume is one of the most widely used technical indicators. It gives investors the ability to gauge a stock’s future trajectory by interpreting the flow of its daily volume. The calculation is simple. If a stock’s closing price is higher than its opening, we will add the daily volume to a running total. If it is lower, we will subtract it. At the end, we will have a cumulative volume for the stock that we can use to judge its future movements.

“Technical analysis is a skill that improves with experience and study. Always be a student and keep learning.” …

Learn how to maximize the predictive accuracy of the MACD using actionable insights from a data driven analysis.

A graph depicting that the accuracy of the MACD indicator is about 49%.
A graph depicting that the accuracy of the MACD indicator is about 49%.
The darker green a column is, the more signal line crossovers we observed on average. The darkest green can be observed at 47%, 48%, and 49%, meaning those accuracy’s can be trusted the most.

The MACD is a momentum-focused price indicator. It utilizes the exponential moving averages of the last 12 and 26 days’ closing price to predict future trends. After analyzing the historical data of over a thousand companies, I can confidently state that you will make more money doing the opposite of what the MACD technical indicator recommends. At an average accuracy of 49%, equity traders have better odds moving money flipping a coin (pun intended) than using this momentum oscillator.

In the process of incorporating it into my algorithmic trading program, I stumbled upon some eye-opening findings about the MACD — findings that prove its recommendations are nothing but preconceived notions. In fact, I found that it is statistically more beneficial to do the opposite of what this momentum signal advises. …

About

Cameron Shadmehry

Founder of Hands-Off Investing || Data Scientist and Algorithmic Trader || Not Financial Advice.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store