Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
25

Aside from Zipline, there are a number of algorithmic trading libraries in various stages of development for Python. From the commercial side, RapidQuant looks very interesting though I haven't tried it yet. It's from some of same developers that brought us the excellent Pandas data analysis library. I think Wes McKinney (Pandas's main author) is involved....


15

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 Oanda (legacy accounts), order types, timers and market calendars, update with Python 3.6 and the community and other links updated A (now) very mature (imho) ...


12

You need to differentiate between OTC and listed options in order to appreciate the fact market makers are still active and relevant in either segment: Listed Options: Actually most listed options market making is governed by market making algorithms, however, most such algorithms are implemented with manual overlays. Something very similar goes on in the ...


12

Windham Capital Management is using hidden markov models for their Risk Regime Strategies. Mark Kritzman, who is also CEO, has published an article about the general outline of the strategy (with source code so you can replicate the results!): Regime Shifts: Implications for Dynamic Strategies (corrected August 2012) by M. Kritzman, S. Page, D. Turkington]...


11

After having done a lot of research on the topic I found the following excellent research piece on ETF.com: Wealthfront modifies historic asset-class returns with current market implied expected returns (Black-Litterman) as well as with the in-house views of Chief Investment Officer Burton Malkiel’s team. In addition, Wealthfront sets minimum and ...


11

Here's my favorite example of an intraday strategy on S&P500 futures that at least used to work: Intraday Share Price Volatility and Leveraged ETF Rebalancing I pull it out whenever people start talking about market efficiency. The strategy is very simple: if S&P500 futures are up or down more than 2% on the day with two hours left until close, ...


10

I found this solid overview of different trading algorithms by Deutsche Bank Research: Trade execution algorithms Designed to minimise the price impact of executing trades of large volumes by ‘shredding’ orders into smaller parcels and slowly releasing these into the market. Strategy implementation algorithms Designed to read real-time market data and ...


10

A public order book gives traders information not only on the current price of a security, but also the volume and structure of the entire supply and demand schedule. Such information can be used for arbitrage and market manipulation strategies in various ways: Spoofing: Inserting a large limit order as an apparent buy or sell signal which is canceled any ...


9

Indeed, algorithmic trading is a very hidden subject. All I can help you with are some industry-specific terms which might speed up your search for relevant papers and information: Risk of ruin tables (Peak-to-valley) drawdown (maximum drawdown, duration of drawdown etc.) Number of consecutive losses Confidence intervals Empirical distributions (for risk ...


9

Repeating groups are a way for FIX to represent arrays. A "number of" field prepends the repeating group to alert the recipient how many elements to expect. For example, Arca uses TradingSessionID (tag 336) to identify pre-open (P1), primary (P2), and post-close (P3) market hours. This group is prepended by NoTradingSessions (tag 386). So, I would use the ...


9

I am not sure Dark Pools (DP) have been created to avoid "market manipulation". They have been created by firms because they found an advantage to create them (see Market Microstructure in Practice, L and Laruelle Eds.). The main reasons have been: spare market fees, for DP created by brokers (like UBS MTF); spare market impact, for block pools (like ITG/...


9

First we have to clarify what we mean by profits: I think your question can only address the fact that some human traders beat the market (because you also make profit by just buying the market, e.g. through an ETF). I think there are two, perhaps even three main sources: Randomness, luck (as @PerAlexandersson) correctly pointed out - financial markets are ...


9

Why does algorithmic trading account for a significantly higher percentage of trades in the USA than in Europe or Asia? One of the major reasons for this is the significant fragmentation in the U.S. markets, and in particular the U.S equity markets where I believe Aite Group's data (in your picture) comes from. This doesn't necessarily provide an edge to ...


8

Firstly, you'll probably be directed to consider Zipline. It's worth a look but I don't think that it's a good starting point, since: Quantopian's developers don't have a financial background and it shows through in the Zipline source code. Zipline is dreadfully slow if you compare it to any commercial platform with backtesting functionality in a compiled ...


8

In addition to getting the right transition model for the Kalman filter, the main obstacle to optimizing filter performance is to implement an optimal initialization. I use an iterative approach to initialize or "tune" the Kalman filter, known as adaptive tuning. I do this because I've found alternative methods of initializing the Kalman filter (such as the ...


7

I think you might find this answer in The future language of quant programming? useful. People get this problem wrong because they always end up discussing the theoretical advantages of these languages rather than the practical uses of these languages. Theoretically speaking: Haskell is elegant and has many of the theoretical advantages (language ...


7

Unfortunately, the answer is: it depends. People care about different metrics and visualizations depending on the type of strategy that they are running. It is a very bad idea to spend time creating visualizations without knowing what you are using those visualizations for. A common feature is a 'table-oriented' layout of data about your orders and ...


6

Whether its possible? Absolutely. However, you should probably keep in mind a couple points: * Many people claim a lot while proving very little to none. This is fine if the issue is a small-talk conversation. Believe it or not, no harm done. However, this is about money, and from my experience I cannot stress enough how important it is to do a very ...


6

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 github documentatiion


6

You are right, these work use deterministic control. Framework using stochastic control exist: Bouchard, B., Dang, N.-M., Lehalle, C.-A., 2011. Optimal control of trading algorithms: a general impulse control approach. SIAM J. Financial Mathematics 2 (1), 404-438. URL http://epubs.siam.org/doi/abs/10.1137/090777293?af=R Kharroubi, I., Pham, H., Jun. Optimal ...


6

To be honest you're not likely to get a very satisfying answer to your question. Not because its a bad question, but because "regular people" can't just go hooking their home grown trading systems up to a live market. I'd like to start automating my trading strategies. First off you'll need a system that can interface with your broker. If you're not a ...


6

At the first glance, what you are asking for is a model admitting arbitrage, so there is a zero chance of losing money and positive chance of yielding profits. Well, many equilibrium models start with assuming arbitrage is not possible (otherwise it would be trivial wouldn't it). But, in my opinion, what you actually seek is the Efficient Markets Hypothesis....


6

Such a complex question... Geometric Brownian Motion (GBM) will not typically work to aid one finding strategies based on technicals, as the pursuit of the technical trader is to find market deviations from a random walk. However, some strategies, for example a "take profit/stop loss" strategy can work, (or at a minimum one can change the risk/reward ...


6

As someone who has contributed to literature, I am purposefully vague with the use of mid price. Not that I don't define it but that it is difficult to state which definition is the best in which context. Here are an example of a few definitions of mid price: Last Trade: The physical price at which the most recent trade physically took place. This is ...


5

Each venue will allow diferent order types, and will have different matching rules (the queue positions you mentioned), so this is not general to the whole market, but this is a paper from Nyse that is pretty much explains most of the order types I have heard of: http://www.nyse.com/pdfs/fact_sheet_nyse_orders.pdf Also, one factsheet/regulation from the ...


5

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, which is a Python package used to connect to Interactive Brokers C++ API for execution of python codes in live markets. The webinar was recorded so that you ...


5

Obviously merging two streams is harmless and it should be done. But it's hard to advise you regarding the "interpolation" methods you can use to generate the ticks without knowing why you need this. The reason is that any method will introduce a certain bias to the data. Therefore, it very much depends on what are you going to do with your altered data on ...


5

If you're missing ticks, then no technique will get those ticks back. If you have two sources, then designate one source as the primary feed and then fill-in gaps from the secondary feed. Of course, you'll have to mind the timestamps when determining whether the secondary feed can be used properly.


5

You will struggle to put a number on the potential returns of high-frequency trading (HFT) and I think it wouldn't make any sense anyway if you don't take into consideration its risk and its leverage. Achieving 100% return with low volatility seems highly improbable; so ask the trader in question his Sharpe ratio to start with and compare it with yours. ...


5

On the request, here are my two cents. Suppose that the price follows the dynamics $$ \begin{cases} \mathbf z_{k+1} &= F(\mathbf z_k,\mathbf i_k,\mathbf w_k), \\ \mathbf i_{k+1} &= G(\mathbf i_k, \mathbf w_k) \end{cases} $$ where $\mathbf z_k$ is a price of a traded assets at the time $k$, $\mathbf i_k$ is the value of parameters of the ...


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