Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@NehaKoppikar
Created January 17, 2021 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NehaKoppikar/40324a7fc1fd7a06bd06d4fab6a78fd7 to your computer and use it in GitHub Desktop.
Save NehaKoppikar/40324a7fc1fd7a06bd06d4fab6a78fd7 to your computer and use it in GitHub Desktop.
Finace_Dash_App
import dash
import dash_auth
import dash_core_components as dcc
import dash_html_components as html
#import dash_enterprise_auth as auth
from dash.dependencies import Input, Output
import plotly.express as px
import pandas as pd
# Keep this out of source code repository - save in a file or a database
VALID_USERNAME_PASSWORD_PAIRS = {
'hello': 'world'
}
df = pd.read_csv("data.csv")
app = dash.Dash(__name__)
auth = dash_auth.BasicAuth(
app,
VALID_USERNAME_PASSWORD_PAIRS
)
server = app.server
app.title = "Visualizing Finance Data"
app.layout = html.Div([
dcc.Dropdown(
id="ticker",
options=[{"label": x, "value": x}
for x in df.columns[1:]],
value=df.columns[1],
clearable=False,
),
dcc.Graph(id="time-series-chart"),
html.Div(
dcc.Markdown("*Hello! You are looking at INPX Stock Prices from January 1, 2020 to January 15 2021. This is data has been collected from Yahoo Finace's Website. Feel free to watch the different versions of prices by using the DropDown Option above. Thanks!*")
)
])
# # For downloading the data in CSV format
# html.Div([
# dash_table.DataTable(
# id='table',
# columns=[{"name": i, "id": i} for i in df.columns],
# data=df.to_dict('records'),
# export_format='xlsx',
# export_headers='display',
# merge_duplicate_headers=True,
# page_current=0,
# page_size=10
# )]),
@app.callback(
Output("time-series-chart", "figure"),
[Input("ticker", "value")])
def display_time_series(ticker):
fig = px.line(df, x='Date', y=ticker)
return fig
app.run_server(debug=True)
Date High Low Open Close Volume Adj Close
2019-12-31 5.625 4.320000171661377 5.21999979019165 4.90500020980835 4121733.0 4.90500020980835
2020-01-02 17.549999237060547 6.389999866485596 6.929999828338623 14.805000305175781 10804318.0 14.805000305175781
2020-01-03 29.25 17.81999969482422 22.68000030517578 20.475000381469727 7453189.0 20.475000381469727
2020-01-06 24.704999923706055 7.289999961853027 24.2549991607666 9.180000305175781 7112538.0 9.180000305175781
2020-01-07 9.579999923706055 6.519999980926514 6.949999809265137 6.809999942779541 3568500.0 6.809999942779541
2020-01-08 6.409999847412109 5.230000019073486 6.239999771118164 5.480000019073486 2798300.0 5.480000019073486
2020-01-09 5.900000095367432 5.107999801635742 5.739999771118164 5.150000095367432 1343700.0 5.150000095367432
2020-01-10 5.170000076293945 3.7899999618530273 5.119999885559082 4.050000190734863 2821100.0 4.050000190734863
2020-01-13 4.03000020980835 3.5 3.6700000762939453 3.6500000953674316 1536800.0 3.6500000953674316
2020-01-14 6.090000152587891 3.8499999046325684 3.9200000762939453 5.650000095367432 22033000.0 5.650000095367432
2020-01-15 5.199999809265137 3.940000057220459 4.960000038146973 4.050000190734863 4872700.0 4.050000190734863
2020-01-16 4.860000133514404 4.119999885559082 4.349999904632568 4.409999847412109 2698900.0 4.409999847412109
2020-01-17 4.380000114440918 4.019999980926514 4.349999904632568 4.110000133514404 1462200.0 4.110000133514404
2020-01-21 4.269999980926514 3.8299999237060547 4.090000152587891 3.880000114440918 1373300.0 3.880000114440918
2020-01-22 4.21999979019165 3.7699999809265137 4.050000190734863 4.090000152587891 1458000.0 4.090000152587891
2020-01-23 4.058000087738037 3.9000000953674316 4.0 4.03000020980835 527800.0 4.03000020980835
2020-01-24 4.0 3.819999933242798 3.990000009536743 3.8499999046325684 553800.0 3.8499999046325684
2020-01-27 3.7899999618530273 3.5 3.759999990463257 3.5999999046325684 651600.0 3.5999999046325684
2020-01-28 3.7300000190734863 3.421999931335449 3.7300000190734863 3.5999999046325684 507900.0 3.5999999046325684
2020-01-29 3.6500000953674316 3.309000015258789 3.5899999141693115 3.359999895095825 513000.0 3.359999895095825
2020-01-30 3.4200000762939453 3.009999990463257 3.3499999046325684 3.049999952316284 504600.0 3.049999952316284
2020-01-31 3.200000047683716 2.880000114440918 3.1500000953674316 2.9100000858306885 423400.0 2.9100000858306885
2020-02-03 2.9000000953674316 2.609999895095825 2.869999885559082 2.819999933242798 612500.0 2.819999933242798
2020-02-04 3.4600000381469727 2.8299999237060547 3.059999942779541 3.140000104904175 1066200.0 3.140000104904175
2020-02-05 3.2799999713897705 2.950000047683716 3.0999999046325684 3.069999933242798 354600.0 3.069999933242798
2020-02-06 3.9800000190734863 3.0999999046325684 3.299999952316284 3.2899999618530273 4614800.0 3.2899999618530273
2020-02-07 3.2790000438690186 2.950000047683716 3.059999942779541 2.9649999141693115 814400.0 2.9649999141693115
2020-02-10 3.0899999141693115 2.869999885559082 2.880000114440918 2.9800000190734863 332600.0 2.9800000190734863
2020-02-11 2.9649999141693115 2.7100000381469727 2.950000047683716 2.799999952316284 731200.0 2.799999952316284
2020-02-12 2.9000000953674316 2.7100000381469727 2.7799999713897705 2.8399999141693115 314400.0 2.8399999141693115
2020-02-13 2.8519999980926514 2.549999952316284 2.759999990463257 2.5899999141693115 564900.0 2.5899999141693115
2020-02-14 2.609999895095825 2.4200000762939453 2.5899999141693115 2.430000066757202 611800.0 2.430000066757202
2020-02-18 2.6600000858306885 2.2899999618530273 2.3399999141693115 2.4600000381469727 693400.0 2.4600000381469727
2020-02-19 2.5899999141693115 2.4200000762939453 2.4200000762939453 2.549999952316284 237800.0 2.549999952316284
2020-02-20 2.6700000762939453 2.450000047683716 2.4800000190734863 2.630000114440918 529300.0 2.630000114440918
2020-02-21 3.2300000190734863 2.809999942779541 2.9100000858306885 2.8399999141693115 2443900.0 2.8399999141693115
2020-02-24 2.755000114440918 2.5199999809265137 2.5299999713897705 2.630000114440918 413000.0 2.630000114440918
2020-02-25 2.640000104904175 2.4000000953674316 2.5399999618530273 2.4000000953674316 349400.0 2.4000000953674316
2020-02-26 2.5 2.3299999237060547 2.4000000953674316 2.390000104904175 244200.0 2.390000104904175
2020-02-27 2.299999952316284 2.119999885559082 2.299999952316284 2.190000057220459 275300.0 2.190000057220459
2020-02-28 2.1500000953674316 2.009999990463257 2.0299999713897705 2.0999999046325684 342500.0 2.0999999046325684
2020-03-02 2.259999990463257 2.0199999809265137 2.130000114440918 2.240000009536743 314800.0 2.240000009536743
2020-03-03 2.25 2.069999933242798 2.200000047683716 2.1700000762939453 330100.0 2.1700000762939453
2020-03-04 2.700000047683716 2.2100000381469727 2.390000104904175 2.549999952316284 1212900.0 2.549999952316284
2020-03-05 2.450000047683716 2.259999990463257 2.319999933242798 2.309999942779541 327500.0 2.309999942779541
2020-03-06 2.2899999618530273 2.059999942779541 2.240000009536743 2.0999999046325684 282400.0 2.0999999046325684
2020-03-09 1.9789999723434448 1.805999994277954 1.8600000143051147 1.840000033378601 294900.0 1.840000033378601
2020-03-10 2.140000104904175 1.7999999523162842 2.0199999809265137 1.840000033378601 226800.0 1.840000033378601
2020-03-11 2.2799999713897705 1.7599999904632568 2.0799999237060547 1.7999999523162842 1082700.0 1.7999999523162842
2020-03-12 1.5399999618530273 1.399999976158142 1.4199999570846558 1.4500000476837158 846700.0 1.4500000476837158
2020-03-13 1.4900000095367432 1.2000000476837158 1.4900000095367432 1.2999999523162842 507000.0 1.2999999523162842
2020-03-16 1.440000057220459 1.149999976158142 1.2999999523162842 1.2200000286102295 511000.0 1.2200000286102295
2020-03-17 1.2699999809265137 1.100000023841858 1.25 1.2300000190734863 211800.0 1.2300000190734863
2020-03-18 1.371999979019165 1.059999942779541 1.2300000190734863 1.1200000047683716 247900.0 1.1200000047683716
2020-03-19 1.25 1.1200000047683716 1.149999976158142 1.2100000381469727 188400.0 1.2100000381469727
2020-03-20 1.340000033378601 1.149999976158142 1.340000033378601 1.1799999475479126 175000.0 1.1799999475479126
2020-03-23 1.25 1.0800000429153442 1.2300000190734863 1.1299999952316284 315500.0 1.1299999952316284
2020-03-24 1.9199999570846558 1.149999976158142 1.2000000476837158 1.3700000047683716 5111100.0 1.3700000047683716
2020-03-25 1.3200000524520874 1.1100000143051147 1.2799999713897705 1.2000000476837158 1125000.0 1.2000000476837158
2020-03-26 1.4600000381469727 1.159999966621399 1.2300000190734863 1.2000000476837158 2476400.0 1.2000000476837158
2020-03-27 1.2899999618530273 1.159999966621399 1.2200000286102295 1.190000057220459 1233500.0 1.190000057220459
2020-03-30 1.340000033378601 1.159999966621399 1.2300000190734863 1.1699999570846558 2455700.0 1.1699999570846558
2020-03-31 1.2100000381469727 1.1100000143051147 1.1799999475479126 1.190000057220459 1382700.0 1.190000057220459
2020-04-01 1.2300000190734863 1.1100000143051147 1.1799999475479126 1.149999976158142 1486100.0 1.149999976158142
2020-04-02 1.2000000476837158 1.0700000524520874 1.159999966621399 1.1299999952316284 1311800.0 1.1299999952316284
2020-04-03 1.1299999952316284 1.0399999618530273 1.100000023841858 1.059999942779541 1250000.0 1.059999942779541
2020-04-06 1.159999966621399 1.0800000429153442 1.090000033378601 1.159999966621399 1167500.0 1.159999966621399
2020-04-07 1.3200000524520874 1.1399999856948853 1.1799999475479126 1.2899999618530273 5944600.0 1.2899999618530273
2020-04-08 1.309999942779541 1.0700000524520874 1.2999999523162842 1.159999966621399 4736200.0 1.159999966621399
2020-04-09 1.149999976158142 1.0800000429153442 1.1299999952316284 1.090000033378601 1881000.0 1.090000033378601
2020-04-13 1.149999976158142 1.059999942779541 1.1399999856948853 1.1200000047683716 2097700.0 1.1200000047683716
2020-04-14 1.1399999856948853 1.090000033378601 1.1399999856948853 1.1100000143051147 1135500.0 1.1100000143051147
2020-04-15 1.159999966621399 1.0800000429153442 1.149999976158142 1.1200000047683716 3241600.0 1.1200000047683716
2020-04-16 1.190000057220459 1.059999942779541 1.100000023841858 1.159999966621399 3370300.0 1.159999966621399
2020-04-17 1.159999966621399 1.100000023841858 1.159999966621399 1.1299999952316284 1431700.0 1.1299999952316284
2020-04-20 1.1799999475479126 1.0800000429153442 1.149999976158142 1.100000023841858 2152700.0 1.100000023841858
2020-04-21 1.350000023841858 1.0800000429153442 1.159999966621399 1.100000023841858 9933600.0 1.100000023841858
2020-04-22 1.1799999475479126 1.090000033378601 1.1299999952316284 1.149999976158142 5514500.0 1.149999976158142
2020-04-23 1.1799999475479126 1.100000023841858 1.159999966621399 1.149999976158142 3222000.0 1.149999976158142
2020-04-24 1.1799999475479126 1.1100000143051147 1.149999976158142 1.149999976158142 3302500.0 1.149999976158142
2020-04-27 1.2400000095367432 1.1200000047683716 1.1799999475479126 1.1399999856948853 5215500.0 1.1399999856948853
2020-04-28 1.1799999475479126 1.1100000143051147 1.149999976158142 1.1299999952316284 4120600.0 1.1299999952316284
2020-04-29 1.149999976158142 1.1100000143051147 1.1299999952316284 1.1299999952316284 4974700.0 1.1299999952316284
2020-04-30 1.159999966621399 1.1100000143051147 1.149999976158142 1.1399999856948853 5864100.0 1.1399999856948853
2020-05-01 1.149999976158142 1.100000023841858 1.149999976158142 1.1200000047683716 3036700.0 1.1200000047683716
2020-05-04 1.1399999856948853 1.0099999904632568 1.1200000047683716 1.1299999952316284 2663100.0 1.1299999952316284
2020-05-05 1.1299999952316284 1.090000033378601 1.1299999952316284 1.100000023841858 1764400.0 1.100000023841858
2020-05-06 1.1100000143051147 1.0800000429153442 1.100000023841858 1.100000023841858 1205600.0 1.100000023841858
2020-05-07 1.25 1.0800000429153442 1.100000023841858 1.1200000047683716 10095300.0 1.1200000047683716
2020-05-08 1.1200000047683716 1.0800000429153442 1.100000023841858 1.100000023841858 2749500.0 1.100000023841858
2020-05-11 1.190000057220459 1.059999942779541 1.1100000143051147 1.1200000047683716 6197100.0 1.1200000047683716
2020-05-12 1.440000057220459 1.1299999952316284 1.2899999618530273 1.2400000095367432 26776800.0 1.2400000095367432
2020-05-13 1.2599999904632568 1.0800000429153442 1.2599999904632568 1.1399999856948853 4915300.0 1.1399999856948853
2020-05-14 1.3799999952316284 1.100000023841858 1.1299999952316284 1.2000000476837158 17628500.0 1.2000000476837158
2020-05-15 1.2400000095367432 1.149999976158142 1.2300000190734863 1.1699999570846558 4602500.0 1.1699999570846558
2020-05-18 1.3200000524520874 1.1699999570846558 1.1699999570846558 1.190000057220459 14431700.0 1.190000057220459
2020-05-19 1.4199999570846558 1.2300000190734863 1.2899999618530273 1.2899999618530273 22406600.0 1.2899999618530273
2020-05-20 1.5800000429153442 1.309999942779541 1.440000057220459 1.440000057220459 19017600.0 1.440000057220459
2020-05-21 1.4299999475479126 1.2599999904632568 1.4299999475479126 1.2999999523162842 7398200.0 1.2999999523162842
2020-05-22 1.340000033378601 1.25 1.2599999904632568 1.3200000524520874 3302300.0 1.3200000524520874
2020-05-26 1.3600000143051147 1.2300000190734863 1.3600000143051147 1.309999942779541 5399600.0 1.309999942779541
2020-05-27 1.4049999713897705 1.2300000190734863 1.3300000429153442 1.399999976158142 9769400.0 1.399999976158142
2020-05-28 1.5499999523162842 1.340000033378601 1.399999976158142 1.3700000047683716 7856700.0 1.3700000047683716
2020-05-29 1.3899999856948853 1.2699999809265137 1.3899999856948853 1.309999942779541 4558200.0 1.309999942779541
2020-06-01 1.4299999475479126 1.2799999713897705 1.2999999523162842 1.4199999570846558 17766500.0 1.4199999570846558
2020-06-02 1.9600000381469727 1.5399999618530273 1.8200000524520874 1.5800000429153442 48666800.0 1.5800000429153442
2020-06-03 1.7100000381469727 1.4299999475479126 1.6299999952316284 1.6200000047683716 14621800.0 1.6200000047683716
2020-06-04 1.7000000476837158 1.5499999523162842 1.649999976158142 1.5700000524520874 6771300.0 1.5700000524520874
2020-06-05 1.8200000524520874 1.559999942779541 1.590000033378601 1.8200000524520874 15902500.0 1.8200000524520874
2020-06-08 2.049999952316284 1.7100000381469727 2.0369999408721924 1.840000033378601 22958100.0 1.840000033378601
2020-06-09 2.1600000858306885 1.7200000286102295 1.899999976158142 2.0 17789900.0 2.0
2020-06-10 2.0299999713897705 1.7599999904632568 2.0 1.899999976158142 10479700.0 1.899999976158142
2020-06-11 1.7799999713897705 1.5499999523162842 1.7000000476837158 1.5700000524520874 9183500.0 1.5700000524520874
2020-06-12 1.7000000476837158 1.4600000381469727 1.7000000476837158 1.590000033378601 6538900.0 1.590000033378601
2020-06-15 1.7000000476837158 1.4800000190734863 1.6200000047683716 1.6699999570846558 5221700.0 1.6699999570846558
2020-06-16 1.7999999523162842 1.6100000143051147 1.690000057220459 1.75 7151000.0 1.75
2020-06-17 1.7400000095367432 1.6299999952316284 1.7300000190734863 1.7000000476837158 3319400.0 1.7000000476837158
2020-06-18 1.75 1.6200000047683716 1.659999966621399 1.6699999570846558 4588600.0 1.6699999570846558
2020-06-19 1.774999976158142 1.649999976158142 1.7400000095367432 1.649999976158142 6492800.0 1.649999976158142
2020-06-22 1.7000000476837158 1.5 1.590000033378601 1.559999942779541 8082100.0 1.559999942779541
2020-06-23 1.850000023841858 1.600000023841858 1.7100000381469727 1.6699999570846558 14268900.0 1.6699999570846558
2020-06-24 1.6699999570846558 1.5 1.6699999570846558 1.5800000429153442 5180500.0 1.5800000429153442
2020-06-25 1.690000057220459 1.5700000524520874 1.649999976158142 1.659999966621399 4418700.0 1.659999966621399
2020-06-26 1.659999966621399 1.5199999809265137 1.659999966621399 1.5299999713897705 3984700.0 1.5299999713897705
2020-06-29 1.559999942779541 1.409999966621399 1.5499999523162842 1.4900000095367432 3716800.0 1.4900000095367432
2020-06-30 1.4900000095367432 1.3300000429153442 1.4800000190734863 1.3700000047683716 4761400.0 1.3700000047683716
2020-07-01 1.4299999475479126 1.3200000524520874 1.3799999952316284 1.3700000047683716 2864000.0 1.3700000047683716
2020-07-02 1.3799999952316284 1.2400000095367432 1.3600000143051147 1.2599999904632568 5505800.0 1.2599999904632568
2020-07-06 1.2899999618530273 1.1799999475479126 1.2799999713897705 1.2300000190734863 6456700.0 1.2300000190734863
2020-07-07 1.2200000286102295 1.149999976158142 1.2100000381469727 1.149999976158142 4439700.0 1.149999976158142
2020-07-08 1.3600000143051147 1.2000000476837158 1.2300000190734863 1.2799999713897705 9198500.0 1.2799999713897705
2020-07-09 1.2999999523162842 1.1799999475479126 1.2999999523162842 1.2200000286102295 3015000.0 1.2200000286102295
2020-07-10 1.3200000524520874 1.190000057220459 1.2200000286102295 1.2699999809265137 4215200.0 1.2699999809265137
2020-07-13 1.3200000524520874 1.190000057220459 1.3200000524520874 1.2100000381469727 3570800.0 1.2100000381469727
2020-07-14 1.190000057220459 1.1100000143051147 1.190000057220459 1.1799999475479126 2847300.0 1.1799999475479126
2020-07-15 1.2200000286102295 1.159999966621399 1.1799999475479126 1.2000000476837158 2599900.0 1.2000000476837158
2020-07-16 1.2000000476837158 1.159999966621399 1.2000000476837158 1.2000000476837158 1655800.0 1.2000000476837158
2020-07-17 1.25 1.1799999475479126 1.1799999475479126 1.2300000190734863 2572100.0 1.2300000190734863
2020-07-20 1.440000057220459 1.2300000190734863 1.25 1.3700000047683716 9541700.0 1.3700000047683716
2020-07-21 1.5800000429153442 1.399999976158142 1.4700000286102295 1.5 14453200.0 1.5
2020-07-22 1.5700000524520874 1.2999999523162842 1.559999942779541 1.399999976158142 6301100.0 1.399999976158142
2020-07-23 1.4500000476837158 1.340000033378601 1.399999976158142 1.340000033378601 3248000.0 1.340000033378601
2020-07-24 1.6299999952316284 1.25 1.3200000524520874 1.4600000381469727 20715400.0 1.4600000381469727
2020-07-27 1.5 1.3700000047683716 1.4299999475479126 1.4500000476837158 4268300.0 1.4500000476837158
2020-07-28 1.5800000429153442 1.4199999570846558 1.5 1.5299999713897705 7369600.0 1.5299999713897705
2020-07-29 1.559999942779541 1.4299999475479126 1.5 1.4900000095367432 5524200.0 1.4900000095367432
2020-07-30 1.5 1.409999966621399 1.4700000286102295 1.4700000286102295 3149500.0 1.4700000286102295
2020-07-31 1.5399999618530273 1.3700000047683716 1.4700000286102295 1.4600000381469727 6748600.0 1.4600000381469727
2020-08-03 1.4600000381469727 1.399999976158142 1.4500000476837158 1.4299999475479126 1909200.0 1.4299999475479126
2020-08-04 1.4900000095367432 1.3799999952316284 1.399999976158142 1.4500000476837158 3908700.0 1.4500000476837158
2020-08-05 1.5299999713897705 1.4149999618530273 1.4600000381469727 1.4600000381469727 5823200.0 1.4600000381469727
2020-08-06 1.4800000190734863 1.4199999570846558 1.4600000381469727 1.440000057220459 2248800.0 1.440000057220459
2020-08-07 1.440000057220459 1.350000023841858 1.440000057220459 1.3899999856948853 4625700.0 1.3899999856948853
2020-08-10 1.590000033378601 1.4600000381469727 1.559999942779541 1.5299999713897705 7678800.0 1.5299999713897705
2020-08-11 1.690000057220459 1.5 1.5199999809265137 1.6399999856948853 9560800.0 1.6399999856948853
2020-08-12 1.659999966621399 1.4900000095367432 1.649999976158142 1.5800000429153442 4643600.0 1.5800000429153442
2020-08-13 1.6799999475479126 1.5 1.5 1.649999976158142 6825200.0 1.649999976158142
2020-08-14 1.409999966621399 1.3300000429153442 1.3799999952316284 1.340000033378601 5348100.0 1.340000033378601
2020-08-17 1.399999976158142 1.2999999523162842 1.350000023841858 1.3700000047683716 3638400.0 1.3700000047683716
2020-08-18 1.3980000019073486 1.309999942779541 1.3700000047683716 1.3300000429153442 1824400.0 1.3300000429153442
2020-08-19 1.3300000429153442 1.2300000190734863 1.3300000429153442 1.25 3390800.0 1.25
2020-08-20 1.350000023841858 1.25 1.2799999713897705 1.350000023841858 3690700.0 1.350000023841858
2020-08-21 1.3300000429153442 1.2699999809265137 1.2999999523162842 1.3200000524520874 1872500.0 1.3200000524520874
2020-08-24 1.3300000429153442 1.25 1.3170000314712524 1.2599999904632568 1946200.0 1.2599999904632568
2020-08-25 1.2799999713897705 1.2100000381469727 1.2699999809265137 1.2699999809265137 2559900.0 1.2699999809265137
2020-08-26 1.2799999713897705 1.2200000286102295 1.2400000095367432 1.2599999904632568 1648600.0 1.2599999904632568
2020-08-27 1.2400000095367432 1.2100000381469727 1.2300000190734863 1.2300000190734863 1421300.0 1.2300000190734863
2020-08-28 1.2350000143051147 1.2000000476837158 1.2000000476837158 1.2300000190734863 1539900.0 1.2300000190734863
2020-08-31 1.2200000286102295 1.1699999570846558 1.2000000476837158 1.2000000476837158 2285000.0 1.2000000476837158
2020-09-01 1.1699999570846558 1.1200000047683716 1.149999976158142 1.1699999570846558 2108800.0 1.1699999570846558
2020-09-02 1.2200000286102295 1.1399999856948853 1.1699999570846558 1.2100000381469727 1986200.0 1.2100000381469727
2020-09-03 1.2000000476837158 1.0800000429153442 1.1799999475479126 1.1299999952316284 2029100.0 1.1299999952316284
2020-09-04 1.1200000047683716 1.0199999809265137 1.1200000047683716 1.059999942779541 2485900.0 1.059999942779541
2020-09-08 1.0499999523162842 0.9210000038146973 1.0499999523162842 1.0199999809265137 2003200.0 1.0199999809265137
2020-09-09 1.059999942779541 0.9670000076293945 1.0099999904632568 1.0099999904632568 2618600.0 1.0099999904632568
2020-09-10 1.097000002861023 0.9800000190734863 1.0 1.0499999523162842 4140300.0 1.0499999523162842
2020-09-11 1.090000033378601 1.0399999618530273 1.0700000524520874 1.0700000524520874 1971900.0 1.0700000524520874
2020-09-14 1.2000000476837158 1.0700000524520874 1.0700000524520874 1.149999976158142 4406700.0 1.149999976158142
2020-09-15 1.190000057220459 1.090000033378601 1.1699999570846558 1.1100000143051147 1568100.0 1.1100000143051147
2020-09-16 1.1299999952316284 1.090000033378601 1.100000023841858 1.1200000047683716 1030900.0 1.1200000047683716
2020-09-17 1.1200000047683716 1.0499999523162842 1.1200000047683716 1.0800000429153442 1160800.0 1.0800000429153442
2020-09-18 1.090000033378601 1.0199999809265137 1.0800000429153442 1.0199999809265137 1761800.0 1.0199999809265137
2020-09-21 1.100000023841858 1.0099999904632568 1.0499999523162842 1.0700000524520874 1687900.0 1.0700000524520874
2020-09-22 1.0700000524520874 1.0399999618530273 1.059999942779541 1.0499999523162842 528600.0 1.0499999523162842
2020-09-23 1.0700000524520874 1.0099999904632568 1.0499999523162842 1.0299999713897705 1127700.0 1.0299999713897705
2020-09-24 1.0399999618530273 0.9800000190734863 1.0399999618530273 1.0299999713897705 1093800.0 1.0299999713897705
2020-09-25 1.0299999713897705 1.0 1.0299999713897705 1.0099999904632568 738700.0 1.0099999904632568
2020-09-28 1.0399999618530273 1.0099999904632568 1.0199999809265137 1.0099999904632568 736800.0 1.0099999904632568
2020-09-29 1.149999976158142 1.0099999904632568 1.0099999904632568 1.100000023841858 3629300.0 1.100000023841858
2020-09-30 1.1299999952316284 1.0440000295639038 1.0800000429153442 1.100000023841858 2245400.0 1.100000023841858
2020-10-01 1.100000023841858 1.059999942779541 1.100000023841858 1.0800000429153442 727800.0 1.0800000429153442
2020-10-02 1.2899999618530273 1.059999942779541 1.090000033378601 1.1799999475479126 14697900.0 1.1799999475479126
2020-10-05 1.3589999675750732 1.1399999856948853 1.190000057220459 1.2300000190734863 8485000.0 1.2300000190734863
2020-10-06 1.159999966621399 1.100000023841858 1.159999966621399 1.1100000143051147 3031000.0 1.1100000143051147
2020-10-07 1.159999966621399 1.059999942779541 1.100000023841858 1.1200000047683716 1671600.0 1.1200000047683716
2020-10-08 1.1299999952316284 1.090000033378601 1.1100000143051147 1.100000023841858 1776700.0 1.100000023841858
2020-10-09 1.1169999837875366 1.090000033378601 1.1100000143051147 1.090000033378601 1691700.0 1.090000033378601
2020-10-12 1.1299999952316284 1.090000033378601 1.1200000047683716 1.0950000286102295 1302500.0 1.0950000286102295
2020-10-13 1.1100000143051147 1.0800000429153442 1.100000023841858 1.100000023841858 880300.0 1.100000023841858
2020-10-14 1.1100000143051147 1.0800000429153442 1.0920000076293945 1.090000033378601 1224300.0 1.090000033378601
2020-10-15 1.090000033378601 1.0499999523162842 1.0800000429153442 1.0800000429153442 842900.0 1.0800000429153442
2020-10-16 1.0800000429153442 1.0499999523162842 1.0800000429153442 1.059999942779541 651900.0 1.059999942779541
2020-10-19 1.0800000429153442 1.0529999732971191 1.059999942779541 1.0800000429153442 528200.0 1.0800000429153442
2020-10-20 1.1200000047683716 1.0299999713897705 1.0700000524520874 1.0800000429153442 1805800.0 1.0800000429153442
2020-10-21 1.090000033378601 1.059999942779541 1.0700000524520874 1.0700000524520874 639100.0 1.0700000524520874
2020-10-22 1.0800000429153442 1.0399999618530273 1.059999942779541 1.059999942779541 772700.0 1.059999942779541
2020-10-23 1.0800000429153442 1.0399999618530273 1.0700000524520874 1.0700000524520874 533300.0 1.0700000524520874
2020-10-26 1.0700000524520874 1.0099999904632568 1.059999942779541 1.0299999713897705 1442800.0 1.0299999713897705
2020-10-27 1.0499999523162842 1.0 1.0499999523162842 1.0199999809265137 687800.0 1.0199999809265137
2020-10-28 1.0299999713897705 0.9729999899864197 1.0099999904632568 1.0 1646700.0 1.0
2020-10-29 1.0299999713897705 0.9900000095367432 1.0 1.0099999904632568 1124500.0 1.0099999904632568
2020-10-30 1.0099999904632568 0.9570000171661377 0.9900000095367432 1.0099999904632568 1330500.0 1.0099999904632568
2020-11-02 1.0110000371932983 0.9800000190734863 1.0099999904632568 1.0 1095700.0 1.0
2020-11-03 1.0399999618530273 0.9800000190734863 0.9850000143051147 1.0199999809265137 963800.0 1.0199999809265137
2020-11-04 1.0299999713897705 0.9959999918937683 1.0 1.0 653800.0 1.0
2020-11-05 1.0199999809265137 0.9900000095367432 1.0 1.0 2180000.0 1.0
2020-11-06 1.0399999618530273 0.9850000143051147 0.996999979019165 1.0399999618530273 1421300.0 1.0399999618530273
2020-11-09 1.0299999713897705 0.9900000095367432 1.0 1.0099999904632568 4533500.0 1.0099999904632568
2020-11-10 1.0099999904632568 0.9750000238418579 1.0099999904632568 1.0 3160500.0 1.0
2020-11-11 1.0199999809265137 0.9860000014305115 1.0 1.0199999809265137 1794800.0 1.0199999809265137
2020-11-12 1.0399999618530273 1.0 1.0399999618530273 1.0199999809265137 1973900.0 1.0199999809265137
2020-11-13 1.0199999809265137 0.9380000233650208 1.0 1.0099999904632568 2566800.0 1.0099999904632568
2020-11-16 1.0099999904632568 0.9800000190734863 0.9800000190734863 1.0099999904632568 2487200.0 1.0099999904632568
2020-11-17 1.0800000429153442 0.9800000190734863 0.9950000047683716 1.0399999618530273 2840500.0 1.0399999618530273
2020-11-18 1.1399999856948853 1.0299999713897705 1.0499999523162842 1.0499999523162842 13249800.0 1.0499999523162842
2020-11-19 1.1100000143051147 1.059999942779541 1.090000033378601 1.100000023841858 2163900.0 1.100000023841858
2020-11-20 1.2000000476837158 1.090000033378601 1.1100000143051147 1.1200000047683716 3987400.0 1.1200000047683716
2020-11-23 1.1699999570846558 1.1100000143051147 1.1699999570846558 1.149999976158142 4181200.0 1.149999976158142
2020-11-24 1.350000023841858 1.159999966621399 1.340000033378601 1.190000057220459 10422200.0 1.190000057220459
2020-11-25 1.2000000476837158 1.1100000143051147 1.1169999837875366 1.1799999475479126 4453200.0 1.1799999475479126
2020-11-27 1.2000000476837158 1.1399999856948853 1.190000057220459 1.149999976158142 3173100.0 1.149999976158142
2020-11-30 1.159999966621399 1.0800000429153442 1.159999966621399 1.1100000143051147 3823900.0 1.1100000143051147
2020-12-01 1.1100000143051147 1.0399999618530273 1.100000023841858 1.0700000524520874 4631800.0 1.0700000524520874
2020-12-02 1.0700000524520874 1.0399999618530273 1.0700000524520874 1.0700000524520874 1511500.0 1.0700000524520874
2020-12-03 1.0800000429153442 1.0299999713897705 1.0700000524520874 1.0499999523162842 3885400.0 1.0499999523162842
2020-12-04 1.0800000429153442 1.0299999713897705 1.0399999618530273 1.0700000524520874 3049600.0 1.0700000524520874
2020-12-07 1.0700000524520874 1.0399999618530273 1.0700000524520874 1.0499999523162842 1870700.0 1.0499999523162842
2020-12-08 1.059999942779541 1.034000039100647 1.0499999523162842 1.0499999523162842 1952500.0 1.0499999523162842
2020-12-09 1.0700000524520874 1.0299999713897705 1.0499999523162842 1.0700000524520874 3349400.0 1.0700000524520874
2020-12-10 1.1100000143051147 1.0499999523162842 1.0700000524520874 1.090000033378601 2964300.0 1.090000033378601
2020-12-11 1.100000023841858 1.0399999618530273 1.100000023841858 1.0499999523162842 2739200.0 1.0499999523162842
2020-12-14 1.1050000190734863 1.0399999618530273 1.0700000524520874 1.0499999523162842 4090800.0 1.0499999523162842
2020-12-15 1.0800000429153442 1.0099999904632568 1.0399999618530273 1.059999942779541 1977100.0 1.059999942779541
2020-12-16 1.059000015258789 1.0199999809265137 1.0499999523162842 1.0299999713897705 2511100.0 1.0299999713897705
2020-12-17 1.0299999713897705 0.9800000190734863 1.0199999809265137 1.0199999809265137 4795000.0 1.0199999809265137
2020-12-18 1.0399999618530273 1.0 1.0199999809265137 1.0 4413400.0 1.0
2020-12-21 1.0499999523162842 0.9950000047683716 1.0199999809265137 1.034999966621399 2785300.0 1.034999966621399
2020-12-22 1.0379999876022339 1.0 1.0299999713897705 1.0199999809265137 1648600.0 1.0199999809265137
2020-12-23 1.0399999618530273 1.0 1.0199999809265137 1.0399999618530273 3029600.0 1.0399999618530273
2020-12-24 1.0399999618530273 1.0149999856948853 1.0399999618530273 1.0399999618530273 1333900.0 1.0399999618530273
2020-12-28 1.0399999618530273 1.0099999904632568 1.0399999618530273 1.0199999809265137 2208400.0 1.0199999809265137
2020-12-29 1.0399999618530273 1.0 1.0099999904632568 1.0399999618530273 2416700.0 1.0399999618530273
2020-12-30 1.0399999618530273 1.0099999904632568 1.0299999713897705 1.0399999618530273 1604900.0 1.0399999618530273
2020-12-31 1.0299999713897705 1.0099999904632568 1.0199999809265137 1.0199999809265137 2063600.0 1.0199999809265137
2021-01-04 1.0700000524520874 1.0099999904632568 1.0199999809265137 1.059999942779541 4266900.0 1.059999942779541
2021-01-05 1.1699999570846558 1.0499999523162842 1.059999942779541 1.0800000429153442 6736300.0 1.0800000429153442
2021-01-06 1.1200000047683716 1.0399999618530273 1.090000033378601 1.090000033378601 4959500.0 1.090000033378601
2021-01-07 1.149999976158142 1.090000033378601 1.0920000076293945 1.100000023841858 3936800.0 1.100000023841858
2021-01-08 1.1399999856948853 1.090000033378601 1.1100000143051147 1.1100000143051147 2893600.0 1.1100000143051147
2021-01-11 1.190000057220459 1.0800000429153442 1.1100000143051147 1.1299999952316284 6394500.0 1.1299999952316284
2021-01-12 1.1799999475479126 1.1100000143051147 1.149999976158142 1.159999966621399 4825500.0 1.159999966621399
2021-01-13 1.2100000381469727 1.1399999856948853 1.1699999570846558 1.1699999570846558 4428400.0 1.1699999570846558
2021-01-14 1.190000057220459 1.1299999952316284 1.159999966621399 1.190000057220459 3632900.0 1.190000057220459
2021-01-15 1.3899999856948853 1.1699999570846558 1.1699999570846558 1.2799999713897705 14930100.0 1.2799999713897705
import pandas_datareader as data
import pandas as pd
# Define the instruments to download. We would like to see Apple, Microsoft and the S&P500 index.
#tickers = ['AAPL', 'MSFT', '^GSPC']
# We would like all available data from 01/01/2000 until 12/31/2016.
start_date = '2020-01-01'
end_date = '2021-01-16'
# User pandas_reader.data.DataReader to load the desired data. As simple as that.
panel_data = data.DataReader('INPX', 'yahoo', start_date, end_date)
panel_data.to_csv("data.csv")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment