Skip to content

Commit 504f03b

Browse files
finance_demo_newapi
1 parent 0c27d11 commit 504f03b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import pandas as pd
2+
from pandas.plotting import register_matplotlib_converters
3+
register_matplotlib_converters()
4+
import os.path
5+
6+
import mplfinance as mpf
7+
8+
date1 = "2004-2-1"
9+
date2 = "2004-4-12"
10+
11+
infile = os.path.join('data','yahoofinance-INTC-19950101-20040412.csv')
12+
quotes = pd.read_csv(infile, index_col=0, parse_dates=True, infer_datetime_format=True)
13+
14+
# select desired range of dates
15+
quotes = quotes[(quotes.index >= date1) & (quotes.index <= date2)]
16+
17+
mpf.plot(quotes,type='candle',style='checkers')

0 commit comments

Comments
 (0)