Skip to content

Commit

Permalink
Getting close to finished post
Browse files Browse the repository at this point in the history
  • Loading branch information
adir1 committed Sep 3, 2024
1 parent c95a475 commit 781acd7
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 20 deletions.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.words": [
"DALL"
]
}
4 changes: 3 additions & 1 deletion content/posts/2024-algorithmic-trading-deeper-dive/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ This topic is huge, technical charting is super popular and not fully automated
Derivatives in general - are they useful after collapse of 2007/2008? And what about Futures? or Commodities trading?
Black Swan book mention

https://www.bbc.com/news/explainers-51265169
https://trade.collective2.com/
https://en.wikipedia.org/wiki/Quantitative_analysis_(finance)
https://medium.com/@chaingpt/understanding-chart-patterns-a-guide-to-technical-analysis-with-chaingpt-ai-trading-assistant-05d40d83f7fd


## OLD SAMPLE
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 19 additions & 19 deletions content/posts/2024-swimming-in-dark-pools/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,44 @@ tags:
---
## TLDR

I discovered the amazing world of algorithmic trading probably about 10 years ago. I was already enjoying the exploration of market dynamics, their correlation with human psyche, economic cycles, and companies hype/performance. This post is my musings about Quants, Black Box algo-trading and even if one perfects a profitable algorithm - is it even ethical? No prior Quant expertise required to participate, but basic stock market understanding is a plus!
I discovered the amazing world of algorithmic trading probably about 10 years ago. I was already enjoying the exploration of market dynamics, their correlation with human psyche, economic cycles, and companies hype/performance. This post is my musings about AI impact on Black Box algo-trading, and even if one perfects their AI to make endless profits - is it ethical? No prior Quant expertise required to participate, but basic stock market understanding is a plus!

## Introduction to Algorithmic Trading and Quants

At its core, the idea of algorithmic trading is pretty straight forward. A computer system is programmed with certain rules and empowered by a human to analyze certain Financial market data and decide which stock to buy or sell, and when. It gets exponentially more complex quickly, though, as most strategies (aka: algorithms/rules) involve [trading Options](https://www.investopedia.com/terms/o/optionscontract.asp) also.

The Math Wizards use statistical analysis of a lot of Past data, to try and predict future behavior of the market. One of the best known and oldest such trading funds is [Renaissance Technologies LLC](https://www.rentec.com/). Founded in 1982 they boast 90 PhDs in Mathematics, Computer Science and related fields. They also mention that: "Our research database grows by more than 40 terabytes a **day**"!

So what do they do with all that data? They try to keep their algorithms a secret, but at the core it is a lot of Machine Learning, Reinforced Learning, Decision Trees and even Deep Neural Nets with [Backpropagation](https://en.wikipedia.org/wiki/Backpropagation). Arguably this is actually one of the Easier use-cases - as you have Very specific goal, Maximize Profits, whereas generalized LLMs often operate in murky opinion-based world (especially now in our [post-truth society](https://en.wikipedia.org/wiki/Post-truth)).

## Dark Pools - What are those?!

So where are the promised Dark-Pools you ask? I would argue that is a renegade semi-legal branch of algo-trading. It is utilizing Level-2 quotes data to look at Live market orders and predict the sentiment for specific stock or market overall. The idea is pretty basic - if there are a lot of sell orders, and fewer buy orders - clearly stock is bound to go lower in the short-term, and vice-versa. This is usually only useful for high-speed trading, also known as day-trading, but clearly whoever has the fastest computer (and market connection), should be able to "predict" the short-term price swing and trade fast enough to take advantage of that.

## The young "Flash Crash Trader"
This is where our Dark-Pools come in - Large Institutional Funds also have to buy/sell stocks, but obviously they will disproportionally affect the market due to the Large size of their positions (usually **multi-million** dollars) - so it is a Huge signal of *Sentiment* for a stock or even an entire market. In a way [Dark-Pools emerged exactly to Avoid exposure](https://www.investopedia.com/terms/d/dark-pool.asp) of such large participants, but then our human instinct of [Have The Cake and Eat It](https://en.wikipedia.org/wiki/You_can%27t_have_your_cake_and_eat_it) kicked in!

## Ethics of *Market Liquidity*

When sh*t hits the fan, all automated systems stop buying also... So where is the liquidity?
So what is the problem? Seems legit and harmless enough?! Of course not - the biggest risk is Herd Mentality amplified Thousandfold by similarly trained Systems/Algorithms. If all the computers recognize the same signals (poor company earnings or poor economic outlook), and rush to Sell (or Buy) - the price impact can quickly escalate to Panic levels, causing even further snowball effect!

## KISS Principle (Keep it Simple _Silly_)
While market system implemented *some* [Market circuit-breakers](https://www.investopedia.com/terms/c/circuitbreaker.asp) over the years, the risk is all still there.

This topic is huge, technical charting is super popular and not fully automated as far as I know. AI analysis of many sources. More Advanced post is coming - to dive deeper into those issues for those interested.
So why let machines trade stocks independently at all? Well, besides the fact it is realistically impossible to block, many argue it gives human traders certain liquidity.

My thesis here is that this is a false promise - most of the automated systems have endless amount of rules and safeguards, and often in a situation of real "run-on-market" they step back and refuse to counter-trade also! In other words - if average Joe decides they don't like "company X" any more and want to sell their shares ASAP, most likely a LOT of other people decided the same thing and automated systems detected this "avalanche" and "thinking": let's see how low it goes before we consider buying again!

## Notes
Derivatives in general - are they useful after collapse of 2007/2008? And what about Futures? or Commodities trading?
## The young "Flash Crash Trader"

An interesting sidebar is a story of a brilliant young trader in England who noticed how several automated systems react to a particular Limit Order (order visible on the Markets L2 order book, but not yet executed). Many systems interpreted it as a certain Sentiment and were triggered to Buy/Sell ahead of it - while in fact the trader was "bluffing", and kept adjusting or cancelling his order shortly thereafter. [Here is the writeup from BBC](https://www.bbc.com/news/explainers-51265169) about him.

https://www.bbc.com/news/explainers-51265169
https://trade.collective2.com/
## AI or KISS (Keep it Simple _Silly_)?

So how does our enormous leap forward in AI affect these automated systems? Should we rush to regulate them before all our pensions are demolished by another "[Flash-Crash Trader Wiz Kid](https://www.bbc.com/news/explainers-51265169)"?

## OLD SAMPLE

I don't claim to have all the answers, these are hard problems that will take time to solve. For starters it is important that we understand our limitations when making decisions based on data. Last thing Netflix wants is disgruntled consumers - some get so emotionally invested that they may swear-off Netflix from young age!

1. Focus on continuously improving data collection, with real-world testing to confirm accuracy. All analysis is only as good as the input data it gets!
2. Don't be afraid of creative approaches to confirm assumptions. Actually ask in the app - would you like to remove this show from Continue Watching because you didn't like it?
3. Discovery is still a huge problem - find ways to show trailers even to non-Ads consumers. Offer bigger banners for new releases with some teasers. Be creative here - and ensure all analysis of popularity takes into account how "discoverable" and "promoted" this new content was in the first place! And why not have Netflix's own annual Awards show for original content - cheap enough to produce and viewers can quickly get a taste of "What's new and good" on the platform?
4. People get invested into seeing stories to conclusion - this is both Useful for content producers and a possible trap. One solution for expensive productions is to make a single-story movie (perhaps with underlying hints for a bigger "conspiracy"), and if successful make additional movies in the same Universe/Series.
5. Consider the cost from the get-go - I am sure productions get green-light based on some sort of statistical analysis for how many subscribers like similar content and thus potential viewers. But how accurate is this - if director isn't the same, or actors differ, it can have huge impact on seemingly similar script. And what about Potential subscribers - surely Netflix needs to entice people who look at the catalog today and say "nothing interesting for me here"...
This topic is huge, technical charting is super popular and not fully automated as far as I know. AI analysis of many sources. More Advanced post is coming - to dive deeper into those issues for those interested.

In a recent Interview for Bloomberg, Netflix new co-CEOs made a bold statement that "[they never cancel a successful show](https://www.forbes.com/sites/paultassi/2023/01/24/netflix-says-it-has-never-cancelled-a-successful-show/)". This statement quickly catapulted to the top of the news by itself, simply because most of Netflix subscribers vehemently disagree with it! In
![Netflix Viewers In Pain](people_crying_for_netflix_cancellations.png)

## Some related links to explore

Expand All @@ -68,5 +67,6 @@ In a recent Interview for Bloomberg, Netflix new co-CEOs made a bold statement t
- [Predictably Irrational](https://www.amazon.com/Predictably-Irrational-Revised-Expanded-Decisions/dp/0061353248?tag=craftonia-20) - Expanded edition of the classic

{{< alert "image" >}}
**Images By DALL-E 3 from Microsoft Bing**
**Images By DALL-E 3 from Microsoft Designer**
{{< /alert >}}
>> Prompt: Generate high resolution image of AI robots trading on New York stock exchange floor, sparks fly everywhere

0 comments on commit 781acd7

Please sign in to comment.