Previously, we explored using Meta’s Prophet library to predict VIX. It turned out that simply extrapolating the last value of the index worked better (Prophet for VIX). In fact, locf (last one carried forward) works better than GARCH(1, 1) and most other approaches. Can the same be said about Conditional Gaussian Mixture Models?
We used the cgmm python library to forecast 20-day forward VIX and compared its root-mean-squared errors (rmse) to those of locf‘s.
locf is pretty hard to beat.
Especially so when the VIX index itself is volatile.
When you buy a stock, you buy a piece of business, not a quote from a broker. – Naved Abdali
There was a time when people actually believed that buying a stock meant that you were buying a piece of the underlying business. However, we have strayed far, far away from that. The average holding period of equities keeps dropping and everything has become trading sardines.
If we are all traders anyway, why not trade with leverage? Or so goes the clarion call of brokers offering the Margin Trading Facility.
Here’s how it works:
Initial Margin: You pay a portion of the total trade value from your own funds. Broker Funding: Your broker provides the remaining amount to complete the purchase. Collateral: The stocks you buy are pledged as collateral to the broker. Interest: The broker charges daily interest on the borrowed funds.
Margin Trading Facility (MTF) has become a more significant revenue stream than traditional brokerage fees. And the market has been expanding.
Judicious application of leverage, especially on low-volatility portfolios, does make sense. However, the ground reality is different. As a percentage of free-float capitalization, its mid/small-cap momentum stocks that are being financed on margin.
For example, back in August 2024, almost 75% of Motilal Oswal Nifty Smallcap 250 ETF’s free-float capitalization was financed by MTF. If a situation were to have arisen where most of the traders who had bought this on leverage couldn’t meet a margin call, the broker’s risk management team would’ve just dumped this in the market. Given the already abysmal liquidity situation of that ETF, it would have been enough to trigger a cascade of stop-losses, further dislocating the market.
As it turned out, the index would proceed to go down 25% by March 2025.
Currently, more than 15% of Nazara – a company who’s entire business model has been legislated out of existence – is financed under MTF. I hope traders know that MTF is a full recourse loan?
As much as leverage exposes you to risk, there’s another side to this equation. Keeping track of the most leveraged stocks can help you identify margin liquidations and profit from it. However, the pain of liquidations will be felt by many but the profit will go to the few.
In Apple in China – The Capture of the World’s Greatest Company (Amazon,) Patrick McGee lays out the how, what and why of Apple’s outsourcing efforts in China.
The growth of the manufacturing ecosystem in China resembles the growth of most social networks. First comes the hook: the “wow” factor. Then come the key nodes: the influencers. Before you know it, half your friends are there and you are compelled to join them or be left out. Then comes the theft of property by the owners of the social network (your photos, your activity, your thoughts, etc. are all theirs.) And then the monetization.
Steve Jobs initially wanted all of Apple’s products to be made in America. He was of the opinion that it was the only way in which he could maintain the strict standards that went into making Apple’s products. How did they end up making everything in China?
At first, the hook: Terry Gou of Foxconn.
It reached a point where Apple (the influencer) was co-developing advanced manufacturing processes with vendors in China.
Slowly, and then suddenly, all of component manufacturing shifted to China.
Then, the theft started.
Leading to the final step: monetization.
Apple finds itself enmeshed in China and scaling India in is proving difficult.
Primarily because of language politics, unionization and the perennial election cycle that prevents the Indian government from doing what China did: suppress worker rights.
Facebook did not “die” in the traditional sense, like how MySpace did. It just became unpopular with the next set of cohorts. It is aging out, continuing to monetize its current user base, while Instagram attracts the next generation. A similar thing might happen to the Chinese manufacturing juggernaut because now, everybody know that:
While the concept of volatility smirk is simple, the pattern itself is unstable. For example, different expiries have different shapes.
And these shapes change across days as well.
One way to keep track of these changes is by fitting a model through the implied volatilities. Here, we fit a parabola (y = ax2 + bx + c). a, the coefficient of strike_pct2, gives a measure of the narrowness/steepness of the smirk.
By sampling the curve and tracking these coefficients, you can begin to form an opinion on what is “normal” vs. a trading opportunity.
More often than not, real time feeds are exposed as web socket streams. Web sockets are extremely sensitive to network glitches. Glitches – when the connection drops for a very small span of time – will cause your market data to lag badly as your client tries to reconnect/re-establish the feed, eventually leading to catastrophic failure.
The problem with glitches is that it is hard to work around. A complete drop in the connection can be handled by a router that can switch over to a backup connection. Glitches are more sinister.
For example, we have broadband connections from three different service providers (Hathway, Excitel and BSNL) to make sure our systems can stay connected. They all have varying degrees of stability and customer service. Here are the number of glitches per hour over the last few days:
You can work around 1-2 glitches an hour by making your re-connection logic more robust. However, there is no getting around the Hathway level of glitches.
If your service provider itself is not monitoring for glitches, then explaining the problem to them is impossible. Support tickets get closed because “network is connected.” Here is a history of our support tickets with Hathway – an ongoing saga with no end:
As you scale, monitoring your infrastructure becomes increasingly important. Be aware that your service provider could be (willfully) blind to the specific issues you are facing – their job might depend on them not solving it. And, always have a backup and a backup for your backup.
The python code to monitor for glitches and the R code to draw the charts are on github.