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

Add Insider Roster & Transactions #1772

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

JuliaLWang8
Copy link
Contributor

@JuliaLWang8 JuliaLWang8 commented Dec 10, 2023

This will cancel PRs: #1728 #1683 #1571
This will close issues: #1685 #1529

Added implementations for all data displayed on the holders page.

Can access dataframes:

msft = yf.Ticker("MSFT")
msft.insider_transactions
msft.insider_purchases
msft.insider_roster_holders

Also added an additional column called 'Position' separating people's names and titles since they are grouped together on the endpoint. This is because Yahoo displays insider names with their titles/positions below their name.

@ValueRaider
Copy link
Collaborator

I see opportunities to improve formatting. Data types, index, etc. See Ticker.get_earnings_dates for inspiration.

@sshcli
Copy link

sshcli commented Dec 11, 2023

I love this PR, I'm excited just with the idea of see this one included in 0.2.34
Thank you @eshgovil for creating the issue and put it into the radar.
Thank you @ValueRaider for being so nice by encouraging others to participate and collaborate in this amazing project.
Thank you @JuliaLWang8 for being so diligent and proactive.

Copy link

@bot-unit bot-unit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change it to get data from API, not from page?

Change scraping from page to parse json data from quote summary request. Modules are "institutionOwnership", "fundOwnership", "majorDirectHolders", "majorHoldersBreakdown", "insiderTransactions", "insiderHolders", "netSharePurchaseActivity"

@bot-unit bot-unit mentioned this pull request Dec 11, 2023
@bot-unit
Copy link

bot-unit commented Dec 12, 2023

It will cancel PRs: #1728 #1683 #1571
It will close issues: #1685 #1529

Copy link

@bot-unit bot-unit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Job. I think we can merge it.

@JuliaLWang8
Copy link
Contributor Author

JuliaLWang8 commented Dec 13, 2023

Good Job. I think we can merge it.

Sounds good! Could you approve the PR and merge @bot-unit? I don't have access. Or maybe @ValueRaider can you take a look?

@bot-unit
Copy link

Good Job. I think we can merge it.

Sounds good! Could you approve the PR and merge @bot-unit? I don't have access. Or maybe @ValueRaider

I don't have access. And wait. I have some changes.

Copy link

@bot-unit bot-unit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So. It's good and working. Just correct pd.Dataframe creation

yfinance/scrapers/holders.py Show resolved Hide resolved
Copy link

@bot-unit bot-unit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So. @ValueRaider
Thanks to @JuliaLWang8 We did it.
We have good code for take data from API, we have commented out code if API will blocked.

@sshcli
Copy link

sshcli commented Dec 13, 2023

OMG!
You guys are the best.
This is what I call a beautiful teamwork! 💪

@ValueRaider
Copy link
Collaborator

ValueRaider commented Dec 13, 2023

I spotted the DataFrame.apply() pattern. If you got access to GPT4, is easy to convert to vectorized equivalents. Usually less and cleaner code too. If no access, tag me.

Hey GPT. Carefully review the following Python Pandas code, and replace nonvectorized operations with vectorized equivalents where possible.
...

@JuliaLWang8
Copy link
Contributor Author

I spotted the DataFrame.apply() pattern.

Removed in last commit @ValueRaider

@ValueRaider
Copy link
Collaborator

Code looks fine.

Add this to README:

msft.insider_transactions
msft.insider_purchases
msft.insider_roster_holders

Then squash the commits.

@JuliaLWang8
Copy link
Contributor Author

Then squash the commits.

Done both!

@sshcli
Copy link

sshcli commented Dec 15, 2023

@ValueRaider @JuliaLWang8 @bot-unit is there a way to pip install yfinance dev and keep it updated at all times?
I would like to report any bug I may find in dev environment before they go to production, and at the same time take advantage of new features that are only available in dev.

@ValueRaider
Copy link
Collaborator

pip install

#1080

keep it updated

No, have to manually reinstall. Subscribe for notifications.

@sshcli
Copy link

sshcli commented Dec 15, 2023

Thanks @ValueRaider

@ValueRaider ValueRaider mentioned this pull request Jan 6, 2024
@ValueRaider ValueRaider changed the title Feat/Holders insider data Add Insider Roster & Transactions Jan 6, 2024
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

Successfully merging this pull request may close these issues.

4 participants