TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Find the 10 highest and 10 lowest correlations to any stock

217 pointsby maccoabout 3 years ago
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&#x27;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.

44 comments

HFguyabout 3 years ago
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 &quot;risk model&quot;. 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&#x27;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.
评论 #31253642 未加载
评论 #31250093 未加载
评论 #31250509 未加载
runeksabout 3 years ago
Super useful!<p>However, I get a “504 Gateway Time-out” error for <a href="https:&#x2F;&#x2F;betagainst.fun&#x2F;asset&#x2F;bz__f_bno&#x2F;" rel="nofollow">https:&#x2F;&#x2F;betagainst.fun&#x2F;asset&#x2F;bz__f_bno&#x2F;</a>. HN hug of death?
评论 #31248891 未加载
评论 #31250253 未加载
Bostonianabout 3 years ago
&quot;We calculate the correlations between 2 securities on the daily closing values of the last 20 years.&quot;<p>It&#x27;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.
评论 #31248587 未加载
natlyabout 3 years ago
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&#x27;re using insider information but wouldn&#x27;t it be really hard to prove.) Just curious, I&#x27;m not intending on doing it myself.
评论 #31249011 未加载
tdehnelabout 3 years ago
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&#x2F;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.
评论 #31248025 未加载
评论 #31249545 未加载
iso1631about 3 years ago
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&#x27;t find any to buy when it comes to returning them), and it&#x27;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&#x27;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?
评论 #31248882 未加载
评论 #31249433 未加载
评论 #31249062 未加载
评论 #31250114 未加载
评论 #31249191 未加载
评论 #31248580 未加载
Aachenabout 3 years ago
How does this submission have both text and a URL? When hitting submit it&#x27;s shown as either&#x2F;or. Does the server not enforce it?
评论 #31253206 未加载
评论 #31250792 未加载
评论 #31250144 未加载
snake_docabout 3 years ago
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:&#x2F;&#x2F;papers.ssrn.com&#x2F;sol3&#x2F;papers.cfm?abstract_id=525282" rel="nofollow">https:&#x2F;&#x2F;papers.ssrn.com&#x2F;sol3&#x2F;papers.cfm?abstract_id=525282</a>
评论 #31248278 未加载
评论 #31253307 未加载
cosmic_quantaabout 3 years ago
Very cool!<p>Where are you getting the historical data? There&#x27;s a ton of fun stuff you can do with this kind of long-horizon of data
vorticoabout 3 years ago
Very cool, although index funds like S&amp;P 500 and DJI don&#x27;t seem to work.<p><a href="https:&#x2F;&#x2F;betagainst.fun&#x2F;asset&#x2F;_gspc_spy&#x2F;" rel="nofollow">https:&#x2F;&#x2F;betagainst.fun&#x2F;asset&#x2F;_gspc_spy&#x2F;</a><p><a href="https:&#x2F;&#x2F;betagainst.fun&#x2F;asset&#x2F;_dji_dia&#x2F;" rel="nofollow">https:&#x2F;&#x2F;betagainst.fun&#x2F;asset&#x2F;_dji_dia&#x2F;</a>
评论 #31248784 未加载
marcrosoftabout 3 years ago
Nitpick: you can’t lose over 100% of your investment using a put option. You can only lose the premium.
评论 #31248687 未加载
joshuakabout 3 years ago
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 &quot;patterns&quot;?<p>These are starting to look like perpetual motion submissions to the patent office.
flying_sheepabout 3 years ago
Well this tool does not cater for splits and dividends :-&#x2F; very misleading IMO
dom96about 3 years ago
This is a really great idea, unfortunately also getting 504s.
dmitrygrabout 3 years ago
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.
Def_Osabout 3 years ago
Data source? Did you correct for splits and dividends? Why not use returns? Nice idea, but we’re left with so many questions.
评论 #31253167 未加载
surfsvammelabout 3 years ago
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!
sdcoffeyabout 3 years ago
This is pretty easy to do in SQL too!<p><a href="https:&#x2F;&#x2F;factor.fyi&#x2F;questions&#x2F;top-10-aapl-correlating-stocks-s7v8xk0nsu" rel="nofollow">https:&#x2F;&#x2F;factor.fyi&#x2F;questions&#x2F;top-10-aapl-correlating-stocks-...</a>
mountaineerabout 3 years ago
FYI, the link in the copyright&#x2F;footer is broken.
mfrye0about 3 years ago
Seems like an interesting project, but so far the UX isn&#x27;t great.<p>The searching UI for companies has no loading or success&#x2F;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&#x27;s no correlation (Apple).<p>Maybe an example page could be helpful to illustrate what the app can do?
评论 #31258036 未加载
work_ta_220503about 3 years ago
Cool!<p>Little offtopic highjacking: does it make sense to &quot;bootstrap&quot; correlation among stock returns (frankly, any multidimensional time series, but since we&#x27;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 &quot;true&quot; correlation instead of using all the data points? Or something like this, not this process exactly
loxiasabout 3 years ago
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&#x2F;divergence as markets tend to get more or less correlated reacting to real life events.
评论 #31256991 未加载
betwixthewiresabout 3 years ago
I&#x27;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&#x27;m not looking to compete or do it for myself, this field just draws my playful interest and I&#x27;m curious.
LudwigNagasenaabout 3 years ago
I don&#x27;t think the method is sound. You should look into finance literature on the topic, maybe something about diversification.
评论 #31248531 未加载
daxaxelrodabout 3 years ago
Getting 429 status codes after I hit search
评论 #31247733 未加载
omarhaneefabout 3 years ago
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)
jnwatsonabout 3 years ago
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.
评论 #31258045 未加载
karxxmabout 3 years ago
Are you also considering time lagged correlations?<p>To me I don&#x27;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
评论 #31249163 未加载
macilaciloveabout 3 years ago
Can someone explain why Microsoft has overall the strongest negative correlation with Activision&#x2F;Blizzard(-0.87) on a 1 year basis. That must be related to the aquistion but I can not figure out how.
评论 #31251811 未加载
评论 #31251824 未加载
评论 #31251783 未加载
noduermeabout 3 years ago
And the answer is... Nvidia.<p>Cool idea, by the way. I&#x27;ll have to play with this more.
vohu43about 3 years ago
Very interesting results for tesla for example. So can it make sense to buy a stock with very low correlations as &quot;stabilisator&quot; for example?
throwamonabout 3 years ago
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 -&gt; Highest
评论 #31257984 未加载
pmarreckabout 3 years ago
HN hug of death. I didn&#x27;t see any results. Even without shorting intention, this information would be interesting!
chychiuabout 3 years ago
Great site! I&#x27;ve been playing around with it and seeing some interesting patterns.<p>One small typo: Highest -&gt; Higest on the graphs
c_o_n_v_e_xabout 3 years ago
Nice. I&#x27;ve been stewing on a similar idea but that finds correlations in equities with commodity futures.
lbhdcabout 3 years ago
Does this support all publicly listed tickers? It didn&#x27;t seem to find the few I searched for.
lupireabout 3 years ago
Bet Against?<p>I thought the opposite of buying a single stock (Alpha) would be in service of.... Beta Gains T.
throwaway4goodabout 3 years ago
Where do you get your data from?
maccoabout 3 years ago
Wow, I was hoping for some feedback. I didn&#x27;t expect to get on the HN homepage.
TradingPlacesabout 3 years ago
HN Hug of Death continues. 503 and 504 all morning. Congrats?
ltbarcly3about 3 years ago
&quot;any stock&quot;? First two I tried are not available.
nairboonabout 3 years ago
Can you add Gamestop?
评论 #31256718 未加载
评论 #31249893 未加载
matt321about 3 years ago
I want LAGGING correlation please thanks.
sk8terboiabout 3 years ago
Betting against only wins with communism and socialism. And that&#x27;s not really a win, is it?