Skip to main content
19 votes
Accepted

Backtesting Market Making Strategy or Microstructure Strategy

This is a very difficult question. First of all you should read Almgren's slides on the topic: Using a Simulator to Develop Execution Algorithms. First you need to backtest your strategy against a "...
lehalle's user avatar
  • 12.1k
15 votes

Doing opposite of what the model says

If you do this, you would destroy the value of the statistical tests that you performed on the backtest. You had a hypothesis that the strategy would make money, but the hypothesis was rejected. You ...
Alex C's user avatar
  • 9,372
9 votes

Why do institutions backtest?

Mostly because of convention and tradition. As Student T mentioned earlier, part of this is that it is common practice. You report to your clients or managers how well something performed in the past; ...
madilyn's user avatar
  • 5,240
9 votes
Accepted

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

I will be glad to help, but let me first advise you away from working on this topic until you have an academic position. This topic has been poison for me, but I am slogging on anyways. Before you ...
Dave Harris's user avatar
  • 4,299
9 votes
Accepted

Backtesting using microstructure (orderbook) data

Since order book granularity backtesting is challenging, as you've pointed out, I recommend first deciding your business requirements: Can you rely on a third party execution desk? I do not recommend ...
databento's user avatar
  • 2,488
8 votes

why does Cross Validation *not* solve Backtest overfitting?

If they publish information about all K trials, then you're right. But the author's point is that that's not typical practice. Typical practice is to not disclose that information, and it amounts to p-...
Jase's user avatar
  • 1,510
8 votes

Alternatives to RDBMS for options backtesting

My answer is similar to the one given for this other question. If you are mainly using the data for backtesting, there's very little reason to store the data in a MySQL database. The data generally ...
databento's user avatar
  • 2,488
7 votes
Accepted

Does using adjusted closing prices constitute a lookahead bias?

To elaborate and emphasize a bit on what @Antoine says, using adjusted prices will be reasonable from a returns point of view, with dividends reinvested. That point, dividend reinvestment, is ...
Brian B's user avatar
  • 14.9k
6 votes
Accepted

Why do institutions backtest?

How can a trading strategy that happened to perform well in one sample path be guaranteed to perform as well out of sample? I think you are having it backwards - this is how I do it: Intuition ...
vonjd's user avatar
  • 27.4k
6 votes

Are there any good tools for back testing options strategies?

Providing my 2 cents here, listing 3 free methods below: CBOE's method: No code here, just a "white paper", thus you can code it with whatever language you desire. I kinda like this the ...
pangyuteng's user avatar
6 votes

Trading C++ Libraries

These are the libraries I most prominently use for C++: QuantLib Boost C++ Libraries This is not specifically a library however it is extremely helpful, the Anaconda Compiler Tools. The Armadillo C++...
Theodore's user avatar
  • 1,172
6 votes

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

Interactive Brokers hosted a webinar on Nov. 10 2016 about Implement Algo Trading coded in Python using Interactive Brokers API. The presenter gave a good explanation on the applicability of IBridgePy,...
IBridgePy IBridgePy's user avatar
6 votes

Does QuantConnect use both bid and ask data for backtesting?

QuantConnect uses L1 data (bid and ask quotes) for its US Equities Backtesting. QuantConnect has a full break down of the data library, including free data for download in LEAN format at the data ...
JaredBroad's user avatar
6 votes
Accepted

How to test signifcance of a sharpe ratio

The answer above is not correct. Let's go by parts: Denote the mean of returns $\mu$. Denote the standard deviation of returns: $\sigma$. Therefore the sharpe ratio is: $$ SR = \frac{\mu-r_f}{\sigma} $...
phdstudent's user avatar
  • 8,306
6 votes
Accepted

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

Proper backtesting is difficult, because of various biases that easily slip into the results if you are not careful. For example how do you compute historical P/E's. Well, you have historical E's and ...
nbbo2's user avatar
  • 11.3k
6 votes
Accepted

backtesting guide for research

This was too long for a comment, so I'm writing it as an answer. I have provided some interesting literature that will give you insight into the common pitfalls of backtesting algorithmic trading ...
Pleb's user avatar
  • 4,276
5 votes
Accepted

How to organize historical data including delisted

The problem you describe isn't trivial. Mainly because once you have it solved for all current known cases someone will figure out a way to do something different and mess up your system. Here are ...
drobertson's user avatar
  • 1,882
5 votes

Backtest Results needed to Model Validate my Modern Portfolio Theory model

There is a recent a paper recently using a population test of all CRSP data from 1925-2013 as a test of whether a mean and a variance exist versus they do not exist. It overwhelmingly excluded mean-...
Dave Harris's user avatar
  • 4,299
5 votes

Backtesting Market Making Strategy or Microstructure Strategy

IMO you can't backtest a HFT strategy because you cannot account for your own queue depth, or the API lag of the exchange, and more importantly, you cannot really model informed traders very well, who ...
wildbunny's user avatar
  • 629
5 votes

Survival bias when backtesting

Trying to determine the historical market cap is difficult (especially with mergers/acquisitions/demergers and multiple share classes with different levels of ownership/voting). Another issue with ...
Richard at NorgateData's user avatar
5 votes
Accepted

Backtest overfitting - in-sample vs out-of-sample

It's not out of sample. This is known as the walk-forward backtest and the problem is that you adjust your model based on the PnL curve. You add improvements to reduce drawdowns and increase returns ...
Jacques Joubert's user avatar
5 votes

CAPM and Beta: problem with regression (Beta is too low yet statistically significant?)

You are right to be sceptical of the beta of an international portfolio when it is calculated using daily returns. Beta estimates are often low for international portfolios because stock market ...
Tim Wilding's user avatar
  • 1,406
5 votes
Accepted

Backtesting vs live trading data handling and abstraction

Yes, I recommend making historical backtests and live trading as similar as possible. This leaves you one lesser source of variability when you inevitably see different backtest and live results. Do ...
databento's user avatar
  • 2,488
5 votes

Detrending price series for back testing

Depends on what the goal is. If you want to backtest a priced based signal (e.g. RSI, SMA Crossovers, Bollinger Bands or other technical indicators) then it wouldn’t make much sense to detrend the ...
oronimbus's user avatar
  • 1,896
4 votes

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

I think your best shot is to share with us your 3,000 stocks. How far can that be from FF sample? As a quick check I took the 25 book-to-market portfolios and the Fama-French 3 factor model and run ...
phdstudent's user avatar
  • 8,306
4 votes

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

There are quite a few Quantopian alternative. The most popular are QuantConnect and Quantiacs. Both QuantConnect and Quantiacs offer a server ran platform to implement your algorithm. However they ...
ThereGoesMyMoney's user avatar
4 votes

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

Surprisingly, no one mentioned the need to ensure that the trading strategy can survive different types of market conditions. Suppose that you use @chrisaycock's formula and came up with 5000 trades. ...
Jon Grah's user avatar
  • 259
4 votes

R Backtesters: Quantstrat vs SIT

I've never used QuantStrat, but have used SIT for about two years. Michael's blog provides a great way to learn R, understand SIT, and learn about backtesting strategies. I've never found a mistake in ...
Sid Johnson's user avatar
4 votes

ES not elicitable

I think it was T. Gneiting in 2011 who first proved that ES is not elicitable (Making and Evaluating Point Forecasts, Journal of the American Statistical Association Volume 106, 2011 - Issue 494) , ...
RiskyScientist's user avatar
4 votes

Historical stock borrow fees

If you are talking about borrow rates for general collateral, you can probably just assume you are borrowing at LIBOR. If you are looking at individual names that may have been on special, the most ...
AlRacoon's user avatar
  • 6,532

Only top scored, non community-wiki answers of a minimum length are eligible