Project description
mplfinance
matplotlib utilities for the visualization, and visual analysis, of financial data
Installation
pip install --upgrade mplfinance
- mplfinance requires matplotlib and pandas
⇾ Latest Release Information ⇽
Contents and Tutorials
- The New API
- Tutorials
- Basic Usage
- Customizing the Appearance of Plots (New features: June 2020)
- Adding Your Own Technical Studies to Plots
- Subplots: Multiple Plots on a Single Figure (New features: August 2020)
- Price-Movement Plots (Renko, P&F, etc)
- Trends, Support, Resistance, and Trading Lines
- Saving the Plot to a File
- Animation/Updating your plots in realtime (New: August 2020)
- ⇾ Latest Release Info ⇽
- Some Background History About This Package
- Old API Availability
The New API
This repository, matplotlib/mplfinance
, contains a new matplotlib finance API that makes it easier to create financial plots. It interfaces nicely with Pandas DataFrames.
More importantly, the new API automatically does the extra matplotlib work that the user previously had to do "manually" with the old API. (The old API is still available within this package; see below).
The conventional way to import the new API is as follows:
import mplfinance as mpf
The most common usage is then to call
mpf.plot(data)
where data
is a Pandas DataFrame
object containing Open, High, Low and Close data, with a Pandas DatetimeIndex
.
Details on how to call the new API can be found below under Basic Usage, as well as in the jupyter notebooks in the examples folder.
I am very interested to hear from you regarding what you think of the new mplfinance
, plus any suggestions you may have for improvement. You can reach me at dgoldfarb.github@gmail.com or, if you prefer, provide feedback or a ask question on our issues page.
Basic Usage
Start with a Pandas DataFrame containing OHLC data. For example,
import pandas as pd
daily = pd.read_csv('examples/data/SP500_NOV2019_Hist.csv',index_col=0,parse_dates=True)
daily.index.name = 'Date'
daily.shape
daily.head(3)
daily.tail(3)
(20, 5)
Project description
mplfinancematplotlib utilities for the visualization, and visual analysis, of financial data Installation
⇾ Latest Release Information ⇽Contents and Tutorials
|
---|