I managed to produce time series dataframe(tibble) with two columns(Date, Cumprofit)
a = dayt %>% mutate(buy = ifelse((foreignNetbuy > 0 || instNetbuy > 0) &
priceClose < 1500000 &
rise > 3 &
rise < 25 &
candle == 1 &
middle > -1 &
disparity > 100 &
disparity < 120 &
amount > 7500000000,1,0)) %>%
filter(buy == 1) %>%
select(logDate,stockCode, ovnprofit, buy) %>%
group_by(logDate) %>%
summarize(count = sum(buy),
avgprofit = mean(ovnprofit, na.rm = TRUE)) %>%
mutate(profit = ifelse(count > 60, avgprofit, (avgprofit*count + 60-count)/60)) %>%
arrange(logDate) %>%
as_tibble() %>%
mutate(Date = ymd(logDate),
Cumprofit = cumprod(profit)) %>%
select(Date,Cumprofit)
I tried to draw chart with charts.performancesummary function in Performanceanalytics package, but failed.
What is the correct method to get this done?
charts.PerformanceSummary(a)


I solved the problem