thinh-vu / vnstock

A powerful Python library for getting rich data from the Vietnam Stock Market using just a few lines of code
https://vnstocks.com
Other
531 stars 133 forks source link

VNindex không hiển thị trước 2020 #117

Closed hhc2tech closed 6 months ago

hhc2tech commented 7 months ago

Mô tả lỗi Code xuất dữ liệu VNindex

from vnstock import * #import all functions

df = stock_historical_data(symbol='VNINDEX', start_date='2001-01-01', end_date='2023-10-10', resolution='1D', type='index')

df = stock_historical_data(symbol='VNINDEX', start_date= "2001-01-01", end_date= TODAY, resolution='1D', type='index') fig = candlestick_chart(df, title='VNINDEX Candlestick Chart with MA and Volume', x_label='Date', y_label='Price', ma_periods=[50,200], show_volume=True, figure_size=(15, 8), reference_period=300, colors=('lightgray', 'gray'), reference_colors=('black', 'blue')) fig.show()

Kết quả chỉ xuất được dữ liệu sau 2020

image

vnindex
kunwang2000 commented 7 months ago

đổi nguồn thành TCBS đó ông df = stock_historical_data(symbol='VNINDEX', start_date= "2001-01-01", end_date= TODAY, resolution='1D', type='index', source ='TCBS')

thinh-vu commented 6 months ago

Cám ơn @kunwang2000 đã hỗ trợ bạn @hhc2tech. Mình đóng ticket này nhé.