Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

金融系ライブラリ

データ取得

yfinance

yfinance · PyPI

import yfinance as yf
sp500 = yf.Ticker("^GSPC").history(start="2010-01-01")

データ可視化

mplfinance

matplotlib/mplfinance: Financial Markets Data Visualization using Matplotlib

# ローソク足+移動平均+Volume
mpf.plot(daily,type='candle',mav=(3,6,9),volume=True)

plotly

ローソク足を描くだけならできる

Candlestick charts in Python

テクニカル指標

ポートフォリオ最適化

PyPortfolioOpt

Installation — PyPortfolioOpt 1.5.4 documentation

Testing(バックテスト等)