Questions tagged [algorithmic-trading]

Algorithmic trading is the process of taking in inputs such as market data, current news, and producing orders without human intervention.

53 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
2answers
712 views

Cointegration and Ratio Pair Trading

I'm having some confusion doing Engle-Granger Cointegration test and then trade the ratio. Methodology: Run an OLS fit for A and B price time series without a constant. Therefore, $\hat{Y} = \gamma \...
5
votes
0answers
339 views

Algorithmic Trading Model Calculation and Stale Data

I'd like ask everyone a more concurrency programming but definitely quant-finance related question. How do you deal with staleness of data in market hours as quote ticks are streaming and your model ...
4
votes
0answers
2k views

Meaning of cross sectional rank

This paper mentions the concept of rank which is defined as cross sectional rank. For e.g. one of the alphas (#3) is (-1 * correlation(rank(open), rank(volume), 10)) 10 is just the number of days ...
4
votes
0answers
370 views

Calculating index arbitrage

I have a days-worth of level 2 market data. I am calculating S&P500 index arbitrage. I have a few questions about the calculation: 1) Should I be summing all the bids and asks from the stocks ...
3
votes
0answers
101 views

Is it possible to match talib's RSI results down to machine precision using just python?

I want to match talib's RSI with just python down to machine precision and I'm struggling. Out of curiosity I also tried a bunch of libraries like tulipy and pandas_ta and the gaps are similar. ...
3
votes
0answers
71 views

Just wondering any algo strategy popular for vanilla bond trading?

I got extensive experience on algo trading for cash equity, FX, so just wondering any algo strategy popular for vanilla bond trading?
3
votes
2answers
386 views

Can one successfully daytrade 0dte options based on RSI?

I've been doing that manually for 2 months successfully (40% ROI) with SPX 0-1 DTE (Days To Expiration) options, both puts and calls. I might be just lucky so I purchased some data to do backtesting ...
3
votes
0answers
78 views

How to monetize ability to predict small stock movements smaller than spread?

For a relatively small subset of stock symbols I have been able to build a model that is able to 20-100 times per day consistently predict whether a stock is going up within the next 2 minutes, being ...
3
votes
0answers
162 views

What is the logic of the eigenvectors of the Johanson cointegration test determining hedge ratios?

Reading Algorithmic Trading: Winning Strategies and Their Rationale, Ernie Chan and there is a short section about the Johanson test for cointegration where it is mentioned that the eigenvectors ...
3
votes
0answers
235 views

Variance swap “fast” models

As far as I understand, Variance Swap (VS for short) function as follows : no payment when entering the contract at maturity the VS buyer pays a strike $K^2$ and is paid (by the VS seller) the ...
3
votes
0answers
347 views

Correlation between idiosyncratic residuals and forward returns

The classic mean-reversion strategy is to calculate an "expected return" (alpha) by computing the raw return for each security and then remove the part which you think is market driven. Statistically ...
2
votes
0answers
39 views

The discontinuity when applying the combinatorial purged cross-validation

In Marcos Lopez de Prado's book, Advances in financial machine learning, he recommends using the combinatorial purged cross-validation(CPCV) for backtesting. His motivation is sensible. Through the ...
2
votes
0answers
45 views

What benefits do using log returns for model training provide?

I came across a paper that uses Support Vector Machines to classify a buy/sell/hold decision each hour at the $\pm$0.5% threshold. The paper can bee seen here. The ...
2
votes
0answers
101 views

Competitive levels in Limit Order Books

I've been doing some research on electronic Limit Order Books (mainly equities) and I was wondering if anyone has seen a paper on how to compute competitive limit order prices. By competitive, I mean ...
2
votes
0answers
102 views

Johansen cointegration Test for spread generation

I'm using the python statsmodels version of the johansen cointegration test and I'm looking for some advice on how best to generate the spread used within a pairs trading algorithm. For example I've ...
2
votes
0answers
76 views

Backtesting :: Migration to Simulated / Real-Time Trading

I am relatively new to backtesting and I want to migrate my system to simulated trading via Amibrokers Interactive Broker's API. What I have been doing is setting trade delays such that when a Buy or ...
2
votes
0answers
162 views

How can one estimate the percentage of trades that are performed using algorithmic trading?

Some studies try to estimate the percentage of trades that are performed using algorithmic trading, e.g. How can one estimate the percentage of trades that are performed using algorithmic trading?
2
votes
0answers
367 views

Trading strategies for increased realized volatility

Suppose once every 2-3 weeks I have a way to select a few equities that are likely to exhibit higher realized volatility in the future month (relative to the past month). Historically, the average ...
2
votes
0answers
266 views

What is the best open source automated trading platform or options?

I would like a custom C++ Automated Trading Platform for Futures like Multicharts, or similar automated trading platform that I can put on my servers so its secure and fast. I have found this so far, ...
2
votes
0answers
153 views

Choosing Optimum Sampling Frequency

There was an interesting post made by Jonathan Kinlay where he discusses the use of a Fourier Transform to discover a potentially optimum bar frequency to choose as an input to a trading system. I am ...
1
vote
0answers
57 views

Forex trailing stops - better alternatives?

I've been pursuing the holy grail of trading, short term FX trading, using machine learning. I've experimented with a ton of strategies but mainly those revolving around holding each trade for a ...
1
vote
0answers
141 views

Market Making constant volatility assumption

I have read a few papers on market making and all(nearly) assume that the stock follows a brownian motion with no drift and constant volatility.These assumptions seems un-intuitive to me because of ...
1
vote
0answers
50 views

Practical approach to get average option IV

Is there a practical method to calculate some sort of average IV for each level of moneyness of equity options? I'm thinking of an algorithm to find mispriced options and do to so, we need to figure ...
1
vote
0answers
51 views

Algorithmic trading strategies for financial derivatives

are there any strategies or considerations specifically designed for the algorithmic trading of financial derivatives, or textbooks that focus on this topic rather than underlying equities and ...
1
vote
1answer
129 views

Does a combined Portfolio always performs like the average of the merged subportfolios?

I analyzed the historic data of the SP500 and tried a trading simulation on it. I picked the best 20 companies from SP500 for one year according to their ROE and put them in one portfolio. Let's call ...
1
vote
0answers
108 views

How do I estimate opening call auction order book for equities?

The opening call auction crossing order book is partially sealed, i.e. only the specialist can see quotes. Is there a stock exchange where this data is available later to simulate the matching ...
1
vote
0answers
77 views

How can I extract market themes using an algorithm?

For example, "Trump tax cut" is a big theme after Trump got elected. How can I extract such themes programmatically, and how can I link the theme to a portfolio that trades on this theme? (long ...
1
vote
0answers
146 views

What new technologies are HFT or sell-side algo firms using along-side or within CEP engines/platforms?

For institutional-level deployment (PTF or sell-side algo market making), what new technologies are firms currently using along-side or within CEP engines/platforms to build and generate signals? ...
1
vote
0answers
217 views

Good state of the art document about Algo Trading systems

I'm currently working on the requirements phase of a software project, and need get an overview of the industry regarding the tools available for Algo Trading. My first idea was to look for Gartner's ...
1
vote
0answers
125 views

How to make the algo decide over a optimal selling point?

Please don't bully if its a basic question.Kinda new to the topic hence experimenting. Problems to construct trading algorithm.For the example I assume I am getting a buy signal from the DMI/ADX ...
1
vote
0answers
73 views

Correct term for position accumulation relative to price?

I've been looking at various accumulation algos and it appears that the greater majority are predicated on building a position largely relative to a time component or market volume for obvious reasons....
1
vote
2answers
711 views

Historical tick data level 1 and level 2

I am a software engineer and want to run some simulation of over historical market data . I am pretty new to finance and trading world. To automate some of my strategies I would like to run some back ...
0
votes
0answers
118 views

How do you formulate trading ideas and strategies?

I have access to some tick data and Bloomberg data. Outside of data mining and hoping to find an economic rationale after the fact, what do you usually do to generate ideas before you look at the ...
0
votes
1answer
64 views

Extract time and sales from the level 2

I need data to test some mathematical models. So far I have the level 2 over 120 layers, but I can't pay for the time and sales. Is it possible to extract the time and sales from the level 2? By ...
0
votes
0answers
16 views

Ratio of mean profit to its standard deviation in algorithmic trading system

I am trying to build a trend following system. Currently, I am backtesting it on historical data. After several thousand operations, the mean profit is positive after commissions, but its standard ...
0
votes
0answers
48 views

API for Real-time and historical Stocks Tick Data

I am looking for a reliable API (e.g. Bloomberg, but available for individuals) where I can get stock tick data up to the minute, both historical and real-time. Obviously I am willing to pay for the ...
0
votes
1answer
98 views

Accurate model but execution in backtesting is losing money

I have a binary classification model that predicts BUY (1) and SELL (-1) with an out of sample F1 score of 71% (precision is 65% and recall is 80%). The model's output is a probability of a BUY label ...
0
votes
0answers
34 views

Charting & Trading platform with 3rd party integration

so it's 2020 and I'm surprised that there don't seem to be any platforms that provide clear and easy integration with a 3rd party backend for indicator/signal generation, charting, trade execution, ...
0
votes
0answers
5 views

Non-binary Strategy evaluation by comparing to a perfect baseline

When building a strategy, how do you evaluate if it is 'good enough'? Some may say 'Well if it has positive return and low drawdown it should be a good indication', and others will add more 'things it ...
0
votes
0answers
45 views

Correct labelling for trading strategies

In trying to build a ML powered trading strategy, one of the most important tasks is to correctly label the data so that the results of whatever classification algo you are using will be properly ...
0
votes
0answers
26 views

How to calculate technical indicator using tick data cross the night?

The tick data shortly before the close in yesterday have different statistics and charasterices compared to the tick data shortly after the open in today. Then, how I calculate the indicators using ...
0
votes
0answers
44 views

Can simultaneous trades happen?

Investigating about matching engines i found that none of them acknowledges the scenario when two identical orders arrive at the exact same time. I get that it is very unlikely for this to happen, ...
0
votes
0answers
24 views

Zipline calendar spanning multiple days

I am trying to back test an algorithm using zipline and need to build a zipline calendar that maps to my brokers opening hours. My broker (FXCM) opens on Sunday at 17:00 and closes on Friday at 16:55. ...
0
votes
0answers
155 views

Algorithmic Trading Competition at MIT

Has anyone participated in MIT trading competition before(traders@mit)? Wondering what type of data are used-tick data or bar data-and are participants connected to a web socket? Are we allowed to ...
0
votes
0answers
72 views

Has anyone _verifiably_ duplicated Yahoo's real time technical market indicators _numbers_? If so, how?

After spending the better part of a week trying to get a combination of Alpaca's API and Python libraries (alpaca_trade_api, pandas and ta) to duplicate the numbers produced by Yahoo! Finance's ...
0
votes
0answers
61 views

2 ways to calculate profits, which both seem legit, but produce different results - what am I missing?

I'm trying to calculate this simple example with 2 ways which both seem legit, and getting different results. Way 1: at the beginning of day $t$, first reset the holdings to 0, then buy the number of ...
0
votes
0answers
44 views

RegNMS, National best bid/offer and Smart Order Routing

I read Flash Boys when it first came out. If memory serves correctly it said US exchanges are required to forward received orders to another exchange if it has better prices, to achieve the best ...
0
votes
0answers
91 views

Calculating basic win% of simple trend-following strategy?

I apologize if this isn't the correct place to post this. I'm not quite sure where else I should post on stackexchange. I'd like to preface this by saying I'm not actually planning on trading. This ...
0
votes
0answers
243 views

Yahoo options chain pricing vs stock broker pricing

I am having hard time understanding the price difference of yahoo option chains. For example: Yahoo shows for TWTR FEB 17, 2017 CALL @16.50 option ...
0
votes
0answers
215 views

Is order flow imbalance more or less correlated with price movements at slower frequency?

Suppose I define order flow imbalance as volume(aggress buy)/volume(aggress sell), or some variant of that. Is this variable more, or less, correlated with price movements when I sample less ...