I am looking to test out day trading strategies. Most strategies I am interested in require to hold onto the stock for a week or more.

Instead of using a paper stock trading platform and having to wait the amount of time it takes to get an outcome of the position, I am interested in ways I can use historical stock data to test a certain position on past observations, then fast-forward to see how well they performed.

What are common techniques for doing this?

  • 5
    Day trading means that you intend to buy stocks at some time during the day and sell them before market close. If you intend to hold stocks for a week or more that is not day trading. – Victor Oct 14 '18 at 22:17

What you will need will depend on the complexity of the strategy that you want to test.

If you have basic parameters like moving average crossover systems, you can download historical data and create your own testing in Excel.

If you are using 'canned indicators' such as RSI, Stochastics, etc. then there are lots of web sites that offer data and graphs.

There are many software programs that also do this. They allow various amounts of inputs.

If you are into complex trading strategies, you might take a look at Ninja Trader, TradeStation, etc. ThinkOrSwim (TDAmeritrade) has a paper trader which lets you pick a date in the past and then forward test your strategy in historical real time (you advance day by day).

  • ThinkOrSwim is exactly what I was after. I asked more specifically for something like ThinkOrSwim but it was closed as off-topic because I asked for a recommendation of a service. Thanks! – ParoX Oct 14 '18 at 19:46

Let's start with - the obvious. You need to get your basics straight.

I am looking to test out day trading strategies. Most strategies I am interested in require to hold onto the stock for a week or more.

You want a vegetarian steak? Because either something is DAY trading, or it is not. And DAY trading is not "holding stock for a week or more". This sentence makes NO sense except assuming you talk of 2 sets of strategies here, in which case it makes still no sense because the second sentence provides zero relevant information, so why do you even raise them? This is important - because day trading has a: limitations in the USA (otherwise you are not allowed to day trade) and b: often uses specialized brokers (which allow a lot of fancy features and have a LOT lower prices than other brokers).


What are common techniques for doing this?

It is called a "Backtest" and it is EXTREMELY common - so common you will have had to be extremely limited in your experience to NOT have used a platform at times or read marketing material from your broker at times trying to sell you access to a backtest platform. This is like saying "I drive cars for 40 years, what the heck is a navigation system, I never heard of them". And yes, this stuff is really that common.

Basically, unless you live in a world with a VERY Limited broker access, you can connect to it with other platforms and there are a LOT of them that (a) facilitate automatic tests (i.e trading strategies) and (b) allow automated testing of said strategies with provided historical data, or (in case of Ninja Trader, i.e.) allow you to play forward old data for manual trading. I particularly like that NInja Trader feature (not that I like Ninja Trader a lot) because for some things it is really nice to "pretend" to have life data. Training, i.e. (training the basics of trading, demonstrating what a stop is etc.) - stuff you can not wait for a market "to behave".

This is SO common that companies make money selling it. Among them:

  • Ninja Trader
  • MultiCharts
  • TradeStation
  • MetaTrader, though that is used more in Forex and offered by many brokers

To name just a few. If you ever read any site, or click and advertising - google has likely tried to drawn you in advertisings for them.

Now, there are limits and this is a wide field. A word of warning - this is not as easy as it sounds, it goes a lot into the direction of snake oil FOR MOST PEOPLE. I.e. it is not a magic wand you install and a month later you are rich. You CAN make good money with this, but you first need to learn proper trading and be VERY aware of the possible pitfalls, of which there are many. There are whole books written about them, so no, this is too broad a field for this. Let's just say that if you can not make money without backtesting, you likely can not make money with it either. Like anything day trading related, you leave the "I have a job" area fast and this turns into your job. And sadly for many people making money is totally optional in this job. Which means it never happens.

Oh, and you will need some historical data for testing, obviously.


There are many ways of doing this, which depend on your level of skill and which tools you use.

Simplest answer is to download historical returns and then compute the portfolio returns you would have gotten if you had used your strategy. Based on your question I guess you have no experience with this so let's assume you are not familiar with the tools either.

In something like excel you would have a column with the returns and a column next to it with your position (1 for invested, 0 for out, -1 for short selling and anything in between). Be sure each position can be computed based only on information before the period you are looking at.

When you have a column of returns and a column of weights/positions, multiply the two. That will be your trading strategy return.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.