Photo by Christine Roy on Unsplash

A simple way to think about your system

Almost all trading strategies available to the retail investor can be divided into one of two camps: trend following or mean reversion.

Trend following seeks to buy something when a trend has started (or just before it takes off) and ride it as long as possible. Mean reversion strategies are designed to look at those securities that have gotten too far away from the “right” price and either go short or long and wait until it reaches the target.

It doesn’t matter whether your strategy is systematic or not, it can fit into one of these categories.

Photo by Sami Takarautio on Unsplash

With complete backtests and code in Python

The Relative Strength Index (RSI) has long been one of the most popular indicators due to its versatility. It is most commonly used as an oscillator to find reversals in prices, but can also be used as a trend or momentum indicator.

There are hundreds of ways to use this indicator in a trading strategy. Below, we’ll walk through four approaches with backtests, stats, and the code to produce it all.

As always, don’t just dive in and start trading because you saw a pretty backtest, but do your own research. These examples are here to get you started and…

Photo by David Marcu on Unsplash

Backtesting a versatile and popular indicator in Python

The Moving Average Convergence-Divergence (MACD) is a popular and versatile indicator that appears in a number of trading systems. In it’s most basic form, we have the difference between two exponential moving averages (EMA), one fast and the other slow. The MACD is the difference between these two EMAs. From this simple beginning a host of other indicators such as signal lines and MACD bars are built. We’ll show you how to implement each of these, but refer back to this article for a thorough explanation.

In this post, we’re going to implement and backtest three versions of the MACD…

Photo by Tim Marshall on Unsplash

Why a bias towards action can lead to losses

“It’s already at $112!” Roy yelled across the room to his friend, Peter. “I can’t believe you bought it when it was at $38, this is insane!” Roy anxiously ran his hand through his hair. “Peter, what if it keeps going up? I know I should’ve bought it when you first told me to, but what if this is my last chance to be able to make any profit at all?”

Peter smiled as he watched his own investment soar. “I don’t know man, I think we can easily double where we’re at right now. I’m no expert, but look…

Photo by Isravel Raj on Unsplash

3 ways to know when you should sell

As I write this, I’m sitting on a stock that is up over 300% in the past 8 months. It has ballooned significantly as a percentage of my portfolio and is now creating a bit of a conundrum: do I sell it or hold?

I have thousands of dollars of profit sitting there, just waiting for me to cash out. My mind goes back and forth between two positions:

Sell now because:

  • Too much business comes from other countries and their currencies are weakening
  • It has simply appreciated too quickly and is due…

Photo by Jakob Owens on Unsplash

The Turtles show anyone can trade

In 1982 a successful Chicago trader, Richard Dennis, made a bet with his partner, William Eckhardt. Dennis believed that anyone could be a successful trader, all they needed was the proper training to follow a system and the discipline to stick to it. Eckhardt disagreed, he believed trading was an innate skill and couldn’t be taught. The bet was on.

Dennis took out ads in the New York Times and the Wall Street Journal to get applicants for his experiment. After interviews, he selected 13 “turtles” — named after efficient turtle farms he saw on a trip to Singapore —…

Photo by Darius Bashar on Unsplash

Add this fast moving indicator to your arsenal for mean reversion or trend following systems

The stochastic RSI — often abbreviated StochRSI — is much less intimidating than it sounds. This oscillator is simply the stochastic oscillator applied to an RSI signal.

It’s used in a very similar way as the indicators that it’s built on. It ranges from 0–100 with higher readings indicating overbought levels (potentially decreasing), and lower values indicating oversold levels (potentially increasing). StochRSI moves much more quickly than the standard RSI, so can generate a lot of trading signals, and traders may even smooth it (SMA-StochRSI) or combine it with other values to determine entry and exit points.

Let’s get to…

And tips for how to fix it

Walking up to a roulette table, a visibly nervous Englishman lays down a pile of chips worth over $135,000. This sum was the culmination of the man’s life savings and included the proceeds from selling every last one of his possessions. The man, Ashley Revell, turns to the crowd and with an uncomfortable laugh, asks “red or black?” He turns back to the table, the croupier spins the wheel and the ball drops. Ashley puts it all on red. The ball careens over the vanes before landing on 7 — a red tile.

In a matter of seconds, Revell doubles…

Step-by-step examples in Python

While the name stochastic oscillator may sound intimidating, this powerful trading indicator provides a simple way to identify momentum, trend reversals, or overbought and oversold positions. It’s a versatile formula that can be used in conjunction with other indicators to provide powerful new combinations.

Here, we’ll just look at the basic stochastic oscillator and walk through some examples in Python.

Photo by Jeffrey Blum on Unsplash

Stochastic Oscillator 101

The fundamental premise of the stochastic oscillator is that a stock’s closing price tends to be closer to the recent highs if it’s trending upward, and closer to the recent lows if it’s trending downward. …

How much risk are you really taking?

Risk is a challenging subject in the trading and investment world. Depending on who you ask, it can mean a variety of different things. Some consider risk synonymous with volatility, i.e. the more an asset’s price moves, the riskier it is. Others look at it as the probability of losing money. Still others define it as the inherent uncertainty that exists in the world.

Moreover, it’s impossible to measure precisely; the best we can do is get a rough feel for our the amount of risk we’re taking on.

To do this, we’ll rely on a number of metrics and…

Raposa Technologies

Bringing Quant Finance to You

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