Skip to content

Commit

Permalink
Skip to next param.combo if not txns returned in applyStrategy in app…
Browse files Browse the repository at this point in the history
…ly.paramset

See #121
  • Loading branch information
jaymon0703 committed Aug 24, 2020
1 parent b00b026 commit ddf64fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/paramsets.R
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,10 @@ apply.paramset <- function(strategy.st
if(!is.null(r$tradeStats) ){
if(nrow(r$tradeStats)==0){
tmpnames <- colnames(r$tradeStats)
if(nrow(r$tradeStats)==0) { # no trades returned in this param.combo
print(paste0("No transactions returned for param.combo ", i, " out of ", length(args)))
next # jump to next param.combo
}
r$tradeStats <- data.frame(r$portfolio.st,t(rep(0,length(tmpnames)-1)))
colnames(r$tradeStats) <- tmpnames
}
Expand Down

0 comments on commit ddf64fe

Please sign in to comment.