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
7k 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.3k
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,175
46 votes
13 answers
77k 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.2k
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 ...
28 votes
8 answers
5k 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
6 votes
5 answers
7k views

Writing an Options Strategy Backtester

I've been doing some digging, and this question has been asked many times in various forms over the years - Backtesting Options Strategies in R Are there any good tools for backtesting options ...
user avatar
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
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.3k
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.2k
8 votes
3 answers
8k 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
  • 401
5 votes
2 answers
570 views

ES not elicitable

Expected Shortfall is not elicitable as some papers have pointed out. That simply means that there is no scoring function that elicits ES. My question is, does this imply that Expected Shortfall ...
Eren's user avatar
  • 73
3 votes
3 answers
4k views

Handling Missing values in stocks returns when estimating the co variance matrix

What is the best way to handle missing values when stocks did not exist for the entire historical period?.
user3481555's user avatar
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?
Terence Ng's user avatar
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,283
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.2k
26 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
16 votes
3 answers
2k 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
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,371
12 votes
5 answers
3k 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,543
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
7 votes
1 answer
2k views

Backtesting on historical option data

I have downloaded some daily historical option data for a timespan of 10 years and want to perform trading backtests with them. Data are European index options, on ODAX. My question is about realistic ...
user3276418's user avatar
7 votes
4 answers
1k 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
  • 196
5 votes
0 answers
785 views

VaR backtesting with overlapping time intervals

Of course the issue here is dependence: can it be removed or accounted for (in independence tests too, which of course would be troublesome)? There's a lot of literature on regression in this setting, ...
Quartz's user avatar
  • 1,543
5 votes
2 answers
3k views

Backtesting Period

Views on timeframes for backtesting vary considerably. Curious on what timeframe/trade size leads to a statistically significant result. For example, what backtest period is reasonable for a system ...
jason's user avatar
  • 51
4 votes
2 answers
526 views

Back-testing Value at Risk with a WML investment strategy

I'm currently taking a course in Financial Econometrics and there is a question in the lecture notes regarding back-testing of VaR which I'm have difficulty with. First of all the procedure for back-...
LlamaMan's user avatar
3 votes
3 answers
4k views

backtesting options strategies in R

I would like to backtest an options strategy in R. I require the ability to delta hedge and rebalance to options in the portfolio at different frequencies (daily, monthly,etc.) What packages are the ...
Alex's user avatar
  • 153
3 votes
3 answers
7k views

Is there a good backtesting package in R?

My model exports a vector that have for each day b-buy s-sell or h- hold it's look like this: sig [1] b b s s b b b s s b s b s s b s b s s s s b b s s b b b b b b s b b b b b b b I want to ...
alonch7's user avatar
  • 31
2 votes
3 answers
6k views

Is there a python library to generate performance metrics from returns of the strategy?

I am backtesting a strategy and have data generated from the returns of the strategy. Now I need performance metrics like maximum drawdown, Sharpe ratio, Treynor measure etc., I am writing functions ...
Quantum Dreamer's user avatar
1 vote
2 answers
2k views

Extracting continuous futures prices on different dates with the ratio adjustment

I extract continuous prices for a set of futures contracts using Bloomberg. I select the Ratio as adjustment with the Bloomberg default settings. For instance, to extract the first/forward generic ...
WJA's user avatar
  • 217
1 vote
2 answers
575 views

How to test signifcance of a sharpe ratio

Let say you have measured a Sharpe Ratio of $S^*$. What is the simplest way (ie no fancy distributions) to do a hypothesis that this is different from $0$? So $H_0: \text{ The sharpe ratio is equal ...
Trajan's user avatar
  • 2,362
-1 votes
2 answers
2k views

How to get/estimate ask/bid price for backtesting for OHLC data? [closed]

As you know, most of the EOD data available have only OHLC price. I used to do back-testing using the Close price as both bid and ask. however, in real world, the bid and ask spread may be huge and ...
Nok Imchen's user avatar