timothy sykes logo

Penny Stock Basics

Backtesting: Trading Strategies, Tips, & Common Mistakes

Timothy SykesAvatar
Written by Timothy Sykes
Updated 2/2/2021 19 min read

What is backtesting? It’s a way to test a trading strategy using past market data.

It’s a simple concept … but actually doing it can get a bit more complex.

Setting up an automated backtest can involve coding. And that can send you down the rabbit hole into automated trading and algorithmic trading … That’s all way over my head.

I like to stick to my little penny stock niche — away from all the institutional investors and algorithms.

But backtesting can still have advantages, and you should know what it is as an informed trader. So let’s get into how to backtest a trading strategy. Plus I’ll give you some tips and common mistakes to avoid.

What Does Backtesting Mean?

It’s testing a trading strategy using historic price movements. It’s based on the assumption that past results are indicative of future returns. But that assumption can be dangerous…

That’s why I prefer saying, “History doesn’t always repeat, but it often rhymes.” 

History rhymes because the market’s made up of traders and investors, and human psychology doesn’t change. So the market doesn’t change.

It’s not an exact science. But there are certain patterns that repeat again and again over time. I’ve learned how to spot and trade them. It’s how I’ve made over $5.8 million trading penny stocks.*

[Please note that these kinds of trading results are not typical. Most traders lose money. It takes years of dedication, hard work, and discipline to learn how to trade, and individual results will vary. Trading is inherently risky. Before making any trades, remember to do your due diligence and never risk more than you can afford to lose.]

New to penny stocks? Get my FREE online guide here and start your trading journey today.

How Does Backtesting Work?

Technical traders usually use backtesting. If you see a pattern in the market that you think is repeatable, you can backtest the strategy to see if it’s potentially profitable.

Before you can backtest a trading strategy, you need to know the parameters of your strategy. For example, what signals entries and exits? Where will you cut losses, and what time frame do you want to trade?

Then you take those indicators and apply them to past market moves to see if they result in the returns you expect.

It’s kinda like paper trading. But you’re testing based on the past market, rather than in the current one.

See which stocks I’m watching every week, right from your inbox. Sign up for my free weekly watchlist here.

Why Is Backtesting Important?

It can be important if you want to look at data on how often your pattern or strategy works, or whether it works, without risking your capital.

When you know how reliable a trading strategy is, you can then make some key decisions … Do you want to trade it, tweak it, or forget about it and start over?

You can also adjust your position size based on the strategy’s win rate. You might choose to be more aggressive with higher-odds setups or use smaller position sizes on less-reliable patterns.

Getting the information you need to make these decisions can take time, but it can be worth it. It’s one part of becoming a consistent, self-sufficient trader.

It took me years to learn my trading patterns. But it doesn’t have to take you years — I can be the mentor to you that I never had. I started teaching to help students learn from my mistakes.

If you want to be my student, apply for the Trading Challenge. Learn from my library of almost 2,500 video lessons, weekly live trading webinars, and a chat room with access to my top students.

Automated Backtesting vs. Manual Backtesting

You can choose an automated system or a manual method. Let’s break ‘em down…

What’s Automated Backtesting?

Post image

Get my weekly watchlist, free

Sign up to jump start your trading education!

Automated backtesting involves using software or a platform. You’ll have to program the software to enter and exit trades based on the indicators of the strategy you’re testing.

How Do You Manually Backtest?

You can backtest without fancy programs, but it’s not as easy. To do it, you need access to charting software with historic charts.

Then, choose a stock chart you want to use to test your strategy. Scroll back in the chart a few years … Next, scroll the chart forward one candle at a time, marking every time your trading indicators indicate a buy or a sell or to cut losses.

Record your trades and results in a trading journal or a program like Excel or Google Sheets.

What Are the Types of Backtesting Systems?

Research-Based Backtesting

This is the starting point and where you’ll probably have more than one strategy in mind. The goal is to narrow them down to a few you’ll test more thoroughly.

The name of the game here is speed. You want quick results on whether the strategy has any potential before testing further.

Event-Driven Backtesting

This is a type of automated-backtesting system. It runs on a loop based on the code you enter in.

It’s very similar to executing real trades. The program runs simulated market data and executes buys and sells based on the triggering events you enter in the code.

supernova placement

4 Tips for Effective Backtesting Strategies

Be Specific

The more parameters you have for your strategy, the better your results should be. You want to be specific on the type of trade you want to take. You don’t want mixed results with too many variables.

You want specific data on a specific setup. That’s it. 

When I trade, I look for specific patterns and price action. If it’s not there, I don’t take the trade.

I go over my specific trade indicators in my Sykes Sliding Scale. You can learn more about my indicators in my “Trader Checklist Part Deux” DVD.

Remember the Big Picture

When you backtest a trading strategy, you want to account for all kinds of markets. Testing a strategy during a bull market might not give you a good picture of how the strategy will work in a bear market and vice versa.

Also, think about the kind of market you test a strategy in. If you backtest a market driven by a certain sector, like tech or coronavirus, the strategy may not necessarily work in a different hot market or sector.

Do your testing over a time frame that accounts for different market conditions and hot sectors.

Include Fees in Your Testing

Most brokers have gone to a commission-free model, but not all of them. Most backtesting software allows you to account for commissions.

If you’re testing a short-selling strategy, you should also account for borrow fees and interest charges. You gotta know if your strategy will be profitable after fees and commissions.

Never Stop Learning

Having good results from a backtest doesn’t mean you’re on the road to riches overnight. Don’t just jump into the market thinking you’ll nail every play.

Watch some of the price action first. Study the setups in real time. Paper trade the strategy using StocksToTrade to see if it works in the current market.

Trading is about a lot more than having a good strategy. You need the right trading mindset, you need to be able to execute, you need to study, and you need a good teacher.

What’s Backtesting in Value at Risk (VaR)?

Value at risk (VaR) is a calculation of how much an investment might lose over a given time period in normal market conditions.

VaR is measured as a probability of loss. It’s not exact. Backtesting VaR compares your actual losses to your probable loss calculation. This will give you the accuracy of your VaR calculation. If your VaR calculation fails the backtest, you can make adjustments to your calculation.

Institutions mostly use VaR to determine risk either firm-wide or by an individual portfolio or position.

How Is Backtesting Done? See a Practical Example

Let’s say you have a chart pattern with indicators that you believe can predict a penny stock supernova before it goes up … (BTW, I have a strategy for this. You can get the alerts for no cost. Sign up for my Supernova Alerts here.)

You input your indicators and parameters into your chosen software. Choose your time frame, going back, say, three years. The software runs and builds a portfolio based on the buy and sell indicators you program in.

When it’s done, you have a portfolio of data showing which stocks went up and which were losers. You can review all the data from your portfolio analyzer to see if it’s a successful strategy.

Top 3 Backtesting Mistakes You Must Avoid

We’ve covered all the basics … Now let’s look at three mistakes to avoid at all costs. 

Ignoring The Data

You want your new-found strategy to work … Everyone likes to be right. But the goal of backtesting isn’t to be right — it’s to gain knowledge.

If you can’t accept you’re wrong, you might try to change the outcome. You might leave out trades you say you would’ve taken in real life. Or exclude trades tested in a bear market, thinking it doesn’t apply to the bull market you’re trading in.

Don’t cherry-pick which examples you use or don’t use. If the trade was based on the parameters of your strategy, you need to include it in your results.

Analysis Paralysis

Sometimes having too much information can cause analysis paralysis. If you’re over-analyzing every single move, you can freeze up and miss out on a perfect opportunity. Or you can think you see your setup but miss one indicator, resulting in a loss.

The whole point of backtesting a strategy is for the data. You can then use that data to find confidence in your setup. Take the trade and see how it works. If it doesn’t work, cut your losses and move on.

If your losses are smaller than your gains then your account will grow over time.

Failure to Adapt

Relying solely on backtesting results can hurt your trading. Your results might be stellar, but maybe that strategy doesn’t work in the current market. You have to be able to recognize when a setup doesn’t work and adapt.

Determine if it’s a short-term change and adjust your position sizes. Or if you must, stop trading the strategy altogether.

4 Platforms You Can Use for Backtesting

There’s software available to help you with your strategies. Let’s go over a few of them…

Backtesting in Excel

You can use Excel to track your manual backtest results.

Just enter the data for the pattern you’re testing, like where you entered and exited. What was the stock’s high of the day and how much did it go up?

Then you can use Excel’s formulas to give you an average of how stocks performed over time. And you can view the data as percentages, charts, or graphs.

Backtesting on Tradingview

You can backtest on Tradingview with its web-based platform. But you have to be able to enter the parameters of your strategy as lines of code.

You have to enter whether you’re going long or short, your risk, your position size, and your entry and exit signals. Once you enter the information, the system is totally automated.

Backtesting With Python

Python is a tool for building automated trading systems. It requires writing code for your trading strategy.

With Python, you can use its pre-existing outlines or make your own.

Backtesting With AmiBroker

AmiBroker also requires you to enter code for your buy and sell indicators. You can also set your position sizes and the number of positions you want to take at any one time.

Restricting your portfolio size can be good practice so you don’t use all your capital at once.

Frequently Asked Questions About Backtesting

Let’s go over some frequently asked questions…

How Accurate Is Backtesting?

It can have different outcomes of accuracy depending on the information you put in. And there’s always the chance that a strategy that worked in the past won’t work in the present market.

How Long Should You Backtest a Trading System?

It’s smart to backtest over a course of at least a few years. It’s even better if you can backtest over different market conditions like bear markets and bull markets. This can give you better data on whether your strategy can work in any market.

What’s the Difference Between Backtesting and Forward Performance Testing?

You backtest to analyze how your trading strategy has performed in past markets. Forward performance testing is another term for paper trading. In short, forward performance testing is putting your strategy to work in real time without using real money.

What’s the Difference Between Backtesting and Scenario Analysis?

When you backtest, you use real historical data to determine a strategy’s success rate. Scenario analysis uses hypothetical scenarios to simulate changes in a portfolio’s value. It’s more like an estimate of the worst-case scenario.

Should You Build Your Own Backtester?

That depends on how much time you have and your coding prowess. The experience can be educational and you can fine-tune your parameters to test a specific strategy. You can run your custom test on an automated platform like Tradingview or Python.

What’s the Ideal Backtesting Period for an Intraday Strategy?

To backtest day trading strategies, you should still go back a few years. You want to make sure your strategy can work in many different market conditions. To have a high-odds strategy, it has to be repeatable over time.

Conclusion: Is Backtesting a Waste of Time?

Backtesting can give you useful data on a strategy. It could give you confidence in your trading if you have the numbers and data to back up your theory. I think it’s worth knowing the past. As I always say, I’m just a glorified history teacher.”

But remember, the markets constantly change. You need to be able to adapt.

By the time you track a pattern in the past market, it might not work in the current market. That’s why I became a teacher — to teach students the nuances of the market.

watchlist banner

I’ve been trading the same penny stock patterns for years. It doesn’t matter if it’s crypto, electric vehicles, coronavirus, or any other hot market.

By trading with a small account and sticking to my patterns, I turned my $12,415 bar mitzvah money into $1.65 million by the time I graduated college.*

Now I’ve been in the market for 20+ years. I’ve seen a lot of hot markets, hot sectors, and even bear markets. And I’ve profited through all of them.*

Ready to learn the patterns and strategies that got me where I am today? Apply for my Trading Challenge.

Want to build your knowledge account first? Start with the 30-Day Bootcamp I made with one of my top students, Matthew Monaco. You can go as fast or slow as you need. And you can rewatch the videos as often as you need. It’s all broken down in 30 easy-to-digest lessons…

And a lot of traders are going through the Bootcamp before they apply to my Trading Challenge. Will you join them?

What do you think? Let me know in the comments … I love to hear from my readers!

 


How much has this post helped you?



Leave a reply

Author card Timothy Sykes picture

Timothy Sykes

Tim Sykes is a penny stock trader and teacher who became a self-made millionaire by the age of 22 by trading $12,415 of bar mitzvah money. After becoming disenchanted with the hedge fund world, he established the Tim Sykes Trading Challenge to teach aspiring traders how to follow his trading strategies. He’s been featured in a variety of media outlets including CNN, Larry King, Steve Harvey, Forbes, Men’s Journal, and more. He’s also an active philanthropist and environmental activist, a co-founder of Karmagawa, and has donated millions of dollars to charity. Read More

* Results are not typical and will vary from person to person. Making money trading stocks takes time, dedication, and hard work. There are inherent risks involved with investing in the stock market, including the loss of your investment. Past performance in the market is not indicative of future results. Any investment is at your own risk. See Terms of Service here

The available research on day trading suggests that most active traders lose money. Fees and overtrading are major contributors to these losses.

A 2000 study called “Trading is Hazardous to Your Wealth: The Common Stock Investment Performance of Individual Investors” evaluated 66,465 U.S. households that held stocks from 1991 to 1996. The households that traded most averaged an 11.4% annual return during a period where the overall market gained 17.9%. These lower returns were attributed to overconfidence.

A 2014 paper (revised 2019) titled “Learning Fast or Slow?” analyzed the complete transaction history of the Taiwan Stock Exchange between 1992 and 2006. It looked at the ongoing performance of day traders in this sample, and found that 97% of day traders can expect to lose money from trading, and more than 90% of all day trading volume can be traced to investors who predictably lose money. Additionally, it tied the behavior of gamblers and drivers who get more speeding tickets to overtrading, and cited studies showing that legalized gambling has an inverse effect on trading volume.

A 2019 research study (revised 2020) called “Day Trading for a Living?” observed 19,646 Brazilian futures contract traders who started day trading from 2013 to 2015, and recorded two years of their trading activity. The study authors found that 97% of traders with more than 300 days actively trading lost money, and only 1.1% earned more than the Brazilian minimum wage ($16 USD per day). They hypothesized that the greater returns shown in previous studies did not differentiate between frequent day traders and those who traded rarely, and that more frequent trading activity decreases the chance of profitability.

These studies show the wide variance of the available data on day trading profitability. One thing that seems clear from the research is that most day traders lose money .

Millionaire Media 66 W Flagler St. Ste. 900 Miami, FL 33130 United States (888) 878-3621 This is for information purposes only as Millionaire Media LLC nor Timothy Sykes is registered as a securities broker-dealer or an investment adviser. No information herein is intended as securities brokerage, investment, tax, accounting or legal advice, as an offer or solicitation of an offer to sell or buy, or as an endorsement, recommendation or sponsorship of any company, security or fund. Millionaire Media LLC and Timothy Sykes cannot and does not assess, verify or guarantee the adequacy, accuracy or completeness of any information, the suitability or profitability of any particular investment, or the potential value of any investment or informational source. The reader bears responsibility for his/her own investment research and decisions, should seek the advice of a qualified securities professional before making any investment, and investigate and fully understand any and all risks before investing. Millionaire Media LLC and Timothy Sykes in no way warrants the solvency, financial condition, or investment advisability of any of the securities mentioned in communications or websites. In addition, Millionaire Media LLC and Timothy Sykes accepts no liability whatsoever for any direct or consequential loss arising from any use of this information. This information is not intended to be used as the sole basis of any investment decision, nor should it be construed as advice designed to meet the investment needs of any particular investor. Past performance is not necessarily indicative of future returns.

Citations for Disclaimer

Barber, Brad M. and Odean, Terrance, Trading is Hazardous to Your Wealth: The Common Stock Investment Performance of Individual Investors. Available at SSRN: “Day Trading for a Living?”

Barber, Brad M. and Lee, Yi-Tsung and Liu, Yu-Jane and Odean, Terrance and Zhang, Ke, Learning Fast or Slow? (May 28, 2019). Forthcoming: Review of Asset Pricing Studies, Available at SSRN: “https://ssrn.com/abstract=2535636”

Chague, Fernando and De-Losso, Rodrigo and Giovannetti, Bruno, Day Trading for a Living? (June 11, 2020). Available at SSRN: “https://ssrn.com/abstract=3423101”