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
  • 11.5k
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,332
9 votes
Accepted

What is an acceptable Sharpe Ratio for a prop desk?

A Sharpe ratio of at least 1 in backtesting is a promising start, but that is just one of many statistics of interest. The Sharpe ratio measures return per unit volatility, i.e., return per unit risk....
mpeac's user avatar
  • 415
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,231
8 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,359
8 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,368
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.7k
7 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,500
7 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,368
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
Accepted

R Backtesters: Quantstrat vs SIT

While I've never used SIT, I have used quantstrat quite a bit and can attest to its strength. It has a solid developer community backing it (7 contributors on Github), is part of the TradeAnalytics ...
Jacob Amos's user avatar
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.3k
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,062
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
  • 10.9k
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,186
6 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,841
5 votes
Accepted

Why the diff of signal is called positions and what does it mean in backtesting?

My understanding, in that context, is that signal indicates that you want to hold a share (signal is 1) or hold no shares (signal is zero). Therefore taking the diff will tell you if you want to buy (...
Kiwiakos's user avatar
  • 4,307
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,872
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,359
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,396
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,368
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,062
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

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