Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Stock Performance of US Senators (govtrades.com)
246 points by bingdig 38 days ago | hide | past | favorite | 113 comments

This is cool but I think it gives people a false sense of security that their lawmakers aren't taking financial advantage of the positions they're in. Surely if a Senator came across a lucrative but illegal opportunity to profit off of some kind of information they become privy too, they'd do it in a way that will bypass the Senate Financial Disclosure Database, such as having friends/family trade by proxy for them, selling that valuable info to the highest bidder and getting paid in bitcoin, etc.

This is a reasonable concern. And indeed we only (currently) track holdings of publicly-traded securities, where for some senators a decent fraction of assets are in privately-held companies or things like property investments. We take some solace in the fact that officials are required to disclose trades by spouses + dependents (which we include in our calculations), but you're right that we could be missing more illicit activity.

We hope that this work highlights potential dangers of allowing officials to trade in individual stocks, and encourage more robust legislation that would limit the sort of activity you're describing. Obviously very idealistic, but that's the goal.

Good luck!

Yeah or put your unqualified son on the board of a foreign gas company for millions like Joe Biden did.

Why do you care about a Ukranian gas company's hiring practices? If they want to waste money overpaying for an unqualified board member simply for name association that's on them. Nobody in this country is affected. The better question is what is the current President's unqualified son-in-law doing handling middle east peace talks AND heading the coronavirus task force. Those things definitely do impact Americans.

Do you have any evidence, even circumstantial that points to Biden getting his son on that board?

Seems a lot more likely that the board recruited the son to the board hoping it would provide political cover. Which it also does not appear to have worked since Biden requested the dismissal of the AG that had already closed investigations into Barisma.

It's good that you have the S&P as a benchmark. It shows that the median performance of a senator (4%-6%) is lower than expected (10%). Can you add the S&P to the histogram so it's always there? That would make the difference more obvious.

True although it's not quite that simple. Most senators have less risky portfolios than the S&P 500 with lots of bond ETFs and the like, so that's not a perfect comparison. We're working on creating a risk-adjusted return measure to provide a more accurate comparison.

probably makes sense to use a few different metrics of information ratio vs $SPY, t-bills and a 60/40 portfolio.

Instead of just plotting S&P, they should divide by it to reject the common-mode signal.

They should actually regress senator returns against Ken French's research factors [1] and measure the statistical/economic significance of the intercept and the volatility of the residuals.

If I return 2% per year, but do so at 1% volatility and zero market exposure, then I can be a highly successful hedge fund after applying 10x leverage.

[1] https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data...

Yeah this will probably end up being one of our benchmarks -- it's commonly used in academic literature to measure abnormal returns.

Where does this signal come from in a time-sequence series? I looked up "common mode signal" and in EE it looks like line to line interference, or line to ground interference. Does the existence of this signal presume a Senate's portfolio performance is somehow coupled to some index fund performance (S&P in this case)?

The common-signal would just be the general stock market performance. S&P is one way to approximate "the market". The idea being that you want a plot to show you how well they're doing in terms of market performance, not in terms of absolute share price (which is kind of meaningless here). Otherwise every shock to the general market ends up getting rendered in every line in the plot which is pretty distracting and makes it hard to see what's going on.

I'm not entirely sure either but you could use some combination of dS/dt dI/dt where S is the senator and I is the market?

What is the partial derivative of a sitting US senator?

Their portfolio

And others have had 20% annualised returns which are ... questionable.

I hit 20% this year, that much can totally be explained by random chance.

Any particular person getting a 20% return is not suspicious. The question is whether the distribution of returns over all senators is suspicious.

Any person getting a 20% in some small number of trades is fine. An individual getting 20% over a long period and a wide range of trades is definitely suspicious.

Or a single person outperforming over a long time horizon.

When you have enough people trading over some period of time, someone will have consistently high returns.

questionable? they have inside knowledge

Looks like Mitch McConnell is doing well just following the benchmark (VFIAX: Vanguard 500 Index Admiral Fund)

It appears that the Senate Majority Leader is a Bogle follower. I can cheer that even if I don’t agree with all of his policies :)

The interface is misleading, put mitch in the search field by name and then you will see all his investments.

If the senators use this data and that argument to prove they didn’t make too much money or didn’t do anything wrong, then please remove all insider-trading laws. Right now, it only hurts the law abiding minority that accidentally makes a mistake

It's hard to accidentally insider trade and very hard to get prosecuted for accidental insider trading in the United States. Europe, maybe. But not the US.

People working for the government should only be allowed to either have some certificates or nothing at all. Countries ask their youth to die for them and they can't just ask people with knowledge that makes trading unfair to just restrict to "bad" options while they hold secrets.

Not that it matters anyways as they probably still take advantage of things through other people. I'd be pretty good to have a way to really prevent that as this is a problem probably in every country.

This is awesome, but is this accurate? The largest holding listed is Susan Collins with a $37mm investment in 3M... Everything I can find from a google search suggests she is not really that wealthy.

Hey Alex, it's as accurate as the data the senator's report, but we've noticed a lot of inaccuracies that are later corrected - maybe some haven't yet been corrected?

Two points on that specific trade: 1) stocks include an entire family's holdings, and the 3M position is held by her husband, 2) We have to estimate the value of ranges that are reported, and we've chosen to use the midpoint but the lower end may be more true (e.g. $5,000,001-$25,000,000 is estimated to be $15,000,000)

Here's the link to the original filing (have to accept terms first): https://efdsearch.senate.gov/search/view/ptr/0c76c4e6-afb1-4...

This is great. If I had the patience I would write some script that alerts you when there are major sell offs. The last crash was preceded by heavy sales by a few senators that were exposed to data and knew how serious the COVID19 thing was before the public.

There is a significant reporting lag, between the actual stock sales and the notification on the tracker. For example, the sales of Sen Loeffler that were widely reported in the news, were not released until 12 March, for transactions in early February. The stock market as a whole had already significantly declined, but was still a ways from its low, on that date.

Link (you have to accept the initial terms of use thing, and then reload that link): https://efdsearch.senate.gov/search/view/ptr/370492b8-ed0a-4...

They also probably don't have a sufficient fraction of their net worth in public stocks to make insider trading worth the risk of the repercussions of being caught doing so.

It wouldn't matter anyway. Congress is exempt from insider trading laws. It is perfectly legal for members of Congress to trade based on any information, public or not.

thanks. how did I miss that? it's kind of a big deal!

I don't think it counts as inside trading. If a senator hears expert discussions about a pandemic in China and sells all his stocks - does that count as insider trading?

The particular words for insider trading are "material non-public information." If the expert discussion is on Youtube, fine. If it's only available to senators, using resources of the US government, then it meets the definition of insider trading.

I don't think there's any law against using material non-public information unless it's illicitly obtained. This is a frequent theme of Matt Levine's Bloomberg column that's often mentioned on HN.

Why would anyone ever trade unless they had material non-public information? The point of having markets is so such information becomes public through prices, isn't it? Conversely, if you don't have it, you're purely gambling aren't you?

"Not legal advice" though.

If you trust Wikipedia, this is the first sentence in the US section on insider trading: "Until the 21st century and the European Union's market abuse laws, the United States was the leading country in prohibiting insider trading made on the basis of material non-public information."[0]

I'm not a lawyer, nor do I work in finance, but I think the key is what exactly constitutes "non-public information." I can trade on all the public information regarding Tesla's cars, like reviews, published production numbers, and Elon's tweets and my own analysis of all tat but not on the word of a someone who works there saying they've got some big unexpected news.

There's a bunch of interesting cases about whats on the edge, for example, commercial satellite imagery to count cars in parking lots[1].

[0]: https://en.wikipedia.org/wiki/Insider_trading#United_States_...

[1]: https://www.theatlantic.com/magazine/archive/2019/05/stock-v...

No, material and nonpublic is necessary but insufficient for the trading to be illegal. It must also break a confidentiality agreement, fiduciary duty or specific law pertaining to the way the information is released to the person and their duties thereof.

This is to say that it's illegal for congresspeople to trade on material, nonpublic information because there is now a law explicitly governing it. If they (or anyone) develop the material, nonpublic information through original research, it's not illegal.

Don't trust Wikipedia summaries for these things.

Do you have a good source to recommend with a more detailed overview?

Read the SEC documentation on insider trading directly. Barring that, Matt Levine gives accessible (and entertaining) which is informative for a lay audience.

>illicitly obtained

No such stipulation. I'm not allowed to trade my company's stock based on information I acquire through performing my standard everyday job duties.

That is because the actual stipulation is for there to be a confidentiality or fiduciary agreement. As shorthand, "illicitly obtained" could therefore be replaced with, "illicitly appropriated."

On its own, material and nonpublic information is fine to trade with. Likewise not all insider trading is illegal; most of it is explicitly legal and mundane.

You can't defend against insider trading accusations by saying "I had insider knowledge but I didn't base my trades on it". Therefore your statement implies that you can't trade your company's stock at all. However, it is an empirical fact that companies sometimes offer it as an option in the 401k plan, which seems like an endorsement that it's ok in some situation.

Nonpublic information about, say, a merger, would be "illicit" in my understanding. But what if you have worked for a company for 10 years and you think management is really great?

You can be guilty of insider trading for not buying something that you'd otherwise have done, too. So if you worked for a company and found it a terrible place to work and therefore never bought company stock, or sold the stock you had, you would in fact have profited from material nonpublic knowledge. Obviously that can't generally be a crime.

> But what if you have worked for a company for 10 years and you think management is really great?

This is exactly why they say material non-public information. This is not material. It is your opinion, and you can trade on it during applicable trading windows.

My public company has trading blackout windows close to earnings reports forbidding everyone from trading, non-public information or not. Outside those, you’re still not allowed to trade if you are in possession of material non-public information. If you are an executive, that basically means all the time which is why they’re required to file scheduled sales long in advance. It doesn’t matter if you “do not use it” for your trades — that’s not going to hold up with the SEC.

> You can be guilty of insider trading for not buying something that you'd otherwise have done, too.

This doesn’t sound legitimate.

Of the public companies I've worked at, all had insider trading policies and it was stressed repeatedly there will be legal repercussions. You are allowed to trade yes, but only during open trading windows, typically following an earnings report.

I think most public companies make sure that upcoming earnings data and such is only released to people on a "need to know" basis. It doesn't seem reasonable that thousands of employees would have access to it.

Plenty of data is shared internally with rank and file. Netflix for example openly shares (internally) subscriber numbers, which is a critical piece looked at during the earnings report.

Does this include dividends in returns? Most senators are older (closer to retirement), I am assuming they invest more in dividend stocks and bonds than growth stocks.

doesn't include dividends

We use adjusted close data pulled from Yahoo Finance to calculate daily returns. Adjusted close prices include adjustments for all applicable splits and dividend distributions.

adjusted close prices aren't what you want, when a dividend occurs the adjusted close price is reduced by the dividend amount. you want total returns.

You should show all a senators holdings in one view when filtered by their name.

I notice at least one of the most invested senators is not in the list. Is that intentional?

This might be interesting to see what other people are doing with the Senate Financial Disclosure Database: https://www.opensecrets.org/personal-finances

It looks like the site is struggling under the load, so below is a screenshot of the homepage showing an overview. Certainly some outliers but they'd require significant research to understand.


How can I learn to build something like this? Does it use a scraper system?

I am definitely not OP. But I would guess there is some background agent or cron job running that populates his database from the dataset api. From that there is the web site that reads from the db to render the two visualizations - graph and table.

His methodology page describes where this data comes from: https://www.govtrades.com/methodology

Incidentally someone sent me this link today; a list of charting libraries: https://thenextweb.com/dd/2015/06/12/20-best-javascript-char...

edit: on closer inspection it appears the charts are provided by squarespace. So maybe squarespace also provides the connector for back end data as well??

please correct me if I'm wrong or terse

That's pretty much it, but charts are made with Plotly (R) and then hosted on AWS S3. We embed them in Squarespace code through Amazon Cloudfront to speed things up a bit. There area probably better ways to do this, but we don't know a ton about this so just used the tools we did know about.

warning: page is memory hungry AF!

gave my laptop a wedgie... it's awesome and important, but close some tabs first :p

Yeah, unfortunately it crashes Firefox on Android every time.

Yeah same here. I don't have the beefiest Android so I thought might be my issue.

I’m guessing it loads and graphs all the data with SVG? Lots of data points and DOM elements.

1 tab used 6gb of memory for me on firefox, yikes!

I was thinking why my mobile Firefox crashed...

It crashes for me too. So does twitter from time to time.

It is sad that todays websites offload so much work to the client. I wish they would just deliver some text and pictures (which would probably worked out perfectly fine in this example!) so that in case of bugs their server crashes instead of my web-browser.

Cool. How doable is it in creating a trading bot that trades based on politician’s portfolio and stock trades

It would be interesting to hand pick one or two senators who seem to outperform anyone else and mirror their trades too.

aren't their trades a lagging indicator anyhow? it just shows what they've already done so it doesn't seem like it would be helpful

My idea was that somebody might make trades ahead of time with insider knowledge, so mirroring those still might get you in on it. I don’t know how delayed the data is, but knowing how slowly politics move it could work.

right but that falls in line with the fact that you would have to know what theyre buying at the exact time theyre buying it. and this data is realized money when all trades had already been made and profited from. politics moving slowly has nothing to do with buying up shares via e-trade or fidelity and it happening instantly

We're not planning on doing anything right now related to that. But long term when we have some more time it'd definitely be more doable using a service like Alpaca

would need to consider the lag in time between them making the trade for themselves and the them disclosing it. I expect that would probably wipe out most of the alpha.

Here is a similar site which I built for members of the House of Representatives: https://www.quiverquant.com/sources/housetrading

Maria Cantwell has a very weird portfolio...

Almost all her stock holdings are of RealNetworks, a company she worked for in the 90s and that has been on the decline since the Dotcom bust: https://en.wikipedia.org/wiki/Maria_Cantwell

Woah, it lost 99.99% of its value since 1999. She really ate enormous losses .

Also what is RealNetworks even selling at this point? They seem to have generated 175m$ last year!

Facial recognition, apparently: https://safr.com/

TIL RealNetworks still exists.

Feature request would add to this if you open source it

If Senator is head of a committee, say agriculture, show all underlying assets in that sector

That's a great idea and something we have in the works!

It would be nice if the details table below the graph updated automatically to filter for a Senator selected in the graph.

Most if not all Senators are in Index funds or use products built by wealth management firms.

I struggle to see the value here other than imply that if a senator beats benchmark....that means that they are trading on private information.

I don't know what this website is doing, but it locks my phone up and eventually crashes the ui (Samsung Note 8). Never before have I experienced any behavior like this, not even lag spikes.

Feature request:

Summing by individual and top N / bottom N individuals . Also would be interesting if there are any sources for estimated private holdings?

The 2012 STOCK Act requires disclosure of all assets exceeding $1,000 in value -- so the disclosure information we collect includes private holdings. We only calculate financial returns for listed assets.

This is an active topic in our research pipeline -- specifically, whether holdings in private companies are going up among officials. Returns in private companies are certainly less transparent, so this might be the way to go if an official wanted to obfuscate.

Would you be willing to share some of the technologies/frameworks you use to host the site? Great idea!

Sure, we have a very limited tech knowledge - mostly from statistics and economics - so I'm sure it's not that optimized but was easy for us to get up fairly quickly. Site is hosted on Squarespace and all the data visualizations are created with Plotly (written in R) and hosted on AWS

Very cool! It looks great.

there is additional data relating to the activity of house representatives [0].

[0] http://clerk.house.gov/public_disc/financial-search.aspx

Thanks! We are in the process of adding data on House members and members of the executive branch (who also have to disclose).

awesome. nice work btw.

If you open source this, I would like to provide coding support. Please reach out.

This is frigin' awesome.

Could you add the registered party of the Senator to the table.

Sure, we've gotten a couple requests for this and think it'd be really helpful. State and party affiliation will be up in 1-2 days

Thank you for the quick reply. Awesome site!

where do you get this information? is it publicly available?

All the info is from the senate's personal finance disclosure documents: https://efdsearch.senate.gov/search/home/

Do you plan to add the members of the House?

Yes, that's in the works along with Executive branch data!

Any detail on the back-end and charting?

This is great!

can you regress the senator returns against the market returns to strip out the market

Hi Alexandra, this is a great suggestion! We're still figuring out what the right set of benchmarks for "market" returns are -- right now we use the S&P 500, but are also considering alternatives like passive age-appropriate target date funds and portfolios constructed using Fama-French factor weights. But we will ultimately add a panel that shows abnormal returns for each official as you suggest.

does this include former senators? Al Franken shows up in the search at the top.

We include all senators who were in office sometime between Jan 1, 2014-present. Senators are removed as they leave office (and no longer included when calculating the "all senate" index).

poor maria cantwell

I noticed the lowest performance corresponds to a woman senator. I plotted what I think are only all woman senators and they all are under the S&P500 performance.

Maybe someone with better statistical knowledge than me can study if there is a significant difference between man and woman senator stock performance.

Could be differences in risk tolerance. A portfolio of government bonds, for example, would be expected to have a lower return than the S&P.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact