You can analyze financial data without having to collect the data by yourself. The datasets are automatically updated daily.
pip3 install FinMind
The full version of this documentation is at https://linsamtw.github.io/FinMindDoc/.
- Change taiwan stock id, delete TWO and TW. ( eg. 2330.TW -> 2330 )
- Optimize speeds of loading TaiwanStockPrice, USStockPrice
- Add DataSource
from FinMind.Data import Load
TaiwanStockFinancialStatements = Load.FinData(dataset = 'FinancialStatements',select = '2330',date = '2018-01-01')
print( TaiwanStockFinancialStatements[:5] )
# transpose
data = Load.transpose(TaiwanStockFinancialStatements)
from FinMind.Data import Load
data = Load.FinData(dataset = 'BalanceSheet',select = ['2330'],date = '2018-01-10')
# or
from FinMind.Data.Load import BalanceSheet
data = BalanceSheet(select = ['2330'],date = '2018-01-10')
from FinMind.Data import Load
data = Load.FinData(dataset = 'TaiwanStockHoldingSharesPer',select = ['2330'],date = '2018-10-10')
# or
from FinMind.Data.Load import TaiwanStockHoldingSharesPer
data = TaiwanStockHoldingSharesPer(select = ['2330'],date = '2018-10-10')
from FinMind.Data import Load
data = Load.FinData(dataset = 'Shareholding',select = ['2330'],date = '2018-10-10')
# or
from FinMind.Data.Load import Shareholding
data = Shareholding(select = ['2330'],date = '2018-10-10')
from FinMind.Data import Load
RawMaterialFuturesPrices_list = Load.FinDataList(dataset = 'RawMaterialFuturesPrices')
data = Load.FinData(dataset = 'RawMaterialFuturesPrices',select = [RawMaterialFuturesPrices_list[3]],date = '2018-10-10')
from FinMind.Data import Load
TaiwanStockInfo = Load.FinData(dataset = 'TaiwanStockInfo')
from FinMind.Data import Load
TaiwanStockInfo = Load.FinData(dataset = 'TaiwanStockInfo')
data = Load.FinData(dataset = 'TaiwanStockPrice',select = TaiwanStockInfo.loc[1000,'stock_id'],date = '2018-10-10')
print( data[:5] )
Open High Low Close Adj_Close Volume date stock_id
0 233.5 233.5 227.0 227.5 227.5 94589657 2018-10-11 2330
1 231.0 237.0 229.0 237.0 237.0 47175769 2018-10-12 2330
2 234.0 234.0 230.5 230.5 230.5 42168280 2018-10-15 2330
3 229.5 237.0 229.0 237.0 237.0 37818077 2018-10-16 2330
4 241.5 243.0 238.0 238.5 238.5 42494858 2018-10-17 2330
from FinMind.Data import Load
TaiwanStockInfo = Load.FinData(dataset = 'TaiwanStockInfo')
data = Load.FinData(dataset = 'FinancialStatements',select = TaiwanStockInfo.loc[1000,'stock_id'],date = '2017-10-10')
from FinMind.Data import Load
TaiwanStockInfo = Load.FinData(dataset = 'TaiwanStockInfo')
data = Load.FinData(dataset = 'TaiwanStockStockDividend',select = TaiwanStockInfo.loc[1000,'stock_id'],date = '2017-10-10')
from FinMind.Data import Load
TaiwanStockInfo = Load.FinData(dataset = 'TaiwanStockInfo')
data = Load.FinData(dataset = 'TaiwanStockMarginPurchaseShortSale',select = TaiwanStockInfo.loc[1000,'stock_id'],date = '2018-10-10')
from FinMind.Data import Load
TaiwanStockInfo = Load.FinData(dataset = 'TaiwanStockInfo')
data = Load.FinData(dataset = 'InstitutionalInvestorsBuySell',select = TaiwanStockInfo.loc[1000,'stock_id'],date = '2018-10-10')
from FinMind.Data import Load
ExchangeRate_list = Load.FinDataList(dataset = 'ExchangeRate')
data = Load.FinData(dataset = 'ExchangeRate',select = ExchangeRate_list[0],date = '2018-10-10')
from FinMind.Data import Load
InterestRate_list = Load.FinDataList(dataset = 'InterestRate')
data = Load.FinData(dataset = 'InterestRate',select = InterestRate_list[0],date = '2018-10-10')
from FinMind.Data import Load
GovernmentBonds_list = Load.FinDataList(dataset = 'GovernmentBonds')
data = Load.FinData(dataset = 'GovernmentBonds',select = GovernmentBonds_list[0],date = '2018-10-10')
from FinMind.Data import Load
data = Load.FinData(dataset = 'GoldPrice',date = '2018-10-10')
from FinMind.Data import Load
CrudeOilPrices_list = Load.FinDataList(dataset = 'CrudeOilPrices')
data = Load.FinData(dataset = 'CrudeOilPrices',select = CrudeOilPrices_list[0],date = '2018-10-10')
For other examples, please refer to demo.
More than 15 kinds of financial data.
- Stock Information
Taiwan
,US
,Japan
,UK
,Europe
- Stock Prices
Taiwan
,US
,Japan
,UK
,Europe
- Financial Statements
Taiwan
,US
- Crude Oil Prices
Brent
,WTI
- Exchange Rates ( vs US )
Canada
,China
,Euro
,Japan
,Taiwan
,UK
- Interest Rate
BCB
,BOC
,BOE
,BOJ
,CBR
,ECB
,FED
,PBOC
,PBOC
,RBI
,RBA
,RBNZ
,SNB
- Government Bonds
Canada
,China
,France
,Germany
,Italy
,Japan
,Russia
,United Kingdom
,United States
- Energy Futures Prices
BrentOilFutures
,CarbonEmissionsFutures
,CrudeOilWTIFutures
,GasolineRBOBFutures
,HeatingOilFutures
,LondonGasOilFutures
,NaturalGasFutures
, - Raw Material Futures Prices
meats
,grains
,energies
,softs
,metals
- Taiwan Stock Stock Dividend
- Taiwan Stock Balance Sheet
- Taiwan Stock Holding Shares Per
- Taiwan Stock Shareholding
- Taiwan Stock Institutional Investors Buy and Sell
- Taiwan Stock Margin Purchase Short Sale
- Gold Price
At least five kinds of visualization tools for every data type. ( In development )
股價、交易量、金價、油價
email : linsam.tw.github@gmail.com