Commit
·
14a4227
1
Parent(s):
6e469e3
update readme
Browse files
README.md
CHANGED
@@ -25,33 +25,93 @@ Each time the data is updated, I will release a new version under a tag. The ver
|
|
25 |
</td></tr></table>
|
26 |
|
27 |
### Data Usage Instructions
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
40 |
-
|
41 |
-
|
|
42 |
-
|
|
43 |
-
|
|
44 |
-
|
|
45 |
-
|
|
46 |
-
|
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
### P.S.
|
57 |
|
|
|
25 |
</td></tr></table>
|
26 |
|
27 |
### Data Usage Instructions
|
28 |
+
|
29 |
+
This document provides information on querying three datasets sourced from Yahoo Finance using [DuckDB](https://shell.duckdb.org/). All datasets are publicly accessible and formatted as Parquet files.
|
30 |
+
|
31 |
+
---
|
32 |
+
|
33 |
+
#### Datasets Overview
|
34 |
+
|
35 |
+
1. **stock_profile**
|
36 |
+
- **Source:** (`https://finance.yahoo.com/quote/{$symbol}/profile/`)
|
37 |
+
- **Description:** Contains company details such as address, industry, and employee count.
|
38 |
+
- **Columns:**
|
39 |
+
| Column Name | Column Type | Description |
|
40 |
+
|-----------------------|-------------|----------------------------|
|
41 |
+
| symbol | VARCHAR | Stock ticker symbol |
|
42 |
+
| address | VARCHAR | Company address |
|
43 |
+
| city | VARCHAR | City |
|
44 |
+
| country | VARCHAR | Country |
|
45 |
+
| phone | VARCHAR | Phone number |
|
46 |
+
| zip | VARCHAR | Zip code |
|
47 |
+
| industry | VARCHAR | Industry type |
|
48 |
+
| sector | VARCHAR | Business sector |
|
49 |
+
| long_business_summary | VARCHAR | Business summary |
|
50 |
+
| full_time_employees | INTEGER | Number of full-time staff |
|
51 |
+
| report_date | VARCHAR | Data reporting date |
|
52 |
+
|
53 |
+
2. **stock_officers**
|
54 |
+
- **Source:** (`https://finance.yahoo.com/quote/{$symbol}/profile/`)
|
55 |
+
- **Description:** Lists company executives, including their pay and title.
|
56 |
+
- **Columns:**
|
57 |
+
| Column Name | Column Type | Description |
|
58 |
+
|--------------|-------------|--------------------------|
|
59 |
+
| symbol | VARCHAR | Stock ticker symbol |
|
60 |
+
| name | VARCHAR | Executive's name |
|
61 |
+
| title | VARCHAR | Executive's job title |
|
62 |
+
| age | INTEGER | Executive's age |
|
63 |
+
| born | INTEGER | Year of birth |
|
64 |
+
| pay | INTEGER | Wage (USD) |
|
65 |
+
| exercised | INTEGER | Stock options exercised |
|
66 |
+
| unexercised | INTEGER | Unexercised stock options|
|
67 |
+
|
68 |
+
3. **stock_summary**
|
69 |
+
- **Source:** (`https://finance.yahoo.com/quote/${symbol}/key-statistics/`)
|
70 |
+
- **Description:** Provides financial metrics such as market cap, P/E ratios, and EPS.
|
71 |
+
- **Columns:**
|
72 |
+
| Column Name | Column Type | Description |
|
73 |
+
|-----------------------|-----------------|---------------------------------|
|
74 |
+
| symbol | VARCHAR | Stock ticker symbol |
|
75 |
+
| market_cap | DECIMAL(38,2) | Market capitalization (USD) |
|
76 |
+
| enterprise_value | DECIMAL(38,2) | Enterprise value (USD) |
|
77 |
+
| shares_outstanding | DECIMAL(38,2) | Number of outstanding shares |
|
78 |
+
| beta | DECIMAL(38,2) | Beta value |
|
79 |
+
| trailing_pe | DECIMAL(38,2) | Trailing price-to-earnings |
|
80 |
+
| forward_pe | DECIMAL(38,2) | Forward price-to-earnings |
|
81 |
+
| tailing_eps | DECIMAL(38,2) | Trailing EPS |
|
82 |
+
| forward_eps | DECIMAL(38,2) | Forward EPS |
|
83 |
+
| enterprise_to_ebitda | DECIMAL(38,2) | EV/EBITDA |
|
84 |
+
| enterprise_to_revenue | DECIMAL(38,2) | EV/Revenue |
|
85 |
+
| peg_ratio | DECIMAL(38,2) | PEG ratio |
|
86 |
+
| currency | VARCHAR | Currency (e.g., USD) |
|
87 |
+
|
88 |
+
---
|
89 |
+
|
90 |
+
#### Querying Datasets
|
91 |
+
|
92 |
+
Use the following SQL queries in [DuckDB](https://shell.duckdb.org/) to retrieve data for a specific stock (e.g., `TSLA`):
|
93 |
+
|
94 |
+
1. **stock_profile**
|
95 |
+
```sql
|
96 |
+
SELECT * FROM
|
97 |
+
'https://huggingface.co/datasets/bwzheng2010/yahoo-finance-data/resolve/main/stock_profile/stock_profile.parquet'
|
98 |
+
WHERE symbol='TSLA';
|
99 |
+
```
|
100 |
+
|
101 |
+
2. **stock_officers**
|
102 |
+
```sql
|
103 |
+
SELECT * FROM
|
104 |
+
'https://huggingface.co/datasets/bwzheng2010/yahoo-finance-data/resolve/main/stock_officers/stock_officers.parquet'
|
105 |
+
WHERE symbol='TSLA';
|
106 |
+
```
|
107 |
+
|
108 |
+
3. **stock_summary**
|
109 |
+
```sql
|
110 |
+
SELECT * FROM
|
111 |
+
'https://huggingface.co/datasets/bwzheng2010/yahoo-finance-data/resolve/main/stock_summary/stock_summary.parquet'
|
112 |
+
WHERE symbol='TSLA';
|
113 |
+
```
|
114 |
+
|
115 |
|
116 |
### P.S.
|
117 |
|