# ライブラリインストール
import pandas_datareader as pdr
# NASDAQの銘柄リストを取得
nasdaq_list = pdr.nasdaq_trader.get_nasdaq_symbols()
# 銘柄表示
nasdaq_list
Nasdaq Traded | Security Name | Listing Exchange | Market Category | ETF | Round Lot Size | Test Issue | Financial Status | CQS Symbol | NASDAQ Symbol | NextShares | |
---|---|---|---|---|---|---|---|---|---|---|---|
Symbol | |||||||||||
A | True | Agilent Technologies, Inc. Common Stock | N | False | 100.0 | False | NaN | A | A | False | |
AA | True | Alcoa Corporation Common Stock | N | False | 100.0 | False | NaN | AA | AA | False | |
AAA | True | Investment Managers Series Trust II AXS First ... | P | True | 100.0 | False | NaN | AAA | AAA | False | |
AAAU | True | Goldman Sachs Physical Gold ETF Shares | Z | True | 100.0 | False | NaN | AAAU | AAAU | False | |
AAC | True | Ares Acquisition Corporation Class A Ordinary ... | N | False | 100.0 | False | NaN | AAC | AAC | False | |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
ZXYZ.A | True | Nasdaq Symbology Test Common Stock | Q | Q | False | 100.0 | True | N | NaN | ZXYZ.A | False |
ZXZZT | True | NASDAQ TEST STOCK | Q | G | False | 100.0 | True | N | NaN | ZXZZT | False |
ZYME | True | Zymeworks Inc. - Common Stock | Q | Q | False | 100.0 | False | N | NaN | ZYME | False |
ZYNE | True | Zynerba Pharmaceuticals, Inc. - Common Stock | Q | G | False | 100.0 | False | D | NaN | ZYNE | False |
ZYXI | True | Zynex, Inc. - Common Stock | Q | Q | False | 100.0 | False | N | NaN | ZYXI | False |
11708 rows × 11 columns
# 株価情報が取得可能な銘柄のリストを作成
priceable_list = []
for index, columns in nasdaq_list.iterrows():
if columns['ETF'] == False and columns['Test Issue'] == False and columns['Financial Status'] == 'N' and columns['Market Category'] in ['Q', 'G', 'S']:
priceable_list.append(columns['NASDAQ Symbol'])
# 取得したリスト数
len(priceable_list)
4348