Skip to content

Commit

Permalink
#51 comment out and mark
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinMShea committed Aug 21, 2021
1 parent e26e972 commit c9ca2ad
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions R/fitTsfmUpDn.r
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,14 @@ fitTsfmUpDn <- function(asset.names, mkt.name, rf.name=NULL,

# extract columns to be used in the time series regression
dat.xts <- merge(data.xts[,asset.names], data.xts[,mkt.name])

### After merging xts objects, the spaces in names get converted to periods

# convert all asset and factor returns to excess returns if specified
if (!is.null(rf.name)) {
dat.xts <- "[<-"(dat.xts,,vapply(dat.xts, function(x) x-data.xts[,rf.name],
FUN.VALUE = numeric(nrow(dat.xts))))
}
# BROKEN convert all asset and factor returns to excess returns if specified
# if (!is.null(rf.name)) {
# dat.xts <- "[<-"(dat.xts,,vapply(dat.xts, function(x) x-data.xts[,rf.name],
# FUN.VALUE = numeric(nrow(dat.xts))))
#}

mkt <- dat.xts[,mkt.name]
# up market
Expand Down

0 comments on commit c9ca2ad

Please sign in to comment.