[{"data":1,"prerenderedAt":463},["ShallowReactive",2],{"project-23190921":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":43,"post_text":44,"what":45,"said":90,"maker_in_thread":216,"shape":224,"grid":228,"attempts":425,"same_week":426,"maker_shows":31,"maker_hidden":455,"reader_version":456,"card":457},"23190921","senator-filings","A tool to scrape senators' stock transactions for your own analysis","title","Show HN: A tool to scrape senators' stock transactions for your own analysis","https:\u002F\u002Fgithub.com\u002Fneelsomani\u002Fsenator-filings","github.com","nsomani",1589542048,2020,350,80,107,3028,4,"legend","finance_crypto","stock trading data analysis","library",[24,25,26,27],"senator stock trades","congressional trading","stock transactions scraper","insider trading","curious",0.068,{"positive":31,"neutral":32,"mixed":33,"critical":34},5,17,1,3,26,{"idea":37,"execution":39,"privacy":41,"performance":42},{"positive":31,"critical":38},2,{"positive":40,"critical":33},0,{"positive":40,"critical":40},{"positive":40,"critical":40},[31,34,40,40,40,31,34,40,33,34,34,34,34,33,40,40,40,40,40,40,40,40,40,34,40,34,34,31,31,34,40,40,40,40,40,40,34,34,34,34],null,{"problem":46,"audience":53,"pricing":44,"motivation":57,"time_to_build":44,"stack":61,"openness":87,"stage":88,"team_size":89},{"value":47,"source":48,"evidence":49},"Hard to analyze senators' stock transactions from disclosure filings.","maker",[50],{"id":51,"by":11,"text":52},"23190923","Hi everyone, with the recent interest in U.S. senator insider trading, I open-sourced this repo for you to scrape and analyze the senators' stock transactions yourself:…",{"value":54,"source":48,"evidence":55},"People wanting to analyze senators' stock trades themselves.",[56],{"id":51,"by":11,"text":52},{"value":58,"source":48,"evidence":59},"Respond to interest in U.S. senator insider trading by open-sourcing the scraper.",[60],{"id":51,"by":11,"text":52},[62,73,79,83],{"value":63,"source":64,"evidence":65},"Python","inferred",[66,69],{"id":67,"by":11,"text":68},"23191513","Here's the specific package that I'm using: https:\u002F\u002Fgithub.com\u002Franaroussi\u002Fyfinance",{"id":70,"by":71,"text":72},"23192128","dhruvkar","Nice! Any particular reason you picked using selenium+chromedriver instead of an http lib (like requests) and beautifulsoup?",{"value":74,"source":48,"evidence":75},"Selenium with chromedriver",[76],{"id":77,"by":11,"text":78},"23195380","It's a dynamic page, so I have to do things like mark checkboxes, click buttons, etc. But if there's a better way to do it, I'm down to incorporate it!",{"value":80,"source":48,"evidence":81},"Jupyter notebook",[82],{"id":51,"by":11,"text":52},{"value":84,"source":48,"evidence":85},"yfinance",[86],{"id":67,"by":11,"text":68},"open_source","launched","unknown",{"praise":91,"objections":115,"requests":149,"questions":178,"alternatives":193},[92,104],{"value":93,"source":94,"evidence":95},"Transparency tool that is needed and could reduce corruption.","commenter",[96,100],{"id":97,"by":98,"text":99},"23191181","rasengan","This is amazing transparency that we needed. With this tool, you may have really changed the future of America to that of one that’s less corrupt. Bravo!",{"id":101,"by":102,"text":103},"23191896","filtercoffee37","Nice idea! This should be an easily navigable web app that every common person should be able to use. Thanks for building.",{"value":105,"source":94,"evidence":106},"Useful data for an app or project.",[107,111],{"id":108,"by":109,"text":110},"23192403","davidkuennen","This is nice. I think I will integrate it in my new stock events app. It's exactly the kind of content that belongs there. Thanks!",{"id":112,"by":113,"text":114},"23196870","malshe","That would be great! I am interested in the data. Thanks",[116,127,138],{"value":117,"source":94,"evidence":118},"Senators' trades are small and may show no insider edge.",[119,123],{"id":120,"by":121,"text":122},"23192030","bko","I didn't use this tool, I instead used Senate Stock Watcher [0]. But a cursory review [1] of the trades made by senators showed the amounts to be very small (66% of trades were \u003C…",{"id":124,"by":125,"text":126},"23191494","awinder","Probably not a very good one, somewhat surprisingly. I haven't run any analyses \u002F haven't looked at this dataset in depth but from past forays into congressional datasets I don't…",{"value":128,"source":94,"evidence":129},"Reporting lag of up to 45 days limits usefulness.",[130,134],{"id":131,"by":132,"text":133},"23191991","finolex1","There is a substantial delay between the time of the actual trades and their filing, so any edge they might have had is long gone by the time you have access to the data.",{"id":135,"by":136,"text":137},"23193512","jchook","Unfortunately the senators get 45 days to disclose their trades.",{"value":139,"source":94,"evidence":140},"Uses Yahoo Finance API that may no longer exist.",[141,145],{"id":142,"by":143,"text":144},"23191484","TekMol","It says it uses the \"Yahoo Finance API\" but it seems no such API is offered by Yahoo anymore. There are other sites that offer access to what they call the \"Yahoo Finance API\". I…",{"id":146,"by":147,"text":148},"23191744","snazz","There definitely is still a Yahoo Finance API for large corporate customers. That's where Apple's Stocks app gets its data, for example. I'm not sure about the third party…",[150,160,171],{"value":151,"source":94,"evidence":152},"Add PDF OCR parsing support.",[153,157],{"id":154,"by":155,"text":156},"23191500","christiansakai","Seems to add the PDF analyzing feature is not that hard or I'm missing something? Have you tried to incorporate this feature?",{"id":158,"by":11,"text":159},"23195348","If someone could help out and make a PR to do the OCR for PDFs, that'd be awesome! Would love to add it in.",{"value":161,"source":94,"evidence":162},"Include senators' spouses and family transactions.",[163,167],{"id":164,"by":165,"text":166},"23191774","zeeone","Great effort, though these kind of tools are useless unless you can include senators’ spouses and family \u003C\u002Fsarcasm>",{"id":168,"by":169,"text":170},"23191747","olah_1","You'd get more meaningful results if you checked _their_ statements with the transactions of their _family members_. But that's too creepy for me (which is probably what is being…",{"value":172,"source":94,"evidence":173},"Replace Selenium with direct API or HTTP requests.",[174,175],{"id":70,"by":71,"text":72},{"id":176,"by":71,"text":177},"23197073","Usually for dynamic pages, it's still working off of some internal API. So when I search for first name starts with \"a\", it's sending a POST request to…",[179,186],{"value":180,"source":94,"evidence":181},"Have you done any analysis on the data?",[182],{"id":183,"by":184,"text":185},"23191387","amykyta","Great idea. Have you done any analysis on the data? I’d be curious to see if a passive index to track members of the Congress would beat the S&P. Although it may not account for…",{"value":187,"source":94,"evidence":188},"What is the lag time on this?",[189],{"id":190,"by":191,"text":192},"23199391","mvkel","What’s the lag time on this? 30 days?",[194,202,209],{"value":195,"source":94,"evidence":196},"Senate Stock Watcher",[197,201],{"id":198,"by":199,"text":200},"23191752","JoshuaEddy","Sounds like \"Senate Stock Watcher\": https:\u002F\u002Fnews.ycombinator.com\u002Fitem?id=22834524 https:\u002F\u002Fsenatestockwatcher.com\u002F",{"id":120,"by":121,"text":122},{"value":203,"source":94,"evidence":204},"Alpha Vantage",[205],{"id":206,"by":207,"text":208},"23191529","k3oni","I would move away from the Yahoo Finance API, there's a few data sources that you can use that have free access to their API, see [1] for an example. - [1]…",{"value":210,"source":94,"evidence":211},"Throw Them All Out by Peter Schweizer",[212],{"id":213,"by":214,"text":215},"23192022","wdn","\"Throw Them All Out\" by Peter Schweizer documented a lot of this. https:\u002F\u002Fwww.amazon.com\u002FThrow-Them-All-Out-Politicians-ebook\u002Fdp\u002FB0062N35X8",{"comments":217,"answered":18,"key":218},7,[219,220,221],{"id":51,"text":52},{"id":158,"text":159},{"id":222,"text":223},"23195340","I took a look at Alphavantage, but I wanted other data like daily transaction volume + market caps to do things like weighted regressions. The rate limiting was also a little…",{"commenters":225,"max_depth":226,"maker_replies":217,"first_comment_mins":40,"lifespan_hours":227},55,8,103,[229,231,233,237,241,244,247,251,254,256,258,259,263,264,266,269,270,272,274,277,279,280,283,285,288,292,295,297,300,302,305,307,311,314,317,320,322,324,327,329,332,334,337,339,342,345,347,351,352,355,357,359,362,365,368,369,371,376,377,379,382,383,385,388,391,392,396,398,400,403,405,407,411,413,414,415,417,420,422,424],[51,40,40,230,11,33],"maker\u002Fneutral\u002Fnone",[97,40,31,232,98,40],"project\u002Fpositive\u002Fidea",[234,40,34,235,236,40],"23191898","project\u002Fneutral\u002Fidea","matthewaveryusa",[238,40,40,239,240,40],"23192072","other\u002Fneutral\u002Fnone","dpau",[242,40,40,239,243,40],"23193715","craftinator",[245,40,40,239,246,40],"23192344","cosmodisk",[248,40,40,249,250,40],"23192536","commenter\u002Fneutral\u002Fnone","bredren",[252,40,40,239,253,40],"23192790","ra7",[255,40,40,239,136,40],"23193396",[257,40,40,249,246,40],"23193409",[183,40,31,232,184,40],[260,40,34,261,262,40],"23192000","project\u002Fmixed\u002Fidea","creaghpatr",[120,40,34,235,121,40],[154,40,34,265,155,40],"project\u002Fneutral\u002Fnone",[267,40,40,249,268,40],"23191985","pc86",[158,40,40,230,11,33],[206,40,33,271,207,40],"project\u002Fcritical\u002Fexecution",[222,40,40,273,11,33],"maker\u002Fneutral\u002Fexecution",[275,33,34,235,276,40],"23191639","beager",[168,33,34,278,169,40],"project\u002Fneutral\u002Fprivacy",[213,33,40,239,214,40],[281,38,34,235,282,40],"23191247","inglor",[284,38,40,239,282,40],"23191256",[286,34,34,235,287,40],"23192355","at_a_remove",[289,34,40,290,291,40],"23193578","other\u002Fneutral\u002Fidea","buckhx",[293,18,34,235,294,40],"23191362","pjc50",[124,18,33,296,125,40],"project\u002Fcritical\u002Fidea",[298,18,40,249,299,40],"23191526","odonnellryan",[301,18,40,249,125,40],"23191699",[303,18,40,249,304,40],"23192065","noahc",[306,18,40,249,125,40],"23192305",[308,18,40,309,310,40],"23191533","other\u002Fneutral\u002Fperformance","cochne",[312,18,40,249,313,40],"23191691","booleandilemma",[315,18,40,290,316,40],"23192190","wpietri",[318,18,40,239,319,40],"23192358","curiousllama",[321,18,40,239,294,40],"23192473",[323,18,40,239,316,40],"23194528",[325,18,40,239,326,40],"23194463","TuringNYC",[328,18,40,239,316,40],"23194637",[330,18,40,239,331,40],"23192391","cat199",[333,18,40,239,316,40],"23194562",[335,18,40,239,336,40],"23196564","s1artibartfast",[338,18,40,239,316,40],"23198603",[340,18,40,239,341,40],"23192513","sadadar",[343,18,40,239,344,40],"23192084","dsparkman",[346,18,40,309,310,40],"23192390",[348,18,40,349,350,40],"23192185","commenter\u002Fneutral\u002Fperformance","sesuximo",[131,18,34,235,132,40],[353,31,40,239,354,40],"23191925","nathell",[198,356,40,239,199,40],6,[358,356,40,239,11,33],"23202423",[360,217,34,235,361,40],"23191475","stuaxo",[363,217,40,239,364,40],"23192130","alibaba_x",[366,226,34,235,367,40],"23192521","kumarski",[135,226,34,235,136,40],[108,370,31,232,109,40],9,[372,373,34,374,375,40],"23194210",10,"project\u002Fneutral\u002Fperformance","feep",[112,373,31,232,113,40],[378,373,40,239,375,40],"23237989",[142,380,34,381,143,40],11,"project\u002Fneutral\u002Fexecution",[67,380,40,381,11,33],[384,380,40,249,143,40],"23191658",[386,380,40,249,387,40],"23191741","Ill_ban_myself",[389,380,40,249,390,40],"23191810","nl",[146,380,40,249,147,40],[393,394,40,239,395,40],"23191299",12,"fratimo66",[397,394,40,239,98,40],"23191379",[399,394,40,239,395,40],"23191575",[401,394,40,239,402,40],"23191716","save_ferris",[404,394,40,239,268,40],"23195284",[406,394,40,239,262,40],"23192020",[408,409,40,239,410,40],"23192368",13,"dznodes",[70,412,34,273,71,40],14,[77,412,40,273,11,33],[176,412,34,273,71,40],[416,412,40,273,11,33],"23198853",[418,412,40,419,71,40],"23198949","commenter\u002Fpositive\u002Fexecution",[190,421,34,374,191,40],15,[164,423,33,296,165,40],16,[101,32,31,232,102,40],[],[427,431,436,441,446,451],{"id":428,"name":429,"points":430,"category":20},"23209142","toro",551,{"id":432,"name":433,"points":434,"category":435},"23205579","XP.css",297,"dev_tools",{"id":437,"name":438,"points":439,"category":440},"23180298","Virtual Reality DOS",206,"games",{"id":442,"name":443,"points":444,"category":445},"23223358","aitextgen",174,"ai",{"id":447,"name":448,"points":449,"category":450},"23215360","Career Fair",161,"productivity",{"id":452,"name":453,"points":454,"category":450},"23204641","bookmark_ui_demo",124,false,"v2",{"id":458,"name":5,"line":6,"ai":455,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":459,"top":18,"kw":460,"maker":11,"domain":10,"tier":19,"attempts":40,"strip":461,"url":9,"mix":462,"praise":93,"objection":117,"sub":21},23190921,0.07,[24,25,26,27],"5300053013333100000000030335530000003333",[31,32,33,34],1794036590525]