12

Sniffing (or stalking) algo indeed detects other algorithms. How does that work in practice? Imagine the order book for a particular equity is: Bid 1 = 99 (size 10,000), Bid 2 = 98 (size 25,000), Bid 3 = 97 (size 30,000), Offer 1 = 101 (size 10,000), Offer 2 = 102 (size 25,000), Offer 3 = 103 (size 30,000). So in the example above, the bids and offers are ...


11

Is there a typical "half-life" of a strategy? This is a really subjective question, and I don't think any singular answer will generalize well. That being said, I will give some examples from personal experience. I have made hundreds of trading models in my career. I have only deployed 9 into live trading in the last ~25 years. Of those 9, 2 of ...


6

Take a look at compilations such as 151 Trading Strategies. I wouldn't expect this information to be widely disclosed. After all, a non-profitable strategy is a supermartingale which means there is an opposing set of algos that is profitable as we speak. Secondly, many strategies are conditional upon a market regime, and could become profitable should the ...


5

I hope I understood you correctly and that the following thoughts help you a bit. Reference point: Univariate curve fitting using splines With a univariate function $f(x)$ you can perform 1D spline interpolation and require for each (inner) $x_i$-node that: $$ \begin{align} \left.f_{i-1}(x)\right|_{x=x_i}&=\left.f_i(x)\right|_{x=x_i} \quad \mathrm{...


5

6 months is a reasonable estimate. Typically such strategies do not decay as in half-time but rather stop working in a discrete manner. Parameter tweaking can help, but for a limited period of time. To add to your list which is valid in itself: Infrastructure changes at the trading venue, in particular latency-related changes Market-making program changes ...


5

I'm assuming that the paper you're referring to uses the Engle-Granger test for cointegration. The standard test procedure checks for unit roots in the residuals of a linear regression. It is a "stylized fact" to econometricians, who tend to be the ones publishing papers on pairs trading, that log prices better linearize the features and hence ...


4

Markets might be nonrandom but retail traders losing money on average is insufficient evidence of this. Most folks lose money playing roulette despite the outcome being random. As noob2 suggests in the comments, the parties enabling the betting earn money from the betters in some way transforming there low expectation gains into losses. In casinos money is ...


3

Maybe this is too simple, but here’s what I think of when you ask for option strategies given a view on forecasted price densities: -Think returns are going to be higher than expected? Buy a call. -Think returns are going to be lower than expected? Buy a put -Think scale is going to be higher than than expected? Long straddle or long strangle. -Think scale ...


3

This is a common problem (with backtesting in general); and one that is easy to lazily generalise; but difficult to pin down in a more forensic manner. Beating buy-and-hold isn't a definitive test of whether your strategy is "good" or "bad"; but it does offer an intuitive and consistent alternative to measure it against. Measuring the ...


3

First of all, Sharpe Ratio (SR) is meant to assess the uncertainty surrounding the expected returns of your PnL. In short: you divide by the standard deviation of the returns because you trust less a time series of PnL with a large standard deviation than with a small one. Nevertheless it is in fact not the best indicator; the best one is the t-test, that ...


3

There is more than one way to approach this. Given your comment that this is a small strategy in a larger account, I assume that you are testing it and, if it bears enough fruit, you may want to scale it up. You should assume some starting value. I'm going to assume a number that's equal to your initial nominal value (as you requested in your comment). ...


3

I recommend @chrisaycock's answer for completeness. However if you want a quick and dirty way of extracting the payload, you'd use tshark instead of tcpdump: tshark -r NYSE_XDP_IMB_2.2.pcap -T fields -e data This can be useful sometimes because many exchanges (NASDAQ, Australia and SIX Swiss come to mind) typically send you historical samples with only the ...


3

This is for better linearity/normality in the QQ plot at the tails, which as both @noob2 and @rkr allude to, give a better fit and hence better properties for normalizing the residuals with z-scoring later on.


2

I've created an example for how to access UDP packets in a pcap file. The gist is that you have to skip the Ethernet / IP / UDP headers to reach the payload. That's what gets passed to your feed handler. As for tcpdump, it won't pass the payload to you, but it's still helpful for verifying that you understand the contents when parsing. Eg., tcpdump -r ...


2

Yes, this is absolutely possible. Here is a simple thought experiment to show how. We want to benchmark to the S&P 500. We allocate 90% of our capital to an index tracking strategy and 10% to some new portfolio manager with a good track record. (We'll call the new PM "Rumplestiltskin," for ease of reference.) Unfortunately, there is a bug in ...


2

You are right: the "factors" stemming from the literature of CAPM anomalies and the "components" of PCA are not of the same nature as you underlined: factors are meant to have an economic sense (even if you have a factor like "betting against the beta", that are not that clear and have more a behavioral interpretation). whereas ...


2

What you are looking for are order book statistics, which stand on their own compared to technical indicators because they can be calculated down to specific depths of the LOB (limit order book). Several measures have been introduced based on intraday variables and flows (first derivatives of order book variables and statistics) that deal with volume ...


2

As people in the comments noted, signal broadly refers to a trigger variable that denotes an investment decision. This is normally a boolean variable (i.e. 0 or 1) but could be continuous (0 to 1) or any other range (e.g. -1/0/1 sell/hold/buy), depending on what your execution algo might dictate. Just wanted to add that this terminology comes from the ...


2

From Daniel-Moskowitz ("Momentum Crashes") you can see that equity CSMOM has negative skewness. However, this is less clear for other asset classes. From their table 11 you can see that commodity momentum has essentially zero skewness (they report a mildly positive skewness). Also e.g. this paper (Menkhoff, L., Sarno, L., Schmeling, M. and Schrimpf,...


2

Most institutional brokers, and certainly prime brokers, offer a range of automated execution strategies. You can check out the list of algos supported by IB to get started. The basic algos split large orders into smaller orders with randomized quantities executed at random intervals to reduce the impact and to avoid detection. Also keep in mind that iceberg,...


2

If you have access to intraday data, they are better ways to estimate the bid-ask spread. If you have Open, High, Low and Close price on each 5min bin $b$ (or any other interval): the Close of the previous bin and the Open of this one are consecutive. Hence $dP(b)=C(b-1)-O(b)$ allows to define an estimate $\psi(b)$ of the bid-ask spread $$\psi(b):=\min_{b:\, ...


2

If you are asking these kinds of questions, it is very unlikely you will be able to successfully train any kind of ML or AI model on stock data with your current level of skill. In fact, each of the questions you ask usually involves weeks, months and -- in some cases -- years of experimentation to discover the right mix of potential features. In ...


2

A more appropriate approach is to sum your PNL each day across all of your positions and calculate the return for the book as a whole (assuming I understand your question correctly). Return should be based on your bankroll/AUM/capital allocation, not your notional positions.


2

This might not be a direct response, but just some general advise / ideas. I think giving you "optimal" parameters is not a straight realistic response. It depends on the security you are analizing. For instance, what you can do is grab a set of historical years, run multiple simulations on different parameters, and check which ones provide you the ...


2

If retail traders made one 50:50 bet and then cashed out (or didn't), sure. One of the reasons companies are made to put those warnings on spread betting and similar things is that it appeals to a lot of gambling impulses, so for many it is just another way to gamble. Unfortunately people who lose are the ones who are most likely to quit, so this is much ...


2

This seems like a terrible idea. If you can have such an automated system for one stock, you can have it for many stocks. Then, since you're a serious investor, you want to take into account the commonalities and relations between stocks. At the very least, this will allow you to do perform hedging and exploit commonalities between similar stocks. In this ...


2

I sent Ernie an email with a link to this question and here is his response: Yes, I agree with you that the strategy there actually is a momentum strategy, not a mean reversion strategy. In other words, if zScore < 0, we actually expect $\gamma$ to decrease further! The momentum strategy backtested is profitable. I will note this in the 2nd edition of ...


1

There have been several publicly available stories on the use of alternative data in investment management, including the use of location data by hedge funds. Here is one pointer: https://www.bloomberg.com/news/articles/2017-12-16/satellites-are-reshaping-how-traders-track-earthly-commodities.


1

Fix the RNG (random number generator)'s seed. This article from sharpsightlabs.com is accessible and illuminating.


1

The strategy doesn't look promising to me. It looks 'good' in the first half period simply because it avoided the .com-bubble and GFC. Whether it is worthless depends on whether the strategy can be improved. You could look into the trades in more details to find out why 2002-2007 is profitable while 2013-2020 is not. It is not necessary for a good strategy ...


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