The best book that I've read on order execution was "Algorithmic Trading and DMA". [0]
The book is kind of old now, but it was written by Barry Johnson, who worked at Morgan Stanley on their algo trading team.
The book is kind of dry, but very thorough and clear on its concepts. It reads more like a university text book than anything else. It just goes through concepts one by one, chapter by chapter.
I have been working my way through a 2013 book, "Professional Automated Trading: Theory and Practice" that uses Lisp as the language to implement a trading system of different frequencies using concepts from artificial life and control theory (I recall studying all of the stuff coming out of the Santa Fe Institute in the late 80's - Artificial Life I, swarm intelligence, etc.). Some of the AI/AL stuff is dated, but the trading knowledge covered and how to build an automated trading platform are great. He covers a lot of ground very concisely and based on solid experience. I love Lisp, so that was also why I gravitated towards this book.
I am currently into the April programming language, Array Programming Reimagined In Lisp[1], and I may try to implement the mathy parts of the book's code in APL and the remainder in Lisp as presented with some improvements. April is very flexible and takes advantage of the libraries and symbolic processing of Lisp. The creator of April just switched it to lazy evaluation from eager evaluation last month.
Ha, yes, Lisp is the strange attractor or gravity well I always flow back into after trying other PLs. Don't get me wrong, I like Zig (to replace my old C ways), SPARK2014 (which has achieved what Rust is evolving towards), and my other loves - J and APL. That is why April was a binary black hole - the joy of Lisp with a REPL, a lot of libraries and legacy, symbolic processing, and the ability to embed diamonds of APL in the parentheses for the mathy parts. I just have plain, old fun when I open up Lisp. Immediate evaluation and hotloading code with a great IDE/editor in emacs/sly. I am learning Xah's Fly keys[1] to bring it all together to satisfy my modal thirst from vim in emacs.
Clojure is a lot of fun too, and opens up a lot of libraries to use. Dragan Rocks[2] has some great libs for ML/DL
Mark Watson is the main culprit for writing his book and having the nerve to publish it: Common LISP Modules: Artificial Intelligence in the Era of Neural Networks and Chaos Theory[3]
I had been superficially studying AI then - GAs, ANNS, chaos and complexity - back in the late 80s, and this book introduced me to Lisp. Mark is sometimes on here, so Mark, thank you!
Not sure why a simple book review has so many upvotes.
A couple years ago I read all I could on this and started systematic trading on crypto. Ended up with the best results on a public platform and ran a small trading operation with a few clients, one a crypto market maker. It's really hard due to all the market unknowns, stress and psychology/emotion. After the FTX debacle I lost ~35% of capital. Currently put it on pause and back software engineering.
Had to rebuild my asset allocation system which was based on FTX api. Improved it to be realtime and using Binance api. There's still the counter party risk-Binance could get busted or USDT fraud.
It probably has so many upvotes because it's quite a novel topic for HN. You might not appreciate it as much, being in the industry, but algorithmic trading is a field most of us haven't explored. Most of the content on HN is focused on web design to be honest, so things outside of that can get quite a lot of traction.
Do you have some recommendations on good books on trading systems? I work in the energy trading world, and in general the systems there are behind the financial world by ~10 years.
Try Trading Systems by Tomasini and Stocks on the move by Clenow, Python for finance. For the code side there's not much ultimately you have to build it yourself and learn.
They were fairly simple, using simple maths or technical indicators, or simple pandas calculations depending on the system. They all generally were based on the momentum behaviour of markets.
The hard part is the backtesting and design of strategies talking into account the science and art of it. And the absolute truth that past performance does not dictate future results.
I haven't tried non-crypto, I think I will just leave that to simple investments in tracker funds or etfs.
I've come across many profitable traders in Crypto who only measure in USD and when you compare their results to just buying and holding ETH/BTC at the start of the cycle they come out behind. Everyone feels like a great trader in a bull market.
I have worked on multiple strategies.
- Strategies using technical indicators do work, but you have to reasonable. If you find these giving higher than expected returns, or too many consecutive wins - take the money. Stop live trading and continue dummy trading - eventually there is a point where you can start live trading again. The thresholds will be determined from backtests.
- Statistical strategies work for swing trading. However, these are very difficult to figure out. Need a lot of data (for backtesting). These work consistently over a longer period and might look loss making over a small period.
- Scalping within 5-10 minutes works pretty consistently, signals based on options data.
- Understand and realise the law of large numbers, and use that to your advantage.
- Give importance to understanding the concept of Time. There is a whole lot of weird and scammy pseudo-science around it. Therefore do not blindly rely on one theory.
I do similar stuff and confirm most of the above. It matches my experiences.
The only other thing I'd say is that if you're in a bull market you may have easy wins. Then after -- when the market turns against you -- these will evaporate.
So long term you have to ask yourself if you are REALLY beating the market. If you'd bought Amazon or Microsoft instead, over 20 years you'd probably be far ahead.
> The only other thing I'd say is that if you're in a bull market you may have easy wins. Then after -- when the market turns against you -- these will evaporate.
If your algotrading profits depend on market being bull or bear, you're doing it wrong. Volatility matters, not the direction.
Please line up with all the other cranky people to tell r/algotrading -- I'm sure they are interested.
Mine work in either market. But I trade on the millisecond lines to avoid market bias. And yes volatility is key. As if confirmation of this approach I see Binance has just recently introduced a 1s chart (effectively 1000ms).
However most retail algo traders using indicators use larger time frames that are more susceptible to market trendiness.
Not to mention more taxes if you are buying and selling a lot. As an individual, I would probably just do discretionary stock picks and buy & hold fundamental analysis. After working at an HFT firm, I've more or less realized that institutional level trading (or things that try to emulate it at the retail level) are pretty difficult for little return. It would be a fun side project, but as a way of getting money, not so sure...
You're way, way better off finding a small outfit of motivated people to join if you want to work in this field.
Success rate for newly formed hedge funds is probably something like 50% over a 5 year horizon. For solo traders, it's probably closer to 1%.
There is WAY too much stuff you need to be on top of, if you want to be successful, than a single person can manage. It's about as feasible as starting a one man (coal) mining operation, where you must dig the tunnel, extract the coal, process it, sell it, manage the business operation and retain your sanity. You need at least a handful of people to be effective, all with different specialties.
...not to mention that if you're successful as a solo trader, you could be making 10x more with proper financial backing. If your strategy is returning 25% annually on a personal 1 mil investment, there's a good chance it'll still be returning >20% on a 10 mil investment (once you get to 100 mil or into the billions, your returns start to diminish due to market impact). Find a good backer, they'll literally give you money and a support team for a piece of the profit.
I've been attempting my own strategies for around four years now, after being inspired by a data mining Master's course I was taking. It has been a long and hard road for me, and I have mostly been trying to find correlations up into this year. As a one man show with a wife and kids, my project time starts at 10pm and sometimes goes until 3 to 4am. Then I wake up at 7 and take the kids to school and work my day job. I can usually do this two or three times a week, but lately I've been going to bed early as it's been wearing me out. I've had so many 4am nights that it's probably been a bit detrimental to my health at this point.
I'm not doing any order book or HFT stuff. It's mostly mean reversion < 15 minute trades. I have a considerable amount of options trading experience and that's what my main strategy revolves around. I don't have a killer strategy that some of these algorithmic firms are capable of, but the current one is promising. I also have a fairly rudimentary form of backtesting, which is a Jupyter Notebook crunching data I've collected over the years. I use some ML python libraries as a bonus, but I haven't created any strong enough attributes yet to achieve a high amount of predictive accuracy in that sense. My strategies mostly revolve around simple statistics.
My stack is a Linux VM with MySQL, running a suite of python scripts that collect data in real time and make the automated trades through TD Ameritrade's API.
By the way, I wouldn't consider myself smart or gifted - my strength relies solely on my determination. If you were to ask me if it's worth it, I would say "mostly." At the very least I've come away with a much higher understanding of the equity/option markets, and I know much more about MySQL, Python and data mining. At this point though I'd take a job with an algorithmic firm in a heartbeat.
I started off doing it on my own back in 2008 with nothing more than an Interactive Brokers account. Then I went all in and started a company to do it professionally around 2012.
As far as strategies go, I've said it here before, but all my strategies are quite simple and straight forward. The difficulty is almost always the execution. Almost all of my strategies are arbitrage or market making, and some of them trade off of events, like earnings, interest rate announcements, the weekly petroleum status report, and things you'd find on an economic calendar.
None of my strategies are speculative, that is I have no idea what company will perform well over a long period of time and in fact in many cases I don't even know what the company I'm trading even does. I also don't make use of any so called technical indicators, like relative strength, or fibonacci this/fibonacci that.
For the vast majority of my activity, my algos only enter into a trade if it's guaranteed to make money.
To give a vague idea of what the process looks like, every strategy starts from the premise that the market is perfectly efficient and there is no opportunity to make money. We then construct a model of what a perfectly efficient market should look like. We then backtest this model to determine whether the market is actually perfectly efficient. In most cases it will turn out to be either very close to efficient, or inefficient but in a way that cannot be profited from after taking into account fees, latency, and other factors. But sometimes you find areas where the model predicts certain behavior and the backtesting shows that the real world doesn't follow that model. In that case we then proceed to investigate very carefully what is going on. Did we make a faulty assumption? Is our model not seeing the whole picture so that there are factors we did not take into account? This happens A LOT and in fact we are very skeptical when our backtesting deviates from our model. But if after scrutiny we find no reason to doubt out model, then go from backtesting to running it in a simulator, and then from simulator to running it live on a very small scale, and then over time increasing the scale.
Our backtesting and simulating is incredibly sophisticated and precise. Almost all publicly available backtesters just look at trade activity or very low resolution data, and never accounts for things like market impact. Our backtester takes into account individual orders and simulates the entire order book, taking into account where our order would be placed within the order book. We also simulate potential market impact as well, which requires us to run simulations in parallel with different potential market impacts so we can see what the worst case scenarios are and there's a host of other factors a good simulator and backtester will take into account.
As someone dabbling with the topic, I would love to chat with someone that made the step to run your own firm. Are there any good groups to meet others? Would you be up for a Videochat coffee?
There are good groups but they tend to be people who are already deeply involved in the field. The vast majority of what you find, including discussions about this on HN, are complete trash to be quite blunt and it's very demoralizing.
A colleague of mine does doing spread trading around commodities. He has 2 investors who put the money up, so I think you need a decent bit of leverage to actually cover fees and produce a return...
HFT is, more or less... but algo trading in general can be as simple as executing strategies you would otherwise manually perform. I believe there's still enough alpha out there.
Algo trading != HFT. HFT is a type of algorithmic trading strategies, categorized by trading interval. In the same categorization there are mid-freq strategies as well. The term "high frequency" is rather subjective, it depends on what alpha you're targeting after.
HFTs is about using c++, putting your box as close to the market computer as possible and building out a private optical fiber from chicago to new york to lower your latency vs competition... algo trading can be anything from putting your personal strategy into code to using machine learning to discover trade signals etc
HFT is mostly arbitrage, that's why they need the speed to reduce the risk. The rest of algo trading (and quant trading in general) tries to guess which way the market and individual securities will go based on market indicators and work over longer time horizons than HF traders work in. A simple example is that in low interest rate stocks will tend to outperform bonds, so the trade is to go long stocks and short bonds. Of course we expect that simple trades like this quickly be seen to be profitable and do more people do it and so the benefit of doing the trade versus just going long the market (beta) should eventually go down. So quants are always looking for other, more complicated trades as their current ones become less profitable.
HFT exploits very short lived movements. If you had some algorithm to predict long-term trends, then you could beat HFT without relying on low latency.
Buffet and Munger are value investors, there are multiple strategies in both investing and trading. Jim Simmons might be a more relevant example here in regards to trading if you are comparing the two.
They are value investors… who definitely know the technicalities of the market, and have at times taken serious size option positions. They say to just buy index funds because otherwise it’s a full time job with all the research and accounting.
Back in the day I was day trading a stock at a gig that provides high speed internet and professional trading software. Many of us did have medium to long term profitability, so I guess it's the same for algo trading.
Someone who merely bought and held tech stocks, like Apple & Nvidia, beat virtually all funds since 2009. There are always ways to make money even when your competitors have such advanced tools. The world of finance is big enough that there are opportunities for players of all sizes and resources. Look how badly AQR has done despite hiring from such a qualified talent pool.
>> Someone who merely bought and held tech stocks, like Apple & Nvidia, beat virtually all funds since 2009.
This is both absolutely correct, and entirely in-actionable since it uses hindsight. The question would be...what are the two stocks to buy to beat the market for the next 13yrs.
Saturation of markets picked up pace across the 2nd half of the 20th century. Postwar, with transistors, electronic goods went to saturation over decades. Since mobile phones, a localized saturation can happen in 1-2 years. The rate Americans bought washing machines and microwaves changed to the rate americans bought iPods and phones. White goods manufacturers stopped looking like profit machines.
Apple has a huge problem now: it's eating it's own market. Believing there is an endless belt of profit owning Apple shares is to ignore the risks of consumers changing their minds about "I need this years iPhone" and sales tanking. I read more people saying "my iPhone 12/13 is still fine" than I read people saying "I want to spend $1500 on an iPhone 15"
The cost of being Apple never gets better. They now have exposure to costs they didn't have in 2009. They will have exposure to more costs (s/w complexity, VLSI in-house) and they will have exposure to more market entrants. They are also at risk of supply chain dynamics which could erode profits multi-year if bad enough: imagine if TSMC's yield drops on complex must-have chips? It's force majeure stuff.
I certainly wish I'd bought apple in the 2000s or before. I would hesitate to assume its worth owning FAANG stock now, rather than other things (including EFT)
The long-term rate of return on investment across markets is 6-7% and being above that for periods is unusual and begs questions.
It does not have to be as cherrypicked as individual stocks. Even something as broad as 'buying and holding an index fund' beats almost all funds and strategies. Doesn't quant funds also rely on hindsight? There are no guarantees that strategies will keep working.
> Even something as broad as 'buying and holding an index fund' beats almost all funds and strategies.
How do you come to believe something so blatantly false and naive? Is this due to the proliferation of the (good) advice that most Americans are best off saving for retirement in index funds?
>Someone who merely bought and held tech stocks, like Apple & Nvidia, beat virtually all funds since 2009.
This is a common misconception or a poorly phrased statement. It's not true that someone who bought/held tech stocks, or an ETF beat virtually all managed funds or that holding on to ETFs beats virtually every managed fund. It's true that passive investing, in tech or ETFs would have beat the average managed fund, and it's also true that an investor is better off investing in an ETF/diversified portfolio, but there are exceptional managed funds that significantly outperform the market.
The problem is that you are no more likely to know which managed fund will outperform the market than you are to know which stock will outperform the market. Picking a fund that will outperform the market, especially after fees, is just as hard as picking stocks, and in fact it might be even harder due to the fees.
But this does not mean that all, or virtually all funds perform worse than the market or even a segment of it.
One of the advantages of hedge funds in particular is that they can employ leverage in a way that provides almost all of the upside of leverage while protecting an investor from some of the downside. For example if I, as an individual, used leverage to trade on the market and some black swan even happens, not only would I lose the amount I invested, I could also end up in debt and have to sell my house or other assets to cover my obligations.
If I use leverage through a hedge fund, then I still get almost all of the benefits if the market moves in my favor, but if the market moves heavily against me the most I can lose is my investment.
Just because a managed fund outperformed a market doesn't mean it didn't happen by pure luck. There are lots of managed funds and most of them are not profitable. If each chooses portfolio randomly, some of them will outperform the market.
I highly doubt rustamm or anyone partaking in this discussion is remotely qualified to know whether the most successful hedge funds, including Renaissance Technologies, Citadel, or Bridgewater are successful simply due to luck.
That largely depends on the type of leverage used (not all individual margin loans have the same conditions). It's possible to get pretty good terms as an individual in some circumstances (mostly if the loans are smaller and personally guaranteed), mostly by getting loans without margin calls attached. If you own a home, you can trivially borrow against it to invest without the risk of a margin call.
It's all tradeoffs - the broader the conditions at which a bank can recall your margin, the cheaper the interest and lower personal guarantee requirements (some may not hold you personally liable for negative balances - check your T&Cs). Funds can obviously borrow more, and at lower interest rates because of that though. Obviously their loans will be wound up on the way down no matter what, because the bank can't get money out of a negative balance like they would an individual.
Funds also don't tend to all-in on three tech stocks, so the fact they are very exposed to volatility with that type of leverage is less of an issue.
Nothing you've said has any relevance to this discussion. Regardless of what kind of leverage you use, if you're the one using it then you can end up with a negative balance putting you in debt. Case closed.
As for your other comment trying to be pedantic about funds owning three stocks, there are numerous publicly traded leveraged funds that trade just a single stock, one single stock [1]. They are known as single-stock ETFs and the purpose of these funds is specifically to provide an indirect form of leverage to investors. For example, IRA accounts are forbidden from using leverage, but someone can use an IRA account to purchase a leveraged ETF including a single stock ETF.
There's definitely margin products that will guarantee you aren't liable for the debt (but correspondingly will margin call you and limit the debt/equity ratio), and there are margin products that are the opposite (no margin calls, but full recourse and liability for negative balances).
The point is it's not cut and dry that the market geared equity solution is superior (though, IMO, the individual advantage lays on the side of things without margin calls, but full recourse - you can ride through a downturn without being forced to sell, assuming you keep your job and other risks etc etc).
Those single stock ETFs are significantly more limited than full-market geared funds (1.5x rather than more typical 2-3x). Equity geared ETFs are definitely just straight up more convenient (and safer) for the vast majority of people and situations though, I agree with you on that.
Can you provide a reference for a single broker that guarantees no liability for holding negative balance in a margin account, because as-is what you've described is a violation of FINRA rules and I'm fairly certain that such a product doesn't exist but would be interested in seeing the precise details.
I don't want a fancy explanation of how it works, I would like to know the name of a single brokerage that offers this product because as I said, I don't think it exists as it is frankly a pretty basic violation.
At least in Australia, IBKR used to have a fairly limited margin product that actually precluded you from being exposed to a possibly negative balance - I've probably overgeneralised that case (or thought it was more common than it is). I can't find a reference to those particular terms anymore. Obviously being IBKR, they have very aggressive auto-liquidation if you get margin called (ie. you don't get one).
I did end up finding the specific agreement - it pertains to Australian retail clients (https://gdcdyn.interactivebrokers.com/Universal/servlet/Regi...), and clauses 3 and 7 lay out that retail clients are not liable for a negative balance arising from a margin liquidation. Retail clients for Australia have pretty limited margin (25 or 50k iirc), so this isn't super high risk for most people regardless (can't lose that much money).
The other stuff I talk about arises from other products in Australia as well - it's possible to borrow money and buy shares without being exposed to margin calls, so long as you make repayments on the loan. It's pretty different to a traditional margin account though, and only really applies to ETFs (NAB Equity Builder). I also imagined that existed elsewhere, but really I'm only speaking from what I've seen available in Australia.
Nothing you claim is stated in that document you linked and as someone who has done a great deal of business with IBKR for the better part of 15 years now as well as one of the largest market makers on the Australian markets making up approximately 5% of all ASX and CHIX volume, I assure you there absolutely no protection provided to a client whose balance enters into a negative position.
Clause 3.A.e specifically states that trading on margin can result in a loss of funds greater than that deposited into your account and that you accept that risk.
In conjunction with Clause 7.K which states that you must reimburse the broker for any liabilities as a result of the liquidation undertaken by the broker.
You are always on the hook for the full amount of losses on margin.
Fair enough - I looked at terms 7F (retail clients) - There was more context when I read about it a couple of years ago, or perhaps I'm simply misremembering (and I'm hardly a lawyer..)
For example if I, as an individual, used leverage to trade on the market and some black swan even happens, not only would I lose the amount I invested, I could also end up in debt and have to sell my house or other assets to cover my obligations.
This is not true. The broker would try to liquidate your positions well before that happens. Failure to put up collateral means your position will be forcibly closed. It's called Maintenance Margin. The last thing the broker is going to allow is for its clients to incur a debt and be on the hook. The hedge fund instead will send you a letter that your money is gone. Same thing.
I'd be very careful to categorically state what is true or isn't true on a topic that you may not quite be an expert in.
Brokers have no ability to liquidate a position on a company that declares bankruptcy after market hours. In fact, most major events happen during times when trading is either halted or the market is closed.
As sad as it is, there are people who have committed suicide over having a negative balance including this individual who carried a -$730,000 balance:
Well, latency/capital required to lower it gonna kill ya too. Fees are an issue like the blinds in a pro poker game that you don't have the access to our buy-in for either.
fwiw, med/long term strategies are consideribly more difficult than HFT. Also, depending on the product (options, treasuries, etc.) most firms still have traders to manage strategies. For example, the top Options MM firms (CitSec, SIG, Jane Street, IMC, Optiver...) all have traders. Pure play algos is once again, consideribly harder (for certain products).
I still think theres alpha, but I don't think it would be from off the shelf methods that some random youtube trading guru talks about.
> There is also a special order type called post-only. It is designed to only supply liquidity, never take liquidity. If the market moves between the decision to send out an order, and the order reaching the exchange, the order will not cross. Instead, it will be hidden, or cancelled. This makes it easier for algorithm designers to get the behavior they intend (that is, resting orders will not accidentally be converted into crossing orders).
I'd argue that an order that'd immediately be filled does provide liquidity to the market overall.
One reason to use "post-only" is explained in TFA:
> Many markets use the maker-taker fee structure. Traders that place orders that rest on the exchange earn a maker fee, and traders that “take” liquidity, that is execute orders against the existing resting orders, pay a taker fee. The taker fee is higher than the maker fee
You might have multiple strategies in the same symbol, one intended to send out post-only orders and one intended to send out crossing orders. Niche functionality like this can help achieve that separation of concerns.
Crossing orders are considered liquidity taking rather than providing since they're interacting with another market maker's resting (providing) orders.
> Crossing orders are considered liquidity taking rather than providing since they're interacting with another market maker's resting (providing) orders.
> good example in the book explaining why a tick size is needed.
> Say that the current bid in the market is $20. If you want to buy at that price, you will be placed last in the list of orders. But since the sorting order is first by price, then by arrival time, you could get first in line by putting in an order with a price only slightly better than $20 (say $20.00000001).
I don't buy the argument.
Removing tick (or at least reducing it 100x) would put more emphasis on price discovery instead of speed.
A colleague here tried to break into the trading world as an adult. He had a reference to be a member with a small cozy firm where his accounts could be held. He got "direct market access" (?) with a trading terminal that he said was good quality. Yet when I watched him work for several weeks each day, he was locked out of a SELL order more than once.. it didn't go through in any reasonable amount of time and he ended up losing some client's money and that was sort of the end. I don't know enough to know what happened, but it seemed like he was just pushed aside somehow, despite the cautious and reputable (?) parts he used. SF in the oughts iir
The article isn't about discretionary trading. It's about algorithmic trading, which is a bit like the word 'hacking' in that it means one thing to practitioners and another to the general public.
To practitioners it refers to the use of algorithms to trade large quantities of stocks or futures or whatever. The goal is to reduce trading costs by executing small trades at the right time. This is distinct from and rather more common than quant trading where an algorithm actually decides what bet to make.
Your story doesn't make any sense. Was this guy trading his own account, or was he employed as a proprietary trader, or was he running his own little investment fund using another company's platform? In any case, a legitimate trader won't be "locked out".
it was years ago.. the man decided on trades and executed them using a kind of terminal and base account that enabled that. Yet, "front running" is commonplace at all levels, in many forms. This man was a legitimate trader with credentials and ID, and when a SELL order was issued (get your money) the order did execute.. but how long did it take ? what prices changed while the order was being queued ?
That still doesn't make any sense. Do you mean he had passed the FINRA Series 7 Exam? Anyone with money can trade, with or without a Bloomberg terminal. Order execution speed will depend on the exact type of order the trader puts in and where he directs it; there are multiple types other than simple market sell orders and there are trade-offs between speed and price. And if he had evidence of his dealer engaging in illegal front running then he should have reported that to the regulators.
Anyway, it sounds like your colleague was just an idiot who didn't understand the basics of professional trading and got in over his head. He should have stuck with buying index funds on a Vanguard account.
> didn't understand the basics of professional trading
I don't know why you are so quick to assume that.. that guy did a year with some large firm before breaking out on his own.. a YEAR of full time I think
> it sounds like your colleague was just an idiot
oh I see, you want to call people that name.. got it
A YEAR of full time means nothing. The big financial services firms hire thousands of entry level brokers and traders. Spending a year in that type of job is not even remotely adequate preparation for setting out on your own. At that point you don't know what you don't know. But there are a lot of overconfident idiots out there, and the real professional traders love to take advantage of them for an easy profit. The Dunning–Kruger effect strikes again.
yes, that is what I thought about it.. that someone was taking advantage of him.. and yes, I agree that a year in a sophisticated environment is not necessarily enough.. You know and I know that people in that field don't need a sophisticated analogy in order to rationalize just .. cheating someone to get more money that day.
I can do a lot more math than the guy I knew in that story, but I would not call him an idiot lightly
You haven't provided evidence of front running or any other form of cheating. Idiots lose money on bad trades every day with no cheating involved, and then they try to excuse their failures by falsely claiming that someone took advantage of them. Math skills alone are only a minor factor in trading.
"Algorithmic trading" in the sense described in this article only makes sense if you have a customer who wants you to execute large trades and pay you a commission.
You can try some trading using algorithms to identify profitable trading opportunities. That would normally fall under "prop trading" instead. There are definitely people doing this in ways achievable by a home hobbyist, but don't expect any low hanging fruit. Find some niche in some less liquid instruments. Don't look for anything that relies on being fast - someone else will be there who measures latency in nanoseconds.
I spent a good few months building a system for fun/interest. Darwinex has an interesting business model - check it out - but it shows leaderboards of supposed profit-generating trading systems.
Thing is, one will be hard pressed to find solid, relevant, detailed and current information about legitimately profitable trading strategy. Once a strategy becomes widely used, the 'market inefficiencies' being exploited cease to be readily available, so there is a strong incentive to keep a good strategy private. I vaguely remember reading about HFT firms obscuring their trading activity for this reason. Additionally you will find the online world absolutely saturated with the grifter types. So good info is hard to come by. Be prepared to learn at least the fundamentals of both trading and statistics, do lots of testing, and basically figure it out on your own because nobody successful (and smart) is sharing their reliable, profitable strategies (that doesn't mean you can't learn from them - just don't copy paste).
It is a very interesting domain though and I thoroughly enjoyed learning about it all and building mine.
However, it became hard to maintain an opensource version. I would say its still not a bad way to get a head start (bias there, ofc)
I will say, its not something that can be done "on the side." I originally made a decent amount of $ by getting lucky in crypto. I figured I'd "just become a algo trader" and it was much more difficult than I could have imagined.
I actually _just_ started a series on how to build an equity trading system from scratch. I planned to put part 1 out later this week but eh, I'll post it now, it touches on it better than my comment here can :)
* the post assumes you already have alpha (a profitable strategy)
> Has anyone done this successfully?
Regarding this, I actually originally talked a bit with the (now infamous) SBF of FTX about this. I originally wanted to join Alameda Research... but at the time, I didn't want to move across the world. For years I regretted that decision (not so much now, lol) I started my own firm though and I have made a decent amount of $. Truth be told though, knowing what I know now, I might have put more energy into a start up. I enjoy the challenges of algotrading but doing some consulting work, I think I enjoy "building" more than running statistical tests, cleaning data, etc etc.
To sum up this comment though, _if_ you had a profitable strategy and _if_ you built a system that could reliably execute trades, you certainly could be successful. It is very difficult though.
For starters, open a brokerage account at a broker that provides an API. There are many currently available including Ally, Tradier, Alpaca, Think or Swim, Interactive Brokers etc.
Although, I think Think or Swim is currently not providing new keys due to their merger with Schwab.
Once you got that part setup, try to write a simple program that buys or sells an equity from the command line .
From their own you can start exploring trading algorithms. Some are pretty basic, like when the price crosses above a 200 DMA, then buy a stock as that usually signifies an upward run, while selling if the price falls below the 200DMA as that is bearish.
Then you can read some books on price action, fundamental or technical analysis and build your own algos.
There is litteraly 0 chance for you to be profitable in the medium to long term if you don't have years of experience in the industry.
Anyone claiming that is not the case is just misinterpreting his PnL.
The internet is full of people thinking they are market wizards just because they cannot residualize their idiosyncratic returns properly against beta, sector, country, size properly.
First, become a PDT (25k min to pattern day trade), meaning you can't execute more than 4 trades in a 5 business day time-period. So if you are serious, you have to get to that first... then realize that whatever broker you are using, they probably have an API.
I do raw api calls, but you have to be so very careful. You can do something wrong and totally, absolutely jack yourself up, so this way is only for the very brave, but I think it offers good opportunities to understand the markets better if you can stomach the extreme risk profile.
Check out https://algotrading101.com/learn/ for a good set of practical articles to give you some context. I wish I could still point to Quantopian, which is where I started my learning process on this, but it died.
I'd like to know how an individual can do this, 1) And avoid some code bug causing them to lose all their money, and 2) Not get lose all their money to some company's API fees...
For (1), test profusely beforehand, and apply your algos in paper trades first (demo APIs without real market execution). And of course, hedge your bets, don't put all your cash on one algo/instrument in one go, and do at least some DD.
For (2), there are zero-fee brokers (e.g. those mentioned by downvoteme1 earlier) that you can use, so you don't have to keep feeding the broker.
I suspect the biggest catch for 1, is that you do it from an account where losing all of the money is an acceptable outcome. Clearly not the preferred outcome. But will not destroy you financially.
Which leads in to 2. The idea is that you are aiming for algorithms that take into account the API fees. If you didn't account for that in the price of business, than this is the same as not accounting for taxes in how you pay for things. That is, you did it wrong.
Think of it like any active trading strategy, or day trading, just that you’re automating it. It’s possible, but it’s a lot of work, and it’s very risky.
Is a platform I experimented with and found pretty solid. I definitely learned some things however, I realised the amount of effort I needed to put in would be better used elsewhere.
as for has anyone, well, there's the infamous wallstbets on reddit but also the less infamous /r/algotrading where you may have better luck with the question
Is it even possible to outperform the market in the long term, without some violation of the Efficient Market Hypothesis? Without insider knowledge/trading or some technical mechanism to access information or trades faster?
The basic idea behind the propagator model is that order flow can be treated as a propagating wave that spreads through the market and affects prices. Thus given that we usually execute multiple orders for a given "meta" (big) trade, managing the effects of those earlier orders on later orders can have non-negligible impact on the execution performance. The propagator model then gives some solution to get the optimized execution under those assumptions. You can refer to https://www.goodreads.com/book/show/39096959-trades-quotes-a... for more information
Trading seems dauting, especially when your competition are HFTs and huge firms, but there are even very simple patterns that can be profitable, that does not require any advanced coding, APIs, huge troves of data, quant formulas, etc.
Once such simple method, which still works, is to short BTC and go long QQQ/SPY during market hours if there is relative weakness of BTC before the market open, whilst going long QQQ/SPY. Both legs are exited at the market close.
This has been very profitable. Even the most advanced firms are bound to miss easy strategies. Pattern recognition, intuition are more valuable when to comes to trading than having more data or better tools.
As soon as your write about a successful strategy and publish it, it no longer becomes profitable. Trading pairs of stocks is one such example, firms made money from identifying stocks that have a negative correlation with one another. This went on for some time until someone published a paper on it and then it became unprofitable.
Dennis reasoned that even though he could publish all the rules in a newspaper, only a few traders would heed them since most traders tend to avoid following rules rigidly. He mentioned that most people only follow the trading rules as a method of improvising when they deem it necessary and that deviating from the rules can affect the performance of the trade.
>Pattern recognition, intuition are more valuable when to comes to trading than having more data or better tools.
I have a few friends in the equities business and this topic always comes up over drinks. It would seem that in the age of GPU farms and open source ML tools, are we to a point where patterns are so subtle or short-lived that only a machine could pick up on them?
By the relative weakness do you just mean price drop?
And how can SPY be hedge considering bitcoins incomparable volatility. Are position sizes proportional to volatility or something like that?
The US market opens at 6:30 AM PST. In the 30 minutes before the market open, BTC and the SPY/QQQ futures tend to be highly correlated, but let's say NQ (which is a futures contract that tracks the Nasdaq) rises .5% but BTC only rises .25%, then this would be relative weakness on the part of BTC. The trade would be to short BTC and go long QQQ in equal size.
Invest in FTL technology so you can start trading after for example release of critical document but before light can reach you from point where document was released. In other words insider trading. Otherwise don't bother.
Originally it used to mean "quantitative", as opposed to "qualitative". It is a type of investment strategies where you target to be right "on average". Once you are right, say, 51% of the times, you aim to reach this asymptotic behavior by trading more and more. Either horizontally (trading more stocks) or vertically (trading more often). You want to keep the law of large numbers on your side to consistently earn that 1% edge that you found.
This contrasts with qualitative investment strategies (sometimes called "discretionary") where you target very precise and punctual events on which you have a very high (say 90%) chance of being correct.
You can imagine both these strategies with a coin toss game.
With a quantitative approach, you would try to find something that allows you to have just even barely more than a 50% chance of winning. Once you find that, you want to bet as much as possible. This is close to the strategy of a casino: they have games which all have an ever so slightly positive expected value, then they just have to make a lot of people play these games.
With a qualitative strategy, you would study very hard to find an event when you can predict at 90% chance the result of the coin toss. You don't play the game until this event is about to happen, and you bet big once it is about to happen.
Nowadays, the term "quant" has a broader meaning, which roughly encompass any kind of financial work which is heavy on math, or sophisticated. You can even find "back office quants", "pricing quants", etc
Algorithmic trading here means more about how to "execute trades" thus reduce the "execution cost" of a trade, rather than using quantitative method to gain advantage (alpha). They are usually employed by firms executing large trades, no mather whether the trade comes from a traditional trading form, or a quantitative trading firm. There are definitely overlaps, especially for HFTs regarding market microstructure, but in HTFs case, the market microstructure is built-in the HFT strategy itself, while for algorithmic trading can be decoupled as execution from the actual trading strategy that produces the majority of the "alpha"s.
I think it’s more or less the same idea, quant trading typically refers to people doing quantitative analysis as part of a larger strategy, and algorithmic trading is all about actually executing trades automatically. Definitely significant overlap
This is an article about how pension funds and other large players use algorithms to reduce their trading costs. You have a problem with that? Or did you not know you were in a Wendy's?
Many things, I'd argue. Meat industry causing animal suffering. Social media, tobacco, fast food industries causing human suffering. Oil and gas industry causing environmental destruction.
What direct suffering does algorithmic trading cause? It would take quite the narrative spin to argue that it's as bad or worse as one of the above industries.
You can buy or sell 1 share of apple for a bid/ask spread of 1 cent today, or 0.006% of the stock price, and pay no commission to do so. There are very few other examples out there where pure competition between market participants have made things so cheap as to be indiscernible from free.
Okay, and is that bad? The entire world has systems which parasitic relationships exist that if they simply did not the entire ecosystem of live could collapse.
But here we are with 26 letters complaining on perhaps the most advanced thing humans have made because you don’t see the value of saving some money while trading.
People don’t exist to give things a way, expecting people to pay more is parasitic.
In theory it is not socially unproductive at all (in practice much less so).
The socially useful idea behind trading is allocation of capital. How do we determine which sectors get capital and which don't? How do we determine a price of something?
This is in theory. In practice of course... BitConnect!
The book is kind of old now, but it was written by Barry Johnson, who worked at Morgan Stanley on their algo trading team.
The book is kind of dry, but very thorough and clear on its concepts. It reads more like a university text book than anything else. It just goes through concepts one by one, chapter by chapter.
[0]: https://www.amazon.co.uk/Algorithmic-Trading-DMA-introductio...