pq_to_freq: converting frequency of daily data

Description Usage Arguments Examples

Description

pq_to_freq convert a daily OHLC dataframe into a specified frequency.

Usage

1
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

1
2
3
dts = md_stock(c("^000001", "000001"), date_range = 'max', source = '163')

dts_weekly = pq_to_freq(dts, "weekly")

pedquant documentation built on May 27, 2019, 5:02 p.m.