Giter Site home page Giter Site logo

cowrchen / finmind Goto Github PK

View Code? Open in Web Editor NEW

This project forked from finmind/finmind

0.0 1.0 0.0 1.05 MB

Open Data, more than 50 financial data. 提供超過 50 個金融資料,每天更新

Home Page: http://finmindtrade.com/

License: Apache License 2.0

Python 51.88% Jupyter Notebook 48.12%

finmind's Introduction

Build Status license PyPI version Documentation Status

這是什麼?

FinMind 是超過 50 種金融開源數據 50 datasets。 包含

台股股價 daily、台股5秒交易資料 ( 2019-05-29 ~ now, 共超過 3 千萬筆 )、財報、資產負債表、股利配息、現金流量表、月營收、外資持股、股權分散表、融資融券、三大法人買賣,台股期貨、選擇權交易明細、還原股價。

美股股價 daily、minute ( 2019-06-01 ~ now, 共超過 8 千萬筆 ),G7 匯率、利率。
國際原油價格、黃金價格,美債殖利率。

資料每天更新。你不需收集資料,就可進行分析。

What is it?

FinMind is open source of more than 50 datasets , contain

Taiwan stock trade data daily, Taiwan stock trade data (5 seconds) ( 2019-05-29 ~ now, total more than 30 million data ), Financial Statements, Balance Sheet, Cash Flows Statement, Month Revenue, Holding Shares Per, Institutional Investors Buy Sell. Taiwan Futures Trade Detail, Taiwan Option Trade Detail.

US stock price daily, minute ( 2019-06-01 ~ now, total more than 80 million data ), oil price, gold price, G7 exchange rate, interest rate.
US Government Bonds Yield.

The datasets are automatically updated daily. You can analyze financial data without having to collect the data by yourself.

 pip3 install FinMind

Open Data Api
回測
Website

回測 backtesting

回測 backtesting

上傳自己設計的策略,進行線上模擬
券商交易功能(開發中),未來,使用者只需專注在策略開發上,即可利用選定策略、個股,進行自動化交易。

Api

  • Python document

    import requests
    url = 'http://finmindapi.servebeer.com/api/data'
    form_data = {'dataset':'TaiwanStockInfo'}
    res = requests.post(url,verify = True,data = form_data)
    
    url = 'http://finmindapi.servebeer.com/api/data'
    form_data = {'dataset':'TaiwanStockPrice','stock_id':'2317','date':'2019-06-01'}
    res = requests.post(url,verify = True,data = form_data)
    
    temp = res.json()
    data = pd.DataFrame(temp['data'])
    data.head()
    
  • R document

    library(httr) 
    library(jsonlite)
    library('data.table')
    library(dplyr)
    
    url = 'http://finmindapi.servebeer.com/api/data'
    
    # TaiwanStockInfo
    payload<-list( 'dataset' = 'TaiwanStockInfo')
    
    response = POST(url,body = payload,encode="json")
    data = response %>% content 
    data = do.call('cbind',data$data) %>%data.table
    head(data)	
    

note : 限制 request 上限 : 600 / hour。Limit amount of request, 600 / hour.
官網註冊後,request api 帶 user_id, password 參數,使用上限可提高到 1500/hr。
user_id, password 參數使用方法,可參考線上 api

translation 中英對照

import requests
url = 'http://finmindapi.servebeer.com/api/translation'
dataset = 'RawMaterialFuturesPrices'
# or 
# dataset = 'FinancialStatements'
# dataset = 'BalanceSheet'
# dataset = 'StockDividend'
# dataset = 'TaiwanStockMarginPurchaseShortSale'
# dataset = 'InstitutionalInvestorsBuySell'
parameter = {'dataset':dataset}

res = requests.post(url,verify = True,data = parameter)
#res.text
data = res.json()
data = pd.DataFrame( data['data'] )

爬蟲 Crawler

由於原物料、債券期貨資料,有法規問題,禁止散布,因此我公開爬蟲 code,並簡化不到 5 行 code,各位自行爬蟲,就不是從我這獲得資料,不會有散布問題。
demo.py

資料 Data

  • FinMind.Data

  • 50 data sets

  • Variable Document

    from FinMind.Data import Load
    TaiwanStockInfo = Load.FinData(dataset = 'TaiwanStockInfo')
    data = Load.FinData(dataset = 'TaiwanStockPrice',select = '2317',
    				date = '2018-10-10')
    

分析 Analysis

Document

HistoryUpdate

Web

https://finmindtrade.com/

PPT

https://www.slideshare.net/ssusera12be6/finmind-project-demo-199815617

Solicit partners who are interested in joint development.
徵求有興趣共同開發的夥伴。
email : [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.