Interface: weekly
Description: Get A weekly market share
Limit: The maximum single 3700, the total does not limit
Points: Users need at least 300 points can be retrieved, as described in this article points below the best way to get
Note: tushare module to download and install the tutorial, please refer to my previous article
Input parameters
Name | Type | Required | Description
ts_code | str | N | TS codes (ts_code, trade_date optionally two parameters a)
trade_date | str | N | transaction date (date Friday, YYYYMMDD format)
start_date | str | N | Start Date
end_date | str | N | end date
Output parameters
Name | Type | Default display | Description
ts_code | str | Y | ticker
trade_date | str | Y | Trading Date
close | float | Y | weekly close
open | float | Y | Week opening price
high | float | Y | week high
low | float | Y | week low
pre_close | float | Y | last week's closing price
change | float | Y | Week Change Amount
pct_chg | float | Y | Week Change (not suspended and if it is right to re-use your common market Interface)
vol | float | Y | weekly trading volume
amount | float | Y | Week Turnover
Interface Usage
pro = ts.pro_api()
df = pro.weekly(ts_code='000001.SZ', start_date='20180101', end_date='20181101', fields='ts_code,trade_date,open,high,low,close,vol,amount')
or
df = pro.weekly(trade_date='20181123', fields='ts_code,trade_date,open,high,low,close,vol,amount')
Sample data
ts_code trade_date close open high low vol \
0 000001.SZ 20181026 11.18 10.81 11.46 10.71 9062500.14
1 000001.SZ 20181019 10.76 10.39 10.78 9.92 7235319.55
2 000001.SZ 20181012 10.30 10.70 10.79 9.70 7257596.97
3 000001.SZ 20180928 11.05 10.52 11.27 10.48 5458134.13
4 000001.SZ 20180921 10.67 9.80 10.70 9.68 5120305.29
5 000001.SZ 20180914 9.84 10.01 10.10 9.81 3534261.76
6 000001.SZ 20180907 10.01 10.09 10.55 9.93 4708303.81
7 000001.SZ 20180831 10.13 10.02 10.43 9.97 6715867.92
8 000001.SZ 20180824 10.03 8.90 10.28 8.87 6697713.52
9 000001.SZ 20180817 8.81 9.12 9.16 8.64 3206923.44
10 000001.SZ 20180810 9.23 8.94 9.35 8.88 3054338.56
11 000001.SZ 20180803 8.91 9.32 9.50 8.88 3648566.35
12 000001.SZ 20180727 9.25 9.04 9.59 9.00 5170189.41
13 000001.SZ 20180720 9.11 8.85 9.20 8.61 3806004.47
14 000001.SZ 20180713 8.88 8.69 9.03 8.58 4901983.84
15 000001.SZ 20180706 8.66 9.05 9.05 8.45 5125563.53
16 000001.SZ 20180629 9.09 9.91 9.92 8.87 5150575.93
tushare how to get points
I do quantitative investment team in transition, for the trading strategy,
We do have more idle transfer departure colleagues.
600: Original 50, only 39 yuan
1,500 points price: $ 140 only 109 yuan (sold out)
2000 points: the original price of 190 yuan, only 149 yuan
5000 points: the original price of 490 yuan, only 388 yuan (sold out).
The small number even need to ask the Department of VX: a56746435 (Note tushare)
.