l <- seq(as.Date("2014-01-01"),Sys.Date(),by="days")
fas_shares <- (as.xts(rep(3472*4,length(l)),l))
l2 <- seq(as.Date("2016-12-19"),Sys.Date(),by="days")
s2 <- c(rep(0,length(l)-length(l2)),rep(750,length(l2)))
fas_shares <- fas_shares - s2
spxl_shares <- as.xts(rep(21000,length(l)),l)
fas_shares * apply
spxl_shares * apply
fas_shares * apply
# weekly closed price chart
# weekly candle chart
candleChart(to.weekly(fas_shares * FAS[,4] +spxl_shares * SPXL[,4]),theme='white')
# store weekly balance
weekly_pf <- fas_shares * apply
0 件のコメント:
コメントを投稿