FinMind
Open Data, more than 50 financial data. 提供超過 50 個金融資料(台股為主),每天更新 https://finmind.github.io/
Top Related Projects
A curated list of insanely awesome libraries, packages and resources for Quants (Quantitative Finance)
A curated list of practical financial machine learning tools and applications.
Qlib is an AI-oriented quantitative investment platform that aims to realize the potential, empower research, and create value using AI technologies in quantitative investment, from exploring ideas to implementing productions. Qlib supports diverse machine learning modeling paradigms. including supervised learning, market dynamics modeling, and RL.
Download market data from Yahoo! Finance's API
Quick Overview
FinMind is an open-source Python library that provides access to various financial data sources, including stock prices, fundamental data, and economic indicators. It aims to simplify the process of obtaining and analyzing financial data for researchers, traders, and data scientists.
Pros
- Comprehensive data coverage across multiple markets and asset classes
- Easy-to-use API with consistent data formats
- Regular updates and maintenance by an active community
- Supports both historical and real-time data retrieval
Cons
- May require API keys for certain data sources
- Documentation could be more extensive for advanced use cases
- Limited support for non-Python users
- Some data sources may have usage limitations or restrictions
Code Examples
Fetching stock price data:
from FinMind.data import DataLoader
api = DataLoader()
df = api.taiwan_stock_daily(
stock_id="2330",
start_date="2023-01-01",
end_date="2023-04-30"
)
print(df.head())
Retrieving fundamental data:
from FinMind.data import DataLoader
api = DataLoader()
df = api.fundamental_fundamental_features(
stock_id="2330",
start_date="2023-01-01",
end_date="2023-04-30"
)
print(df.head())
Accessing economic indicators:
from FinMind.data import DataLoader
api = DataLoader()
df = api.taiwan_economic_indicator(
indicator="GDP",
start_date="2023-01-01",
end_date="2023-04-30"
)
print(df.head())
Getting Started
To get started with FinMind, follow these steps:
-
Install the library:
pip install FinMind
-
Import the DataLoader and create an instance:
from FinMind.data import DataLoader api = DataLoader()
-
Use the API to fetch data:
df = api.taiwan_stock_daily( stock_id="2330", start_date="2023-01-01", end_date="2023-04-30" ) print(df.head())
For more detailed information and advanced usage, refer to the official documentation on the FinMind GitHub repository.
Competitor Comparisons
A curated list of insanely awesome libraries, packages and resources for Quants (Quantitative Finance)
Pros of awesome-quant
- Comprehensive curated list of resources for quantitative finance
- Covers a wide range of topics including data sources, libraries, and tools
- Community-driven with contributions from various experts in the field
Cons of awesome-quant
- Not a standalone library or tool, primarily a collection of links
- Requires users to explore and evaluate individual resources
- May include outdated or deprecated tools without regular maintenance
Code comparison
FinMind provides a Python library for data retrieval:
from FinMind.data import DataLoader
dl = DataLoader()
data = dl.taiwan_stock_daily(
stock_id="2330",
start_date="2020-01-01",
end_date="2020-01-10"
)
awesome-quant doesn't provide direct code examples but lists libraries like:
import pandas_datareader as pdr
import yfinance as yf
import quandl
Summary
FinMind is a dedicated financial data API and analysis tool, while awesome-quant serves as a comprehensive resource list for quantitative finance. FinMind offers a more focused approach with its own data retrieval system, whereas awesome-quant provides a broader overview of available tools and resources in the field. The choice between them depends on whether you need a specific data solution (FinMind) or a starting point for exploring various quantitative finance resources (awesome-quant).
A curated list of practical financial machine learning tools and applications.
Pros of financial-machine-learning
- More comprehensive coverage of machine learning techniques in finance
- Includes advanced topics like reinforcement learning and natural language processing
- Provides more in-depth explanations and theoretical background
Cons of financial-machine-learning
- Less focus on data acquisition and preprocessing
- May be more challenging for beginners to understand and implement
- Fewer ready-to-use tools and functions compared to FinMind
Code Comparison
FinMind example:
from FinMind.data import DataLoader
dl = DataLoader()
data = dl.taiwan_stock_daily(
stock_id="2330",
start_date="2020-01-01",
end_date="2020-12-31"
)
financial-machine-learning example:
import pandas as pd
from sklearn.ensemble import RandomForestRegressor
X = pd.read_csv('features.csv')
y = pd.read_csv('target.csv')
model = RandomForestRegressor()
model.fit(X, y)
The FinMind example focuses on data retrieval, while the financial-machine-learning example demonstrates model implementation. FinMind provides easier access to financial data, whereas financial-machine-learning emphasizes advanced modeling techniques.
Qlib is an AI-oriented quantitative investment platform that aims to realize the potential, empower research, and create value using AI technologies in quantitative investment, from exploring ideas to implementing productions. Qlib supports diverse machine learning modeling paradigms. including supervised learning, market dynamics modeling, and RL.
Pros of qlib
- More comprehensive and advanced quantitative investment platform
- Stronger focus on AI-driven strategies and model training
- Larger community and more frequent updates
Cons of qlib
- Steeper learning curve for beginners
- More complex setup and configuration
- Primarily focused on Chinese stock market data
Code Comparison
FinMind example:
from FinMind.data import DataLoader
dl = DataLoader()
df = dl.taiwan_stock_daily(
stock_id="2330",
start_date="2020-01-01",
end_date="2020-12-31"
)
qlib example:
import qlib
from qlib.data import D
qlib.init()
df = D.features(
["sh000300"],
["$close", "$volume"],
start_time="2020-01-01",
end_time="2020-12-31"
)
Both libraries provide easy access to financial data, but qlib offers more advanced features for quantitative analysis and model development. FinMind is more straightforward for basic data retrieval, especially for Taiwanese markets, while qlib is better suited for complex quantitative research and strategy development, with a focus on the Chinese market.
Download market data from Yahoo! Finance's API
Pros of yfinance
- Lightweight and easy to use, focusing specifically on Yahoo Finance data
- Supports real-time and historical data retrieval
- Actively maintained with frequent updates
Cons of yfinance
- Limited to Yahoo Finance as a data source
- May experience occasional issues due to changes in Yahoo Finance's API
- Less comprehensive in terms of data types and analysis tools
Code Comparison
FinMind example:
from FinMind.data import DataLoader
dl = DataLoader()
df = dl.taiwan_stock_daily(
stock_id="2330",
start_date="2020-01-01",
end_date="2020-12-31"
)
yfinance example:
import yfinance as yf
ticker = yf.Ticker("AAPL")
df = ticker.history(start="2020-01-01", end="2020-12-31")
Both libraries offer straightforward ways to fetch stock data, but FinMind provides more specific functions for different markets and data types, while yfinance focuses on a simpler, more general approach using Yahoo Finance data.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Donate
Quickstart
pip install FinMind
- Refer to our Official Documentation.
鿝ä»éº¼?
FinMind æ¯è¶ é 50 種éèéæºæ¸æ 50 datasetsã å å«
- æè¡é¢ : å°è¡è¡å¹ dailyãå³æå ±å¹ãæ·å² tickãPERãPBRãæ¯5ç§å§è¨æäº¤çµ±è¨ãå æ¬ææ¸ãç¶æ¥æ²é·äº¤ææ¨çåæäº¤éå¼ã
- åºæ¬é¢ : ç¶åæç表ãç¾éæµé表ãè³ç¢è² åµè¡¨ãè¡å©æ¿ç表ã餿¬é¤æ¯çµæè¡¨ãæçæ¶ã
- ç±ç¢¼é¢ : å¤è³æè¡ãè¡æ¬åæ£è¡¨ãèè³èå¸ãä¸å¤§æ³äººè²·è³£ãåå¸æäº¤æç´°ã
- æ¶æ¯é¢ : å°è¡ç¸éæ°èã
- è¡çæ§åå : æè²¨ãé¸ææ¬ daily dataãå³æå ±å¹ã交ææç´°ï¼é¸ææ¬ãæè²¨ä¸å¤§æ³äººè²·è³£ï¼æè²¨åå·åæ¯æ¥äº¤æã鏿æ¬åå·åæ¯æ¥äº¤æã
- åéå¸å ´ : ç¾è¡è¡å¹ dailyãminuteãç¾ååµå¸æ®å©çã貨幣ç¼è¡é(ç¾å)ãé»é广 ¼ãåæ²¹å¹æ ¼ãG8 央è¡å©çãG8 å¯çã
è³ææ¯å¤©æ´æ°ãä½ ä¸éæ¶éè³æï¼å°±å¯é²è¡åæã
What is this?
FinMind is open source of more than 50 datasets, including
Taiwan stock trade data daily, Taiwan stock trade data (5 seconds) (2019-05-29 ~ now, more than 30 million data in total), 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, more than 80 million data in total), 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.
License
-
æ¬å°æ¡æä¾çææå §å®¹åç¨æ¼æè²ãé忥ç¨éãè³æå ä¾åèï¼ä½¿ç¨è 便¬è³æäº¤æç¼ç交ææå¤±éèªè¡è² è²¬ï¼æ¬å°æ¡ä¸å°è³æå §å®¹é¯èª¤ãæ´æ°å»¶èª¤æå³è¼¸ä¸æ·è² ä»»ä½è²¬ä»»ã
Project of Contents
-
Dataset
-
Example
-
Other
Plotting
kbar_plotting.ipynb
# åå¾è¡å¹
from FinMind.data import DataLoader
dl = DataLoader()
# ä¸è¼å°è¡è¡å¹è³æ
stock_data = dl.taiwan_stock_daily(
stock_id='2609', start_date='2018-01-01', end_date='2021-06-26'
)
# ä¸è¼ä¸å¤§æ³äººè³æ
stock_data = dl.feature.add_kline_institutional_investors(
stock_data
)
# ä¸è¼èè³å¸è³æ
stock_data = dl.feature.add_kline_margin_purchase_short_sale(
stock_data
)
# 繪製kç·å
from FinMind import plotting
plotting.kline(stock_data)
dashboard
Contact
Email: FinMind.TW@gmail.com
æ¯é±æ¥æ©ä¸é¶é»è³æ©ä¸ä¸é»çºç¶è·æéï¼ä¸æä¾æåã
Note
- æªä¾é è¨æ°å¢æ´å¤åè½ï¼å å«å人å忏¬åæãchatbot ç£æ§çç¥ï¼
- API Request ä¸éï¼300 / å°æã
- Limit amount of request, 300 / hour.
- è³FinMindå®ç¶²è¨»å並é©èä¿¡ç®±å¾ï¼API ç Request å ä¸
token
忏å¯ä»¥æé«ä½¿ç¨ä¸éå° 600/hrã token
ç²åæ¹æ³ï¼å¯å¨å®ç¶²ç»å ¥å¾ç²åã
Top Related Projects
A curated list of insanely awesome libraries, packages and resources for Quants (Quantitative Finance)
A curated list of practical financial machine learning tools and applications.
Qlib is an AI-oriented quantitative investment platform that aims to realize the potential, empower research, and create value using AI technologies in quantitative investment, from exploring ideas to implementing productions. Qlib supports diverse machine learning modeling paradigms. including supervised learning, market dynamics modeling, and RL.
Download market data from Yahoo! Finance's API
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot