Learn R Programming

JFE (version 2.5.5)

getTWSE.fiveSecond: Download Download 5-second index price from the Taiwan Stock Exchange

Description

It downloads Download 5-second financial index from the Taiwan Stock Exchange.

Usage

getTWSE.fiveSecond(ymd=NULL,skip=2,index.names=NULL)

Value

data

The data retrieved.

Arguments

ymd

The year-month-day format of data retrived, for example, "2022-05-03". If unspecified, the default is the Sys.date(); if Saturday, it moves back to Friday; if Sunday, it moves to Monday.

skip

The rows to skip, since the web usually contains empty space or notes in the beginning, currently, skip 2 lines is OK, however, it skipped 1. Therefore, the parameter can be checked if it changes again.

index.names

The colnames (names of index price) of the dataset are originally in Chinese characters, to avoid language problem, we changed it to V1~V34. Users may offer your own colnames here.

Author

Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.

Details

This function connects with <"https://www.twse.com.tw/exchangeReport/MI_5MINS_INDEX"> and downloads the specified market data. The rownames of downloaded data embeds the timestamp already.

Examples

Run this code

#getTWSE.fiveSecond(ymd="2022-05-03",skip=2,index.names=NULL)$data

Run the code above in your browser using DataLab