teddykoker / survivorship-free-spy Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://teddykoker.com/2019/05/creating-a-survivorship-bias-free-sp-500-dataset-with-python/
Home Page: https://teddykoker.com/2019/05/creating-a-survivorship-bias-free-sp-500-dataset-with-python/
Hello,
When I am trying to run your code I had error: list index out of range
in 'dates_div = holdings.find_all("div", "component-date-list")[1]'
Are you sure, that it should be '[1]'?
Regards K.P.
HI
(Thanks for this code, great work!)
I have been using the code but quick realised that you probably have defined the yahoo finance service incorrect? you have written the statement as if df is None, while i think it should be if df is Nonen Or df. empty:
If you check your data while pulling the stock data, you will se that the dataframe df, after reading the quandl database file wiki, pretty often is not =none, but insted is just headers but empty. why i think you should add also "or df.emtpy"?!
df = quandl_data(wiki, company[0], start, end)
if df is None or df.empty:
df = yahoo_data(company[0], start, end)
if df is None or df.empty:
skips.add(company)
I am not 100% but this way you are able to get date for any date. If you dont do that you will get very little data for any request you make after 2018 03-30....
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.