Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access Fundamental Company Data #23

Closed
Herold1989 opened this issue Nov 29, 2020 · 6 comments
Closed

Access Fundamental Company Data #23

Herold1989 opened this issue Nov 29, 2020 · 6 comments

Comments

@Herold1989
Copy link

Hey guys, thanks for your great work with this package. Downloading stock data just works great.

I was wondering how I could access the fundamental data like "company_overview" or "income_statement" using your functions especially as i have seen functions / test functions on this in the master package which I downloaded here.

I guess the functionality should be similar to downloading stocks as the JSON request on AlphaVantage just seems to exchange the function-input.

Thanks for any response on your side or an idea how I could overcome this by myself.

Cheers Jens

@dm13450
Copy link
Collaborator

dm13450 commented Nov 29, 2020

The functions company_overview and income_statement are in version 0.2, so perhaps you need to update your installation to see them? Then they can be used as normal, i.e. company_overview("TSLA").

@Herold1989
Copy link
Author

Dean, thanks for your prompt response. I managed to resolve my problem.

I updated to version 0.2, using the ] update AlphaVantage command. However the functions like company_overview and income_statement were not accessible still.

What I then tried, I ran the AlphaVantage.jl module file manually, which I downloaded from the master branch folder here, and Julia overwrote the existing AlphaVantage module. Now everything seems to work as meant in version 0.2. Not sure if this is how it is supposed to be done, but I'm glad it worked.

Thanks again for your effort. J

@Herold1989
Copy link
Author

Would it be possible to add a function for earnings to the master branch of the package as well? In theory this works just company_overview and income_statement. I added the code to the fundamentals.jl. Defining the function and calling it, works just fine. However I did not manage to successfully run it integrated into fundamentals_test.jl from runtests.jl.

Here are my lines of code:

function earnings(symbol::String; outputsize::String="compact", datatype::String="json") @argcheck in(datatype, ["json", "csv"]) uri = _form_uri_head("EARNINGS") * "&symbol=$symbol" * _form_uri_tail(outputsize, datatype) data = _get_request(uri) return _parse_response(data, datatype) end export earnings

@ellisvalentiner
Copy link
Owner

ellisvalentiner commented Nov 30, 2020 via email

@dm13450
Copy link
Collaborator

dm13450 commented Dec 1, 2020

@Herold1989
If you create a fork of this code, add your earnings code in and a test for the function, (you can simply copy similar ones in fundamentals_test.jl.
You might find the Github docs helpful for creating the pull request (PR)
https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request

@Herold1989
Copy link
Author

I created a pull request - I hope I did this correctly. Pls excuse, I have so far only been a consumer of Github work by others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants