pq_freq convert a daily OHLC dataframe into a specified frequency.

pq_freq(dt, freq = "monthly", date_type = "eop")

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.

date_type

the available date type are eop (end of period) and bop (bebinning of period), defaults to the eop.

Examples

if (FALSE) {
data(dt_ssec)
dat1_weekly = pq_freq(dt_ssec, "weekly")

data(dt_banks)
dat2_weekly = pq_freq(dt_banks, "monthly")
}