During the start of the year I was thinking how could I bet against certain stocks (in my case mainly Tesla) without using derivatives and the risks that come with them.<p>After I had success betting on the oil price with a highly correlated investment fond, I came to the conclusion that negative correlations could be used to bet against the price of other assets. Unfortunately, it is not easy to find correlations between assets if you don't know which assets to compare in the first place.<p>So I created a website where you can find the 10 highest and 10 lowest correlations of certain assets.
Couple of random thoughts:<p>- Building things like this is always great. And its a fun site to poke around on.<p>- I would not count on this approach or expect it to be reliable in terms of actually hedging. Correlation, as a measure, has lots of issues. You are boiling down a lot of complex relationships into a single number. While it is convenient for many calculations, there are many problems. For example, many asset classes will go through periods with positive correlation and then later, negative correlation. This is due to a factor driving both securities price becoming more or less volatile compared to the other drivers. E.g., recent increased volatility around inflation expectations driving correlations between rates and equities. Whereas, few years ago, inflation was not driving anything.<p>- One alterative approach is to have a "risk model". Which essentially decomposes a security into drivers. Each security then represents a basket of these drivers. You can then use this model for range of purposes. While not perfect by any means, the model contains more information than a correlation. These too have a range of issues and creation and use is as much art as science.<p>- In general, you won't find many negative (or even very low) correlations across individual equities. Most stocks are driven by a common set shared risk factors that drive much of the risk. But if you can find negatively correlated securities (or lowly correlated), then that is certainly helpful.
Super useful!<p>However, I get a “504 Gateway Time-out” error for <a href="https://betagainst.fun/asset/bz__f_bno/" rel="nofollow">https://betagainst.fun/asset/bz__f_bno/</a>. HN hug of death?
"We calculate the correlations between 2 securities on the daily closing values of the last 20 years."<p>It's better to correlate daily returns than daily prices, since the latter are nonstationary, and I suggest using 1 year of daily returns rather than 20 since correlations do change over time. When I worked as a financial quant no one looked at 20 year correlations to measure near-term risk.
Random question: Would it be illegal to use insider information to trade on the result of a correlated stock that you suspect will be affected by the actual company you have information about? (I mean I get that it probably is since you're using insider information but wouldn't it be really hard to prove.) Just curious, I'm not intending on doing it myself.
I’ve often wondered the same thing, good on you for actually doing it.<p>That said, in any set of 20+ variables there will be a 10 highest/10 lowest correlating.<p>Without a good (specific, hard to vary) explanation as to <i>why</i> the correlation happens, I would not use this information to gamble real money.
I can see the risk in short positions - you theoretically could lose an infinite amount (if you borrow X shares of something, sell them, but then can't find any to buy when it comes to returning them), and it's certainly possible to lose more than you put in (sell 100 short at $10 netting you $1000, price doubles overnight on new news, you have to buy $2000, losing a total of $1000 in the process. If price trippled overnight you'd lose $2000 -- more than you could have ever made even if the company went bankrupt overnight)<p>But put options? Surely all you can do is lose what you bet in the first place?
In many ways, compared to a vanilla short position or a synthetic short via derivatives, you are implicitly accepting higher risk to “short” via this manner.
This is generally a bad idea as it’s hard enough to arbitrage the same equity on different exchanges[1]. Now imagine trying locate perfect negative substitutes for an equity…<p>[1] <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=525282" rel="nofollow">https://papers.ssrn.com/sol3/papers.cfm?abstract_id=525282</a>
Very cool, although index funds like S&P 500 and DJI don't seem to work.<p><a href="https://betagainst.fun/asset/_gspc_spy/" rel="nofollow">https://betagainst.fun/asset/_gspc_spy/</a><p><a href="https://betagainst.fun/asset/_dji_dia/" rel="nofollow">https://betagainst.fun/asset/_dji_dia/</a>
Is it just me or do others see a correlation between people who short Tesla, and posting on HN about investment tools that use questionable prediction models based on historical "patterns"?<p>These are starting to look like perpetual motion submissions to the patent office.
This tool does not correctly handle stock splits and thus all the correlations it produces are wrong for any stock that has ever had a split or a reverse split. It shows a split as a huge price drop, but that is not really how that works, since the number of shares expands, thus anyone holding the stock does not, in fact, face a 4x loss for a 1:4 split.
Correlation between assets change over time. Predicting what the correlation will be in the future is important for asset managers.<p>I am supervising a master thesis project (in fact the second such project on the matter) where we are trying to predict the covariance matrix of a portfolio of assets using machine learning. Results are promising!
This is pretty easy to do in SQL too!<p><a href="https://factor.fyi/questions/top-10-aapl-correlating-stocks-s7v8xk0nsu" rel="nofollow">https://factor.fyi/questions/top-10-aapl-correlating-stocks-...</a>
Seems like an interesting project, but so far the UX isn't great.<p>The searching UI for companies has no loading or success/failure indicators. A note on performance - waiting an extra second before firing the search request can help take some of the load off the server, along with cancelling requests after I change the search.<p>Some requests time out, and others return no results (e.g. HOOD, TLRY).<p>For other requests that returned results, there's no correlation (Apple).<p>Maybe an example page could be helpful to illustrate what the app can do?
Cool!<p>Little offtopic highjacking: does it make sense to "bootstrap" correlation among stock returns (frankly, any multidimensional time series, but since we're talking about stocks) with different time periods?<p>Say, for any pair of stock a and b, randomly selecting a startint point and a period (N days) and using this as a better estimator for the "true" correlation instead of using all the data points? Or something like this, not this process exactly
Great project! Even more so, congrats on shipping something!<p>A little tip from someone who dabbles in algorithmic trading, look into <i>cointegration</i> as well as correlation. Also, the cross correlation matrix changes over time, you can have great fun seeing spikes and convergence/divergence as markets tend to get more or less correlated reacting to real life events.
I'm interested in knowing how you do your correlation calculations, if there are any criteria for them (such as if a correlation is weighted against if the industries are unrelated). Also interested in your information feeds. I'm not looking to compete or do it for myself, this field just draws my playful interest and I'm curious.
I wonder if correlation is the best measure. Cointegration might be more important for this sort of trading. And might be a supplementary measure you want to add since you’re doing all the pairwise comparisons. (If I recall there is a computational shortcut that helps)
Searching “By industry” doesn’t make a lot of sense. Do you mean “within the same industry”?<p>Mispelling “higest” in tab.<p>A convenient tool. I’m restricted from trading in my employer’s stock. There are no rules about trading in a highly correlated proxy.
Are you also considering time lagged correlations?<p>To me I don't care if a certain stock is correlated by something, I would more like to know which stocks do have correlations or if there are correlations with a time lag
Can someone explain why Microsoft has overall the strongest negative correlation with Activision/Blizzard(-0.87) on a 1 year basis. That must be related to the aquistion but I can not figure out how.
Very interesting results for tesla for example.
So can it make sense to buy a stock with very low correlations as "stabilisator" for example?
Cool. Not sure how useful it is considering what other commenters said, but is there anything like this for indices or currencies?<p>Also, typo: Higest -> Highest