Skip to main content

Questions tagged [backtesting]

The process of evaluating a strategy, theory, or model by applying it to historical data.

Filter by
Sorted by
Tagged with
50 votes
4 answers
8k views

How much data is needed to validate a short-horizon trading strategy?

Suppose one has an idea for a short-horizon trading strategy, which we will define as having an average holding period of under 1 week and a required latency between signal calculation and execution ...
Tal Fishman's user avatar
  • 13.5k
47 votes
5 answers
4k views

What are the key risks to the quantitative strategy development process?

Prompted in part by this question on data snooping, I would be interested to know: What are the key risks that should be considered when developing a quantitative strategy based on: (a) historical ...
Shane's user avatar
  • 9,245
47 votes
14 answers
35k views

Except Zipline, are there any other Pythonic algorithmic trading library I can choose?

Except Zipline, are there any other Pythonic algorithmic trading library I can choose? Especially, for backtesting? Update: Since Quantopian closed, there are some Zipline forks like: https://pypi....
Terence Ng's user avatar
47 votes
13 answers
80k views

Are there any good tools for back testing options strategies?

There are all kinds of tools for backtesting linear instruments (like stocks or stock indices). It is a completely different story when it comes to option strategies. Most of the tools used are ...
vonjd's user avatar
  • 27.5k
43 votes
8 answers
11k views

What broker/feed/APIsetup allows for recording the most accurate data (cheaply)?

I'm currently using IB's Java API and getting feeds through them. However the real-time feed is updated only every 250ms and the historical feed only every second. I'm primarily looking for ES data ...
36 votes
6 answers
6k views

What are the popular methodologies to minimize data snooping?

Are there common procedures prior or posterior backtesting to ensure that a quantitative trading strategy has real predictive power and is not just one of the thing that has worked in the past by pure ...
Zarbouzou's user avatar
  • 2,293
28 votes
8 answers
6k views

How to design a custom equity backtester? [closed]

I was thinking about writing my own backtester and I realize I have to make some assumptions. So I was hoping I could post what I am planning on doing and hopefully some of you can give me some ideas ...
user667's user avatar
  • 381
27 votes
3 answers
5k views

Main backtesting & trading solutions: QuantFactory, Deltix, etc.

What are the most used/mature/promising commercial solutions today which handle backtesting/ automated trading needs? I'm talking about vertical product suites like QuantFactory or Deltix which ...
Romain Verdier's user avatar
26 votes
3 answers
8k views

Papers about backtesting option trading strategies

I am looking for all kinds of research concerning option trading strategies. With that I mean papers that publish results on different option trading strategies properly backtested with real-world ...
vonjd's user avatar
  • 27.5k
20 votes
4 answers
5k views

Evaluating automated trading strategies: accepted practice

Both for private projects, and for clients, I've been working on code a lot this year to evaluate automated trading strategies. This often ends up turning into the task of how to fairly compare apples ...
Darren Cook's user avatar
  • 1,427
19 votes
2 answers
3k views

How to build a regime-switching model which knows its own limits?

In recent months I've come to the conclusion that there are not only certain regimes in the markets (like bear or bull) but phases where all models fail because we are in uncharted territory. The ...
vonjd's user avatar
  • 27.5k
18 votes
1 answer
2k views

Testing Valuation, Size and Momentum (proprietary factors) from 1988-2013: No evidence of driving cross-sectional returns

I am currently testing whether three proprietary factors - Valuation, Size and Momentum - explain cross-sectional returns. A sample of 3000 securities was tested using Fama-MacBeth two-pass ...
Mayou's user avatar
  • 662
17 votes
4 answers
4k views

What is the ideal ratio of in-sample length to out-of-sample length?

Suppose you are running a portfolio of quantitative strategies and that you develop a new potential strategy to be added to the mix. Assume for simplicity that the new strategy is independent of the ...
Tal Fishman's user avatar
  • 13.5k
17 votes
4 answers
5k views

How to generate synthetic FX data for backtesting?

I want to generate synthetic forex data for the purpose of backtesting my trading algorithms. I have some rough ideas in mind on how to do this: Start with a curve representing a trend, then randomly ...
JeremyKun's user avatar
  • 271
16 votes
3 answers
6k views

Backtesting Market Making Strategy or Microstructure Strategy

How does one backtest either a market making strategy or microstructure-based strategy? I'd imagine that one way would be to record order book states over time and then insert the orders, but it seems ...
Kch's user avatar
  • 981
16 votes
3 answers
3k views

How to account for transaction costs in a simulated market environment?

I am simulating a market for my trading system. I have no ask-bid prices in my dataset and use adjusted close for both buy and sell price. To account for this I plan to use a relative transaction cost....
Stian's user avatar
  • 265
16 votes
1 answer
599 views

Comparing backtesting returns with real trading returns

I have 10 years of backtested simulated performance of some trading strategy (using historical prices), and N months of actual trading performance. What statistical test can I do find out if I'm on ...
Nestor's user avatar
  • 371
15 votes
4 answers
15k views

Trading C++ Libraries

Are there any free c++ libraries that would have some of the functions that would be used in developing a trading strategy. For instance, calculating drawdown, Volatility Forecasting, MAE, MFE....etc. ...
sharpeRatio's user avatar
15 votes
3 answers
8k views

How to simulate slippage

I'm backtesting a trading strategy, using free OHLC data from yahoo or google. I'm simulating friction by lopping a flat percentage (say 0.5%) off my returns for each day that I make a trade. Whats ...
Zach's user avatar
  • 1,381
15 votes
3 answers
2k views

What benchmark/index to use for backtesting a portfolio of stock options?

What benchmark should I use for backtesting a model for when I should buy an option of a particular stock? For equities, one could say their portfolio outperformed the S&P 500. I would like to ...
eWizardII's user avatar
  • 253
14 votes
3 answers
2k views

Literature on generating synthetic time series for testing

I have some market data (daily time series) for bond prices and CDS indices and I would like to generate synthetic versions of these which are statistically "similar" for testing trading strategies. ...
mathman's user avatar
  • 241
14 votes
0 answers
386 views

Here is an approach for measuring Data Snooping; is it new?

I came up with an approach for measuring data snooping, or overfitting. My question is whether this approach was published and expanded-on already, or is it new? My approach relies on the observation ...
greg's user avatar
  • 300
13 votes
4 answers
1k views

What are the risk factors in analysing strategies?

What do you think of strategies displayed on timelyportfolio.blogspot.com? I really like the fact that there is some code to reproduce the strategies, but they seem very elementary because he does ...
nicolas's user avatar
  • 759
13 votes
1 answer
1k views

What mathematical models did Harry Markopolos run to prove that Bernie Madoff 1% a month gain was a Ponzi scheme?

http://www.cbsnews.com/news/the-man-who-figured-out-madoffs-scheme-27-02-2009/ Asked how long it took him to figure out something was wrong, Markopolos said, "It took me five minutes to know that ...
curious's user avatar
  • 1,037
12 votes
4 answers
464 views

Seeking Historical Non-Finance Datapoints for Backtesting

I'm working on some financial analysis code which I'd like to test against a historical dataseries to analyze the correlations to my algorithm to some non-finance related data. Ideally, I'd like to ...
Dave's user avatar
  • 221
12 votes
5 answers
4k views

How to properly evaluate backtest returns?

Do you evaluate a strategy in a backtest based on the cumulative returns generated by the strategy (i.e. looking at the cumulative returns of the trades that occur) or do you start with a certain ...
silencer's user avatar
  • 1,553
12 votes
5 answers
2k views

How to conduct Monte Carlo simulations to test validity of Black Scholes for a specific option?

In reference to the original Black Scholes model, what approach is best to test the model in a rigorous way? Is there a standard approach that can accomplish this in a reasonable amount of time? ...
user avatar
12 votes
4 answers
497 views

How to account for market movement when some exchanges are closed?

Daily data, such as open and close prices, is often available for much longer periods than high-frequency data. However, whenever backtesting any strategy that examines instruments traded in different ...
Tal Fishman's user avatar
  • 13.5k
12 votes
1 answer
732 views

What tools and libraries may be used to model limit/stop systematic trading?

A lot of the tools/libraries out there seem to focus on close to close time series analysis. This is all fine but I typically do not trade close to close, I will use limit or stop orders that may or ...
dizzy's user avatar
  • 571
11 votes
2 answers
5k views

R Backtesters: Quantstrat vs SIT

I am learning R, and want to start using a backtester. I have spent about a day reading all I can about R backtesters, and it seems there are 2 main contenders: quantstrat, which uses the packages ...
Adam Crypt's user avatar
11 votes
3 answers
4k views

What is an effective way of backtesting VWAP execution?

From Optimal Trading Strategies : There are two main reasons why traders execute orders using a VWAP trading strategy. First, a VWAP strategy is the trading strategy that minimizes market ...
ali_bahoo's user avatar
  • 1,149
11 votes
1 answer
616 views

What to ask for in a good prototyping framework?

Reading up on quantitative methods, model development, and back-testing, one obvious question springs to mind: What should one ask of a prototyping (model testing) framework? I know a lot of people ...
Martin Kristiansen's user avatar
10 votes
2 answers
1k views

Suppose that we are wrong about the relevant class of distributions for financial economics and econometrics. Now what?

I read a very interesting paper by Harris (2017) where he points out some interesting link between market microstructure and the distribution of returns on equity. You can make a good case that the ...
Stéphane's user avatar
  • 2,486
10 votes
1 answer
738 views

Any research paper on stop loss?

Has there been any rigorous study on stop loss ? When to apply it? Has it been shown to work through proper statistical backtests? I am interested in Equities, preferably European stocks.
Siddharth's user avatar
  • 101
10 votes
2 answers
10k views

t-statistics for the mean return, using Newey-West standard errors

I have seen that in several papers, where the aim was to evaluate the performance of a certain investment strategy, they use t-statistics to test for significance in the results. However, this seems a ...
Good Guy Mike's user avatar
10 votes
2 answers
3k views

How to calculate the most realistic historical option prices with additional publicly available parameters

This is a follow up question of this one. My aim is to create the most realistic historical option prices possible with publicly available data. I want to do this for backtesting purposes. The ...
vonjd's user avatar
  • 27.5k
10 votes
0 answers
447 views

What is the most convenient data structure for backtesting a model of futures options prices?

I have an empirical model for the dynamics of futures prices in a particular market that I have implemented using a long series of the front five contracts. (I account for the roll in my model.) I ...
Drew's user avatar
  • 405
9 votes
5 answers
2k views

What are the advantages of switching platforms/languages between strategy development and implementation?

I am interested in coding a medium frequency (trading over minutes to hours, holding for days to weeks) quantitative trading strategy and trading it with Interactive Brokers. I have seen many people ...
Tal Fishman's user avatar
  • 13.5k
9 votes
3 answers
9k views

How to compute the alpha decay of a strategy?

How can one compute the alpha decay of a systematic trading strategy?
Belmont's user avatar
  • 411
9 votes
2 answers
10k views

Getting ETF data from google finance

I hope this is on-topic. I want to set-up a set of investment rules and back-test it on a mix of asset-classes. Thus I thought that using ETFs for the back-test would be a good idea (time series could ...
Richi Wa's user avatar
  • 13.7k
9 votes
2 answers
2k views

How to vet an intraday strategy

I am working on an intraday strategy using 5/10 minute bars. I am getting a decent return and sharpe on the strategy. But on close examination I see that I am making about 1 cent per trade (I haven't ...
silencer's user avatar
  • 1,553
9 votes
0 answers
4k views

VaR model Unconditional Coverage Tests: Is this extension of Kupiec POF test correct?

Background: Kupiec P. in 1995, published paper "Techniques for Verifying the Accuracy of Risk Management Models" on Journal of Derivatives, v3, P73-84, it's a Unconditional Coverage Tests designe for ...
athos's user avatar
  • 2,231
8 votes
4 answers
5k views

How should I include the bid-ask spread as a transaction cost in a backtest?

I have two backtesting algorithms: One that uses bid and ask prices for signal generation. For example: Buy when $ask < threshold_1 $ and sell when $bid > threshold_2$. Bid and ask prices are ...
Victor's user avatar
  • 1,210
8 votes
2 answers
821 views

Why do institutions backtest?

I see that institutions still use backtesting by computing P&Ls over historical data and then compute some aggregating ratios to see whether a trading strategy is good or not even though it is not ...
BS.'s user avatar
  • 165
8 votes
3 answers
6k views

What is an acceptable Sharpe Ratio for a prop desk?

What should be the value of a Sharpe Ratio for an intraday quantitative strategy to be accepted by a bank or hedge fund's prop desk? Let's assume the returns are daily changes in account equity, close ...
Sergey Bushmanov's user avatar
8 votes
4 answers
3k views

Backtesting using microstructure (orderbook) data

I would like to use tick data (especially order book data; but also trade) to backtest my strategies, can anyone offer a recommendation? Personally, I've written my own backtesting scripts couple of ...
matt's user avatar
  • 208
8 votes
3 answers
2k views

What latency should I use for backtesting a high-frequency strategy?

We're developing an HFT strategy for highly liquid futures traded at Eurex. We are planning to colocate our server and to use data feed of QuantHouse and execution API of ObjectTrading. Backtesting is ...
l.m's user avatar
  • 81
8 votes
1 answer
939 views

Are shorter holding period strategies better?

Consider two statistically identical strategies (identical information ratios, sample size, ratio of transaction costs to total profit, etc.) except that one has a much shorter average holding period. ...
Tal Fishman's user avatar
  • 13.5k
8 votes
1 answer
777 views

What are the ensemble techniques to forecast returns?

It was pointed in an other question that ensemble methods can help to reduce curve fitting. What are your experience with these and which one seems the most appropriate? If I had two forecasters that ...
Zarbouzou's user avatar
  • 2,293
8 votes
1 answer
417 views

Why is it wrong to rank stocks by P/E ratio, sell the top quartile, and buy the bottom quartile?

I am reading Advances in Financial Machine Learning by Marcos López de Prado. In chapter 11 The Dangers of Backtesting, exercise 11.5 asks: We download P/E ratios from Bloomberg, rank stocks every ...
Flux's user avatar
  • 531

1
2 3 4 5
8