help cnkchart

Title

cnkchart -- Draw a Candlestick Chart with the Chinese-listed stock code or index.

Syntax

cnkchart code(max=1 min=1) , [option]

Description

code is a stock code or index code to be draw. For the code, there will be a Candlestick Chart as an output containing the trading information for that stock.

Option

traday(string) set a range of trading data.The default is (c(current_date),90), which stands for drawing a Candlestick Chart from [c(current_date)-90,c(current_date)].

filename(string) set a file where the Candlestick Chart will be saved in. The default is (stkcd, gph), which stands for the results filename is stkcd, and the output format is gph. Users may have many choices for the output format.

Output format: following are some commonly used format

ps PostScript.

eps The EPS (Encapsulated PostScript).

svg SVG (Scalable Vector Graphics).

pdf PDF (Portable Document Format).

png PNG (Portable Network Graphics).

other

week/month(string) specify that the moving average is a weekly/monthly moving average, the default is a daily moving average. Note: unable to set both of options traday and week/month simultaneously.

index(string) specify that the code is index code,the default is stock code. Users may have many choices to use a different index, for example：

000001 The Shanghai Composite Index.

000002 The Shanghai A-Share Composite Index.

000003 The Shanghai B-Share Composite Index.

000300 CSI 300 Index.

399001 Shenzhen Component Index.

399003 Shenzhen B-Share Component Index.

399005 Shenzhen small and mediam sized 100-firm Index.

399006 Shenzhen Growth Enterprise Market Index.

399008 Shenzhen small and mediam sized 300-firm Index.

Example

`"clear all"'

`"cap mkdir e:/kchart"'

`"cd e:/kchart"'

`"cnkchart 1"'

`"cnkchart 1,week"'

`"cnkchart 1,month"'

`"cnkchart 1,week index"'

`"cnkchart 1, traday(2021-1-1,50)"'

`"cnkchart 1, traday(2021-1-1,50) filename(1p)"'

`"cnkchart 1, traday(2021-1-1,50) filename(1p,png)"'

Authors

Chuntao Li

China Stata Club(爬虫俱乐部)

Wuhan, China

chtl@henu.edu.cn

Yizhuo Fang

China Stata Club(爬虫俱乐部)

Kaifeng, China

yzhfang1@163.com

Dr. Muhammad Usman

UE Business School, Division of Management and Administrative Sciences, University of Education

Lahore, Pakistan

m.usman@ue.edu.pk