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
6
votes
2answers
913 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 \...
6
votes
0answers
342 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
380 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
149 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
3answers
448 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
81 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
239 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
350 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
49 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
52 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
117 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
138 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
163 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
374 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
276 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
160 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
84 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
144 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 ...
1
vote
0answers
169 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
52 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
57 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
139 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
110 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
78 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
148 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
225 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
74 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
189 views

Implied volatility is returning infinity

I am trying to calculate implied volatility using javascript , I have following code ...
1
vote
2answers
979 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
16 views

How to deal with outliers when normalizing price related input in algorithmic trading

I am training a CNN model for trading using indicator and MA lines to compose a 2D array as input. I want to normalize MA data(ema, sma...) into range between -1 and 1, I have tried several techniques ...
0
votes
0answers
29 views

How to understand the results of the Johansen test?

So I now there are numerous pages on the johansen test, and what the results mean. Though I am confused as to what it is doing exactly. So my understanding is that it will find the spread of 2 ...
0
votes
0answers
101 views

Machine learning algorithms that generate trading models (literature)?

Is there any academic literature on machine learning algorithms that are able to generate functioning trading models? Would this even be feasible at all, now or in the future? Could you point me to ...
0
votes
0answers
40 views

Cumulative returns from ROI of individual trades

I've a series of ROIs: $R(n) = [r_1, r_2, ... r_n]$ generated from taking $n$ trades. Each ROI value is in percent $[0, 1]$. How do I generate cumulative return $C(n)$ from this data? My understanding ...
0
votes
0answers
42 views

Managing fund of bot users

I'm algotrading since 2018 and been profitable (not much, but consistent) since then. This year I thinking in make a business around this bot. My only doubt is how do I manage the fund of all users? ...
0
votes
0answers
39 views

Computing Sharpe ratio correctly when adding more funds

I've a very basic question: Assume, as time $t_0$, I started a algorithmic trading strategy with initial capital $X_0$. My strategy on subsequent $N$ time frames generated returns $r(t_1), r(t_2),..r(...
0
votes
0answers
30 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
60 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
157 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
42 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
51 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
34 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
46 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
79 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
63 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
47 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
93 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
366 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 ...