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 "...
  • 10.7k
18 votes

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

Edit (2016-06-21): Now with live data/trading integration with Interactive Brokers. It has taken a while but it has finally arrived. Edit (2017-09-20): live data/trading includes Visual Chart and ...
  • 618
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 ...
  • 9,167
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....
  • 485
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; ...
  • 5,081
8 votes

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

possible update: http://pmorissette.github.io/bt/ based on http://pmorissette.github.io/ffn/ both were easily installed and somewhat usable for a novice. would love some examples other that ...
  • 191
8 votes
Accepted

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

You can find everything you want to know about this here (and in a very readable and easily reproducible form): How Students Can Backtest Madoff’s Claims by Michael J. Stutzer (2009) From the ...
  • 27k
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 ...
  • 4,123
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 ...
  • 14.5k
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-...
  • 1,490
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 ...
  • 1,820
6 votes

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

There is a module called visualize-wealth that provides: Documentation auto-generation capability with sphinx Portfolio construction methodologies in 3 ways (trade ...
6 votes
Accepted

How to find optimal look back in quant trading models

I think you are having it backwards: Optimising your lookback period is a sure recipe for disaster because it introduces data snooping bias. To develop a robust trading strategy you have to check ...
  • 27k
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 ...
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 ...
  • 27k
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 ...
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} $...
  • 6,923
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 ...
  • 9,647
5 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,...
5 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 ...
5 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++...
  • 1,142
5 votes

Backtesting with fundamentals

Quantopian provides both the fundamental data (from Morningstar), as well as the backtest platform to reproduce results from the books you mentioned. Here's the introduction to our fundamentals ...
  • 326
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 (...
  • 4,247
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 ...
  • 1,807
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 ...
  • 607
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 ...
  • 1,252
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 ...
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 ...
  • 1,356
5 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 ...
  • 3,903
5 votes

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 ...
  • 1,820

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