pedquant (version 0.1.3)

pq_to_freq: converting frequency of daily data

Description

pq_to_freq convert a daily OHLC dataframe into a specified frequency.

Usage

pq_to_freq(dt, freq, print_step = 1L)

Arguments

dt

a list/dataframe of time series dataset.

freq

the frequency that the input daily data will converted to. It supports weekly, monthly, quarterly and yearly.

print_step

A non-negative integer. Print symbol name by each print_step iteration. Default is 1L.

Examples

Run this code
# NOT RUN {
dts = md_stock(c("^000001", "000001"), date_range = 'max', source = '163')

dts_weekly = pq_to_freq(dts, "weekly")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab