FinMind:使用Python查全球股價、債券、原油價格

Yanwei Liu
2 min readFeb 23, 2019

台灣股價,財報,歷年配息,融資融券,外資買賣

from FinMind.Mining import Mind

_2330 = Mind.Stock('2330','2019-01-01')
print(_2330.StockPrice)
_2330.FinancialStatements
_2330.ShareHolding
_2330.InstitutionalInvestors
_2330.MarginPurchaseShortSale
_2330.MonthRevenue
_2330.HoldingSharesPer
_2330.BalanceSheet

_2330.StockPrice['move_average'] = Mind.MoveAverage( _2330.StockPrice,days = 5,variable = 'close')
_2330.StockPrice['RSV'] = Mind.RSV(_2330.StockPrice,days = 5)
_2330.StockPrice['BIAS'] = Mind.BIAS(_2330.StockPrice,days = 5)

各國匯率

data = Load.FinData(dataset = 'ExchangeRate',select = ['Japan'],date = '2019-02-21')

各國央行利率

data = Load.FinData(dataset = 'InterestRate',select = ['ECB'],date = '2018-10-10')

各國債券

data = Load.FinData(dataset = 'Governmentbond',select = ['Canada 2-Month'],date = '2018-10-10')

金價

data = Load.FinData(dataset = 'GoldPrice',date = '2019-02-21')

油價

data = Load.FinData(dataset = 'CrudeOilPrices',select = ['Brent'],date = '2019-01-01')

For other examples, please refer to demo.

Financial Data

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 : Central Bank of Brazil
  • BOC : Bank of Canada
  • BOE : Bank of England
  • BOJ : Bank of Japan
  • CBR : Central Bank of the Russian Federation
  • ECB : European Central Bank
  • FED : Federal Reserve
  • PBOC : People’s Bank of China
  • RBA : Reserve Bank of Australia
  • RBI : Reserve Bank of India
  • RBNZ : Reserve Bank of New Zealand
  • SNB : Swiss National Bank

Government Bonds

  • Canada : 1-Month ~ 30-Year
  • China : 1-Year ~ 30-Year
  • France : 1-Month ~ 50-Year
  • Germany : 3-Month ~ 30-Year
  • Italy : 1-Month ~ 50-Year
  • Japan : 1-Month ~ 40-Year
  • Russia : 1-Week ~ 20-Year
  • United Kingdom : 1-Month ~ 50-Year
  • United States : 1-Month ~ 30-Year

Energy Futures Prices

  • BrentOilFutures
  • CarbonEmissionsFutures
  • CrudeOilWTIFutures
  • GasolineRBOBFutures
  • HeatingOilFutures
  • LondonGasOilFutures
  • NaturalGasFutures

Taiwan Stock Stock Dividend

Taiwan Stock Institutional Investors Buy and Sell

Taiwan Stock Margin Purchase Short Sale

Gold Price

--

--