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 daily sector snapshot #485

Closed
StephanAkkerman opened this issue Jan 17, 2024 · 4 comments
Closed

Add daily sector snapshot #485

StephanAkkerman opened this issue Jan 17, 2024 · 4 comments
Labels
Difficulty: Medium 😐 This issue can be solved, but a decent amount of lines need to be changed New feature ⭐ New feature or request Priority: Medium 🥈 Assign this label if this issue is used around once a day

Comments

@StephanAkkerman
Copy link
Owner

image

From this tweet https://x.com/bespokeinvest/status/1747378516784447520?s=46&t=kVjHUwwWD5s9buPqlc0doQ

@StephanAkkerman
Copy link
Owner Author

@StephanAkkerman
Copy link
Owner Author

https://trendlyne.com/equity/sector-industry-analysis/sector/day/ also has interesting sector info

@StephanAkkerman StephanAkkerman added Priority: Medium 🥈 Assign this label if this issue is used around once a day New feature ⭐ New feature or request Difficulty: Medium 😐 This issue can be solved, but a decent amount of lines need to be changed labels Feb 5, 2024
@StephanAkkerman
Copy link
Owner Author

StephanAkkerman commented Feb 5, 2024

https://www.barchart.com/stocks/market-performance seems to have the data necessary for making the plot
image

Can scrape from the raw HTML, probably easy to do

@StephanAkkerman
Copy link
Owner Author

import pandas as pd
import requests

headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"
}
r = requests.get("https://www.barchart.com/stocks/market-performance", headers=headers)
df = pd.read_html(r.text)
print(df)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Medium 😐 This issue can be solved, but a decent amount of lines need to be changed New feature ⭐ New feature or request Priority: Medium 🥈 Assign this label if this issue is used around once a day
Projects
None yet
Development

No branches or pull requests

1 participant