[IG-CM-MT-MY_mf850finalproject_iii.R:3:2:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L3) *style:* **Commented code should be removed.**
```r
#### 12/20/2016
 ^~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:16:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L16) *style:* **Variable and function names should be all lowercase.**
```r
laggedDataFile <- "laggeddata.rds"
^~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:19:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L19) *style:* **Variable and function names should be all lowercase.**
```r
LinearRegrssionFile <- "Linear_Ridge_Lasso.R"
^~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:20:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L20) *style:* **Variable and function names should be all lowercase.**
```r
RandomForestRegressionFile <- "random_forest_reg.R"
^~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:21:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L21) *style:* **Variable and function names should be all lowercase.**
```r
LogisticRegressionFile <- "Logistic_Ridge_Lasso.R"
^~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:22:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L22) *style:* **Variable and function names should be all lowercase.**
```r
RandomForestCatFile <- "random_forest_cat.R"
^~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:23:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L23) *style:* **Variable and function names should be all lowercase.**
```r
LogisticRegressionModelLambdaFile <- "Logistic_Ridge_Lasso_model_lambda.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:23:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L23) *style:* **Variable and function names should not be longer than 30 characters.**
```r
LogisticRegressionModelLambdaFile <- "Logistic_Ridge_Lasso_model_lambda.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:25:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L25) *style:* **Variable and function names should be all lowercase.**
```r
LinearRegrssionModelFile <- "Linear_Ridge_Lasso_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:26:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L26) *style:* **Variable and function names should be all lowercase.**
```r
LinearRegrssionModelLambdaFile <- "Linear_Ridge_Lasso_model_lambda.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:27:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L27) *style:* **Variable and function names should be all lowercase.**
```r
RandomForestRegressionModelFile <- "random_forest_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:27:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L27) *style:* **Variable and function names should not be longer than 30 characters.**
```r
RandomForestRegressionModelFile <- "random_forest_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:28:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L28) *style:* **Variable and function names should be all lowercase.**
```r
LogisticRegressionModelFile <- "Logistic_Ridge_Lasso_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:29:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L29) *style:* **Variable and function names should be all lowercase.**
```r
RandomForestCatModelFile <- "random_forest_cat_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:31:8:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L31) *style:* **Put spaces around all infix operators.**
```r
par(ask=FALSE)
      ~^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:36:57:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L36) *style:* **Commas should always have a space after.**
```r
  packagestoinstall_split <- strsplit(packagestoinstall,", ")[[1]]
                                                        ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:38:7:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L38) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(!packagename %in% rownames(installed.packages())){
      ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:42:31:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L42) *style:* **Commas should always have a space after.**
```r
      print(paste(packagename,"already installed"))
                              ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:44:40:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L44) *style:* **Put spaces around all infix operators.**
```r
    library(packagename, character.only=TRUE)
                                      ~^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:50:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L50) *style:* **Variable and function names should be all lowercase.**
```r
categoricalStockPredictions <- function(df) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:55:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L55) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:56:61:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L56) *style:* **Trailing whitespace is superfluous.**
```r
  # Scale data - remove categorical variable and add it back
                                                            ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:62:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L62) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:64:4:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L64) *style:* **Commented code should be removed.**
```r
  ### GLMNET - LOGISITIC
   ^~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:64:25:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L64) *style:* **Trailing whitespace is superfluous.**
```r
  ### GLMNET - LOGISITIC
                        ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:66:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L66) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:67:48:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L67) *style:* **Trailing whitespace is superfluous.**
```r
  # Import glmnet model and parameter from file
                                               ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:68:23:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L68) *style:* **Variable and function names should be all lowercase.**
```r
  glm_best <- readRDS(LogisticRegressionModelFile)
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:68:23:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L68) *warning:* **no visible binding for global variable ‘LogisticRegressionModelFile’**
```r
  glm_best <- readRDS(LogisticRegressionModelFile)
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:69:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L69) *style:* **Variable and function names should be all lowercase.**
```r
  bestLambda <- readRDS(LogisticRegressionModelLambdaFile)
  ^~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:69:25:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L69) *style:* **Variable and function names should be all lowercase.**
```r
  bestLambda <- readRDS(LogisticRegressionModelLambdaFile)
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:69:25:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L69) *style:* **Variable and function names should not be longer than 30 characters.**
```r
  bestLambda <- readRDS(LogisticRegressionModelLambdaFile)
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:69:25:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L69) *warning:* **no visible binding for global variable ‘LogisticRegressionModelLambdaFile’**
```r
  bestLambda <- readRDS(LogisticRegressionModelLambdaFile)
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:70:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L70) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:71:29:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L71) *style:* **Trailing whitespace is superfluous.**
```r
  # Reformat data for glmnet
                            ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:73:57:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L73) *style:* **Trailing whitespace is superfluous.**
```r
  # Predict using optimal Linear Regression Coefficients
                                                        ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:74:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L74) *style:* **lines should not be more than 80 characters.**
```r
  predict_glm <- predict.glmnet(glm_best, newx = x_data_lin, type = "response", s = bestLambda)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:74:18:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L74) *warning:* **no visible global function definition for ‘predict.glmnet’**
```r
  predict_glm <- predict.glmnet(glm_best, newx = x_data_lin, type = "response", s = bestLambda)
                 ^~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:74:85:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L74) *style:* **Variable and function names should be all lowercase.**
```r
  predict_glm <- predict.glmnet(glm_best, newx = x_data_lin, type = "response", s = bestLambda)
                                                                                ^~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:75:45:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L75) *style:* **Trailing whitespace is superfluous.**
```r
  # Change log odds to categorical variables
                                            ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:76:46:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L76) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  predictions <- ifelse(predictions > 0, 1, 0 )
                                             ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:77:50:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L77) *style:* **Trailing whitespace is superfluous.**
```r
  # Ensure data types are the same int -> factors
                                                 ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:79:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L79) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:81:19:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L81) *style:* **Trailing whitespace is superfluous.**
```r
  ## Random Forest
                  ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:83:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L83) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:84:58:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L84) *style:* **Trailing whitespace is superfluous.**
```r
  # Import random forest model from file - has 1400 trees
                                                         ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:85:27:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L85) *style:* **Variable and function names should be all lowercase.**
```r
  rf_cat_model <- readRDS(RandomForestCatModelFile)
                          ^~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:85:27:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L85) *warning:* **no visible binding for global variable ‘RandomForestCatModelFile’**
```r
  rf_cat_model <- readRDS(RandomForestCatModelFile)
                          ^~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:86:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L86) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:89:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L89) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:90:32:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L90) *style:* **Trailing whitespace is superfluous.**
```r
  # Predict using Random Forest
                               ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:92:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L92) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:96:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L96) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:97:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L97) *warning:* **no visible global function definition for ‘h2o.init’**
```r
  h2o.init(nthreads = -1)
  ^~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:98:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L98) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:99:21:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L99) *warning:* **no visible global function definition for ‘as.h2o’**
```r
  x_data_h2o.hex <- as.h2o(x_data_lin)
                    ^~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:100:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L100) *style:* **Variable and function names should be all lowercase.**
```r
  dnnModel <- h2o.loadModel("DNNmodel_cat/DNNmodel_cat")
  ^~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:100:15:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L100) *style:* **Variable and function names should be all lowercase.**
```r
  dnnModel <- h2o.loadModel("DNNmodel_cat/DNNmodel_cat")
              ^~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:100:15:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L100) *warning:* **no visible global function definition for ‘h2o.loadModel’**
```r
  dnnModel <- h2o.loadModel("DNNmodel_cat/DNNmodel_cat")
              ^~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:101:32:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L101) *warning:* **no visible global function definition for ‘h2o.predict’**
```r
  predict.reg <- as.data.frame(h2o.predict(dnnModel, x_data_h2o.hex))
                               ^~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:101:44:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L101) *style:* **Variable and function names should be all lowercase.**
```r
  predict.reg <- as.data.frame(h2o.predict(dnnModel, x_data_h2o.hex))
                                           ^~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:102:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L102) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:103:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L103) *warning:* **no visible global function definition for ‘h2o.shutdown’**
```r
  h2o.shutdown(prompt = FALSE)
  ^~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:104:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L104) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:105:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L105) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:107:17:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L107) *style:* **Trailing whitespace is superfluous.**
```r
  ## Predictions
                ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:109:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L109) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:111:26:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L111) *style:* **Trailing whitespace is superfluous.**
```r
  # Order is DNN, RF, GLM
                         ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:112:28:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L112) *style:* **Commas should never have a space before.**
```r
  Accuracy <- c(.8, 0.356  ,0.6317)
                         ~~^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:112:29:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L112) *style:* **Commas should always have a space after.**
```r
  Accuracy <- c(.8, 0.356  ,0.6317)
                            ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:113:24:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L113) *style:* **Put spaces around all infix operators.**
```r
  weights <- (Accuracy)/sum(Accuracy)
                      ~^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:114:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L114) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:115:73:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L115) *style:* **Trailing whitespace is superfluous.**
```r
  # Turn predictions from factors into integers for combining at the end
                                                                        ^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:116:4:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L116) *style:* **Commented code should be removed.**
```r
  #predict.reg <- as.integer(predict.reg)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:120:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L120) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:122:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L122) *style:* **lines should not be more than 80 characters.**
```r
  predictions <- (weights[1]*predict_dnn + weights[2]*predict_rf + weights[3]*predict_glm)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:122:29:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L122) *style:* **Put spaces around all infix operators.**
```r
  predictions <- (weights[1]*predict_dnn + weights[2]*predict_rf + weights[3]*predict_glm)
                           ~^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:122:54:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L122) *style:* **Put spaces around all infix operators.**
```r
  predictions <- (weights[1]*predict_dnn + weights[2]*predict_rf + weights[3]*predict_glm)
                                                    ~^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:122:78:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L122) *style:* **Put spaces around all infix operators.**
```r
  predictions <- (weights[1]*predict_dnn + weights[2]*predict_rf + weights[3]*predict_glm)
                                                                            ~^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:123:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L123) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:124:28:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L124) *style:* **Trailing whitespace is superfluous.**
```r
  # Make predictions 0 or 1
                           ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:138:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L138) *style:* **Variable and function names should be all lowercase.**
```r
stockPredictions <- categoricalStockPredictions(df)
^~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:138:21:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L138) *style:* **Variable and function names should be all lowercase.**
```r
stockPredictions <- categoricalStockPredictions(df)
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:139:7:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/f0ee900ab68c4f7dccd5090b9d72dcc58efe3b49/IG-CM-MT-MY_mf850finalproject_iii.R#L139) *style:* **Variable and function names should be all lowercase.**
```r
print(stockPredictions)
      ^~~~~~~~~~~~~~~~
```


Is there any performance impact for non-cached catalogs (i.e. catalog plugins)?


Привіт!

    Ок, нагадаю, якщо сама не забуду. Я вже в коді поправила.

Гарного дня :).

18 грудня 2016 р. о 21:51 vryazh <notifications@github.com> написав:

> Створення сканера краще перенести в main метод, а тут його передати
> параметром методу. Нагадай, на занятті це обговоримо
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/ViktoriyaRyazhska/Lv-216.2JavaCore/commit/09054cbebe67e2186c5733d55c114bc3d583e11a#commitcomment-20227250>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ALcQOQWQL80ufBCXqdnYSaTwIxBornDWks5rJY7PgaJpZM4LQN3u>
> .
>


@ntwb https://github.com/postcss/postcss-loader/issues/153


I don't think program is using sqlite3 database, The file date is old and
select from files is showing no records.
I am using python2.7 (debian jessie)

Miki

2016-12-16 15:21 GMT+00:00 Johann Schmitz <notifications@github.com>:

> You have to install memcached to actually use it (something like apt-get
> install memcached) and start it (e.g. /etc/init.d/memcached restart). I
> don't know debian; maybe more configuration is needed.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/ercpe/amavisvt/commit/189ab30951ee4cf42d43ae2f565b74cf85b11d95#commitcomment-20215358>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AXYqzrMil1hCr5bmWIHnk-Z_uNsBiCMSks5rIqxxgaJpZM4LKYhs>
> .
>


Because it’s too long and hard to read.


That's what I figured, too. Thanks for confirming.


134041643-Fault-Fouling-Chiller (rongpengzhang) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-UnitTestsCoverage-Debug: OK (1201 of 1201 tests passed, 0 test warnings)

![Build Badge](http://img.shields.io/badge/build%20status-warnings-yellow.png) ![Test Badge](http://img.shields.io/badge/tests%20passed-100.0%25-green.png) ![Coverage Badge](http://img.shields.io/badge/coverage%20status-36.14%25-green.png)


Any reason this has not yet been merged into the `0.9` branch so far? I mean, Mockery 0.9.5 introduced unlinking the files, so the above (commit message) is exactly what you get with Mockery 0.9.5 and 0.9.6 right now.


Was it intentional to remove the before pseudo selector ?


[MF850Utilities.R:1:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L1) *style:* **Variable and function names should be all lowercase.**
```r
laggedDataFile <- "laggeddata.rds"
^~~~~~~~~~~~~~
```
[MF850Utilities.R:5:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L5) *style:* **Variable and function names should be all lowercase.**
```r
LinearRegrssionFile <- "Linear_Ridge_Lasso.R"
^~~~~~~~~~~~~~~~~~~
```
[MF850Utilities.R:6:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L6) *style:* **Variable and function names should be all lowercase.**
```r
RandomForestRegressionFile <- "random_forest_reg.R"
^~~~~~~~~~~~~~~~~~~~~~~~~~
```
[MF850Utilities.R:7:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L7) *style:* **Variable and function names should be all lowercase.**
```r
LogisticRegressionFile <- "Logistic_Ridge_Lasso.R"
^~~~~~~~~~~~~~~~~~~~~~
```
[MF850Utilities.R:8:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L8) *style:* **Variable and function names should be all lowercase.**
```r
RandomForestCatFile <- "random_forest_cat.R"  # Random forest high/low
^~~~~~~~~~~~~~~~~~~
```
[MF850Utilities.R:9:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L9) *style:* **Variable and function names should be all lowercase.**
```r
LogisticRegressionModelLambdaFile <- "Logistic_Ridge_Lasso_model_lambda.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[MF850Utilities.R:9:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L9) *style:* **Variable and function names should not be longer than 30 characters.**
```r
LogisticRegressionModelLambdaFile <- "Logistic_Ridge_Lasso_model_lambda.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[MF850Utilities.R:12:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L12) *style:* **Variable and function names should be all lowercase.**
```r
LinearRegrssionModelFile <- "Linear_Ridge_Lasso_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~
```
[MF850Utilities.R:13:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L13) *style:* **Variable and function names should be all lowercase.**
```r
LinearRegrssionModelLambdaFile <- "Linear_Ridge_Lasso_model_lambda.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[MF850Utilities.R:14:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L14) *style:* **Variable and function names should be all lowercase.**
```r
RandomForestRegressionModelFile <- "random_forest_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[MF850Utilities.R:14:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L14) *style:* **Variable and function names should not be longer than 30 characters.**
```r
RandomForestRegressionModelFile <- "random_forest_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[MF850Utilities.R:15:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L15) *style:* **Variable and function names should be all lowercase.**
```r
LogisticRegressionModelFile <- "Logistic_Ridge_Lasso_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[MF850Utilities.R:16:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L16) *style:* **Variable and function names should be all lowercase.**
```r
RandomForestCatModelFile <- "random_forest_cat_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~
```
[MF850Utilities.R:18:8:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L18) *style:* **Put spaces around all infix operators.**
```r
par(ask=FALSE)
      ~^~
```
[MF850Utilities.R:25:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L25) *style:* **Variable and function names should be all lowercase.**
```r
loadLaggedDataSet <- function() {
^~~~~~~~~~~~~~~~~
```
[MF850Utilities.R:26:36:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L26) *style:* **Variable and function names should be all lowercase.**
```r
  mynewdataframe <- readRDS(file = laggedDataFile)
                                   ^~~~~~~~~~~~~~
```
[MF850Utilities.R:26:36:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L26) *warning:* **no visible binding for global variable ‘laggedDataFile’**
```r
  mynewdataframe <- readRDS(file = laggedDataFile)
                                   ^~~~~~~~~~~~~~
```
[MF850Utilities.R:31:57:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L31) *style:* **Commas should always have a space after.**
```r
  packagestoinstall_split <- strsplit(packagestoinstall,", ")[[1]]
                                                        ^
```
[MF850Utilities.R:33:7:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L33) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(!packagename %in% rownames(installed.packages())){
      ^
```
[MF850Utilities.R:37:31:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L37) *style:* **Commas should always have a space after.**
```r
      print(paste(packagename,"already installed"))
                              ^
```
[MF850Utilities.R:39:40:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L39) *style:* **Put spaces around all infix operators.**
```r
    library(packagename, character.only=TRUE)
                                      ~^~
```
[MF850Utilities.R:43:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L43) *style:* **Variable and function names should be all lowercase.**
```r
lagStockData <- function(stockdata) {
^~~~~~~~~~~~
```
[MF850Utilities.R:47:6:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L47) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  for(company in companies)
     ^
```
[MF850Utilities.R:48:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L48) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  {
  ^
```
[MF850Utilities.R:50:51:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L50) *style:* **Commas should always have a space after.**
```r
    futurereturns <- c(returns[2:length(returns)],NA)
                                                  ^
```
[MF850Utilities.R:51:29:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L51) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
    if (1 == NROW(returns)) {futurereturns <- c(NA)}
                            ^
```
[MF850Utilities.R:51:52:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L51) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
    if (1 == NROW(returns)) {futurereturns <- c(NA)}
                                                   ^
```
[MF850Utilities.R:52:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L52) *style:* **Trailing whitespace is superfluous.**
```r

^~~~
```
[MF850Utilities.R:54:16:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L54) *style:* **Use <-, not =, for assignment.**
```r
    newdataset = rbind(newdataset, company)
               ^
```
[MF850Utilities.R:56:7:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L56) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(i %% 500 == 0) print(i)
      ^
```
[MF850Utilities.R:58:30:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L58) *style:* **Variable and function names should be all lowercase.**
```r
  saveRDS(newdataset, file = laggedDataFile)
                             ^~~~~~~~~~~~~~
```
[MF850Utilities.R:58:30:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L58) *warning:* **no visible binding for global variable ‘laggedDataFile’**
```r
  saveRDS(newdataset, file = laggedDataFile)
                             ^~~~~~~~~~~~~~
```
[MF850Utilities.R:62:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L62) *style:* **Variable and function names should be all lowercase.**
```r
removeLastMonth <- function(stockdata) {
^~~~~~~~~~~~~~~
```
[MF850Utilities.R:66:6:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L66) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  for(company in companies)
     ^
```
[MF850Utilities.R:67:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L67) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  {
  ^
```
[MF850Utilities.R:68:13:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L68) *style:* **Use <-, not =, for assignment.**
```r
    company = company[-1,]
            ^
```
[MF850Utilities.R:68:26:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L68) *style:* **Commas should always have a space after.**
```r
    company = company[-1,]
                         ^
```
[MF850Utilities.R:69:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L69) *style:* **Trailing whitespace is superfluous.**
```r

^~~~
```
[MF850Utilities.R:70:16:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L70) *style:* **Use <-, not =, for assignment.**
```r
    newdataset = rbind(newdataset, company)
               ^
```
[MF850Utilities.R:72:7:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L72) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(i %% 500 == 0) print(i)
      ^
```
[MF850Utilities.R:76:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L76) *style:* **Trailing blank lines are superfluous.**
```r

^
```


[IG-CM-MT-MY_mf850finalproject_ii.R:3:2:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L3) *style:* **Commented code should be removed.**
```r
#### 12/20/2016
 ^~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:16:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L16) *style:* **Variable and function names should be all lowercase.**
```r
laggedDataFile <- "laggeddata.rds"
^~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:19:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L19) *style:* **Variable and function names should be all lowercase.**
```r
LinearRegrssionFile <- "Linear_Ridge_Lasso.R"
^~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:20:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L20) *style:* **Variable and function names should be all lowercase.**
```r
RandomForestRegressionFile <- "random_forest_reg.R"
^~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:21:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L21) *style:* **Variable and function names should be all lowercase.**
```r
LogisticRegressionFile <- "Logistic_Ridge_Lasso.R"
^~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:22:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L22) *style:* **Variable and function names should be all lowercase.**
```r
RandomForestCatFile <- "random_forest_cat.R"  # Random forest high/low
^~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:23:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L23) *style:* **Variable and function names should be all lowercase.**
```r
LogisticRegressionModelLambdaFile <- "Logistic_Ridge_Lasso_model_lambda.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:23:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L23) *style:* **Variable and function names should not be longer than 30 characters.**
```r
LogisticRegressionModelLambdaFile <- "Logistic_Ridge_Lasso_model_lambda.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:25:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L25) *style:* **Variable and function names should be all lowercase.**
```r
LinearRegrssionModelFile <- "Linear_Ridge_Lasso_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:26:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L26) *style:* **Variable and function names should be all lowercase.**
```r
LinearRegrssionModelLambdaFile <- "Linear_Ridge_Lasso_model_lambda.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:27:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L27) *style:* **Variable and function names should be all lowercase.**
```r
RandomForestRegressionModelFile <- "random_forest_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:27:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L27) *style:* **Variable and function names should not be longer than 30 characters.**
```r
RandomForestRegressionModelFile <- "random_forest_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:28:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L28) *style:* **Variable and function names should be all lowercase.**
```r
LogisticRegressionModelFile <- "Logistic_Ridge_Lasso_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:29:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L29) *style:* **Variable and function names should be all lowercase.**
```r
RandomForestCatModelFile <- "random_forest_cat_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:31:8:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L31) *style:* **Put spaces around all infix operators.**
```r
par(ask=FALSE)
      ~^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:36:57:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L36) *style:* **Commas should always have a space after.**
```r
  packagestoinstall_split <- strsplit(packagestoinstall,", ")[[1]]
                                                        ^
```
[IG-CM-MT-MY_mf850finalproject_ii.R:38:7:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L38) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(!packagename %in% rownames(installed.packages())){
      ^
```
[IG-CM-MT-MY_mf850finalproject_ii.R:42:31:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L42) *style:* **Commas should always have a space after.**
```r
      print(paste(packagename,"already installed"))
                              ^
```
[IG-CM-MT-MY_mf850finalproject_ii.R:44:40:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L44) *style:* **Put spaces around all infix operators.**
```r
    library(packagename, character.only=TRUE)
                                      ~^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:49:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L49) *style:* **Variable and function names should be all lowercase.**
```r
regressionStockPredictions <- function(df) {
^~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:50:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L50) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:55:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L55) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:56:61:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L56) *style:* **Trailing whitespace is superfluous.**
```r
  # Scale data - remove categorical variable and add it back
                                                            ^
```
[IG-CM-MT-MY_mf850finalproject_ii.R:62:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L62) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:64:13:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L64) *style:* **Trailing whitespace is superfluous.**
```r
  ### GLMNET
            ^
```
[IG-CM-MT-MY_mf850finalproject_ii.R:66:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L66) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:67:48:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L67) *style:* **Trailing whitespace is superfluous.**
```r
  # Import glmnet model and parameter from file
                                               ^
```
[IG-CM-MT-MY_mf850finalproject_ii.R:68:23:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L68) *style:* **Variable and function names should be all lowercase.**
```r
  glm_best <- readRDS(LinearRegrssionModelFile)
                      ^~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:68:23:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L68) *warning:* **no visible binding for global variable ‘LinearRegrssionModelFile’**
```r
  glm_best <- readRDS(LinearRegrssionModelFile)
                      ^~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:69:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L69) *style:* **Variable and function names should be all lowercase.**
```r
  bestLambda <- readRDS(LinearRegrssionModelLambdaFile)
  ^~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:69:25:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L69) *style:* **Variable and function names should be all lowercase.**
```r
  bestLambda <- readRDS(LinearRegrssionModelLambdaFile)
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:69:25:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L69) *warning:* **no visible binding for global variable ‘LinearRegrssionModelLambdaFile’**
```r
  bestLambda <- readRDS(LinearRegrssionModelLambdaFile)
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:70:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L70) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:71:29:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L71) *style:* **Trailing whitespace is superfluous.**
```r
  # Reformat data for glmnet
                            ^
```
[IG-CM-MT-MY_mf850finalproject_ii.R:73:57:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L73) *style:* **Trailing whitespace is superfluous.**
```r
  # Predict using optimal Linear Regression Coefficients
                                                        ^
```
[IG-CM-MT-MY_mf850finalproject_ii.R:74:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L74) *style:* **lines should not be more than 80 characters.**
```r
  predict_glm <- predict.glmnet(glm_best, newx = x_data_lin, type = "response", s = bestLambda)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:74:18:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L74) *warning:* **no visible global function definition for ‘predict.glmnet’**
```r
  predict_glm <- predict.glmnet(glm_best, newx = x_data_lin, type = "response", s = bestLambda)
                 ^~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:74:85:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L74) *style:* **Variable and function names should be all lowercase.**
```r
  predict_glm <- predict.glmnet(glm_best, newx = x_data_lin, type = "response", s = bestLambda)
                                                                                ^~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:75:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L75) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:77:19:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L77) *style:* **Trailing whitespace is superfluous.**
```r
  ## Random Forest
                  ^
```
[IG-CM-MT-MY_mf850finalproject_ii.R:79:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L79) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:80:58:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L80) *style:* **Trailing whitespace is superfluous.**
```r
  # Import random forest model from file - has 1400 trees
                                                         ^
```
[IG-CM-MT-MY_mf850finalproject_ii.R:81:27:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L81) *style:* **Variable and function names should be all lowercase.**
```r
  rf_reg_model <- readRDS(RandomForestRegressionModelFile)
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:81:27:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L81) *style:* **Variable and function names should not be longer than 30 characters.**
```r
  rf_reg_model <- readRDS(RandomForestRegressionModelFile)
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:81:27:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L81) *warning:* **no visible binding for global variable ‘RandomForestRegressionModelFile’**
```r
  rf_reg_model <- readRDS(RandomForestRegressionModelFile)
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:82:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L82) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:85:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L85) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:86:32:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L86) *style:* **Trailing whitespace is superfluous.**
```r
  # Predict using Random Forest
                               ^
```
[IG-CM-MT-MY_mf850finalproject_ii.R:88:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L88) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:92:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L92) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:93:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L93) *warning:* **no visible global function definition for ‘h2o.init’**
```r
  h2o.init(nthreads = -1)
  ^~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:94:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L94) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:95:21:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L95) *warning:* **no visible global function definition for ‘as.h2o’**
```r
  x_data_h2o.hex <- as.h2o(x_data_lin)
                    ^~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:96:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L96) *style:* **Variable and function names should be all lowercase.**
```r
  dnnModel <- h2o.loadModel("DNNmodel/DNNmodel")
  ^~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:96:15:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L96) *style:* **Variable and function names should be all lowercase.**
```r
  dnnModel <- h2o.loadModel("DNNmodel/DNNmodel")
              ^~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:96:15:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L96) *warning:* **no visible global function definition for ‘h2o.loadModel’**
```r
  dnnModel <- h2o.loadModel("DNNmodel/DNNmodel")
              ^~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:97:32:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L97) *warning:* **no visible global function definition for ‘h2o.predict’**
```r
  predict.reg <- as.data.frame(h2o.predict(dnnModel, x_data_h2o.hex))
                               ^~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:97:44:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L97) *style:* **Variable and function names should be all lowercase.**
```r
  predict.reg <- as.data.frame(h2o.predict(dnnModel, x_data_h2o.hex))
                                           ^~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:98:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L98) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:99:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L99) *warning:* **no visible global function definition for ‘h2o.shutdown’**
```r
  h2o.shutdown(prompt = FALSE)
  ^~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:100:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L100) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:104:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L104) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:106:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L106) *style:* **lines should not be more than 80 characters.**
```r
  predictions <- (weights[1]*predict.reg$predict + weights[2]*predict_rf + weights[3]*predict_glm)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:106:29:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L106) *style:* **Put spaces around all infix operators.**
```r
  predictions <- (weights[1]*predict.reg$predict + weights[2]*predict_rf + weights[3]*predict_glm)
                           ~^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:106:62:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L106) *style:* **Put spaces around all infix operators.**
```r
  predictions <- (weights[1]*predict.reg$predict + weights[2]*predict_rf + weights[3]*predict_glm)
                                                            ~^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:106:86:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L106) *style:* **Put spaces around all infix operators.**
```r
  predictions <- (weights[1]*predict.reg$predict + weights[2]*predict_rf + weights[3]*predict_glm)
                                                                                ~^~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:106:99:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L106) *style:* **Trailing whitespace is superfluous.**
```r
  predictions <- (weights[1]*predict.reg$predict + weights[2]*predict_rf + weights[3]*predict_glm)
                                                                                ^
```
[IG-CM-MT-MY_mf850finalproject_ii.R:118:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L118) *style:* **Variable and function names should be all lowercase.**
```r
stockPredictions <- regressionStockPredictions(df)
^~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:118:21:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L118) *style:* **Variable and function names should be all lowercase.**
```r
stockPredictions <- regressionStockPredictions(df)
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_ii.R:119:7:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_ii.R#L119) *style:* **Variable and function names should be all lowercase.**
```r
print(stockPredictions)
      ^~~~~~~~~~~~~~~~
```


[IG-CM-MT-MY_mf850finalproject_iii.R:3:2:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L3) *style:* **Commented code should be removed.**
```r
#### 12/20/2016
 ^~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:16:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L16) *style:* **Variable and function names should be all lowercase.**
```r
laggedDataFile <- "laggeddata.rds"
^~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:19:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L19) *style:* **Variable and function names should be all lowercase.**
```r
LinearRegrssionFile <- "Linear_Ridge_Lasso.R"
^~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:20:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L20) *style:* **Variable and function names should be all lowercase.**
```r
RandomForestRegressionFile <- "random_forest_reg.R"
^~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:21:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L21) *style:* **Variable and function names should be all lowercase.**
```r
LogisticRegressionFile <- "Logistic_Ridge_Lasso.R"
^~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:22:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L22) *style:* **Variable and function names should be all lowercase.**
```r
RandomForestCatFile <- "random_forest_cat.R"
^~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:23:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L23) *style:* **Variable and function names should be all lowercase.**
```r
LogisticRegressionModelLambdaFile <- "Logistic_Ridge_Lasso_model_lambda.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:23:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L23) *style:* **Variable and function names should not be longer than 30 characters.**
```r
LogisticRegressionModelLambdaFile <- "Logistic_Ridge_Lasso_model_lambda.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:25:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L25) *style:* **Variable and function names should be all lowercase.**
```r
LinearRegrssionModelFile <- "Linear_Ridge_Lasso_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:26:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L26) *style:* **Variable and function names should be all lowercase.**
```r
LinearRegrssionModelLambdaFile <- "Linear_Ridge_Lasso_model_lambda.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:27:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L27) *style:* **Variable and function names should be all lowercase.**
```r
RandomForestRegressionModelFile <- "random_forest_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:27:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L27) *style:* **Variable and function names should not be longer than 30 characters.**
```r
RandomForestRegressionModelFile <- "random_forest_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:28:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L28) *style:* **Variable and function names should be all lowercase.**
```r
LogisticRegressionModelFile <- "Logistic_Ridge_Lasso_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:29:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L29) *style:* **Variable and function names should be all lowercase.**
```r
RandomForestCatModelFile <- "random_forest_cat_model.rds"
^~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:31:8:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L31) *style:* **Put spaces around all infix operators.**
```r
par(ask=FALSE)
      ~^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:36:57:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L36) *style:* **Commas should always have a space after.**
```r
  packagestoinstall_split <- strsplit(packagestoinstall,", ")[[1]]
                                                        ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:38:7:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L38) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(!packagename %in% rownames(installed.packages())){
      ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:42:31:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L42) *style:* **Commas should always have a space after.**
```r
      print(paste(packagename,"already installed"))
                              ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:44:40:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L44) *style:* **Put spaces around all infix operators.**
```r
    library(packagename, character.only=TRUE)
                                      ~^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:50:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L50) *style:* **Variable and function names should be all lowercase.**
```r
categoricalStockPredictions <- function(df) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:55:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L55) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:56:61:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L56) *style:* **Trailing whitespace is superfluous.**
```r
  # Scale data - remove categorical variable and add it back
                                                            ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:62:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L62) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:64:4:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L64) *style:* **Commented code should be removed.**
```r
  ### GLMNET - LOGISITIC
   ^~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:64:25:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L64) *style:* **Trailing whitespace is superfluous.**
```r
  ### GLMNET - LOGISITIC
                        ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:66:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L66) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:67:48:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L67) *style:* **Trailing whitespace is superfluous.**
```r
  # Import glmnet model and parameter from file
                                               ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:68:23:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L68) *style:* **Variable and function names should be all lowercase.**
```r
  glm_best <- readRDS(LogisticRegressionModelFile)
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:68:23:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L68) *warning:* **no visible binding for global variable ‘LogisticRegressionModelFile’**
```r
  glm_best <- readRDS(LogisticRegressionModelFile)
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:69:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L69) *style:* **Variable and function names should be all lowercase.**
```r
  bestLambda <- readRDS(LogisticRegressionModelLambdaFile)
  ^~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:69:25:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L69) *style:* **Variable and function names should be all lowercase.**
```r
  bestLambda <- readRDS(LogisticRegressionModelLambdaFile)
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:69:25:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L69) *style:* **Variable and function names should not be longer than 30 characters.**
```r
  bestLambda <- readRDS(LogisticRegressionModelLambdaFile)
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:69:25:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L69) *warning:* **no visible binding for global variable ‘LogisticRegressionModelLambdaFile’**
```r
  bestLambda <- readRDS(LogisticRegressionModelLambdaFile)
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:70:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L70) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:71:29:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L71) *style:* **Trailing whitespace is superfluous.**
```r
  # Reformat data for glmnet
                            ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:73:57:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L73) *style:* **Trailing whitespace is superfluous.**
```r
  # Predict using optimal Linear Regression Coefficients
                                                        ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:74:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L74) *style:* **lines should not be more than 80 characters.**
```r
  predict_glm <- predict.glmnet(glm_best, newx = x_data_lin, type = "response", s = bestLambda)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:74:18:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L74) *warning:* **no visible global function definition for ‘predict.glmnet’**
```r
  predict_glm <- predict.glmnet(glm_best, newx = x_data_lin, type = "response", s = bestLambda)
                 ^~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:74:85:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L74) *style:* **Variable and function names should be all lowercase.**
```r
  predict_glm <- predict.glmnet(glm_best, newx = x_data_lin, type = "response", s = bestLambda)
                                                                                ^~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:75:45:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L75) *style:* **Trailing whitespace is superfluous.**
```r
  # Change log odds to categorical variables
                                            ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:76:46:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L76) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  predictions <- ifelse(predictions > 0, 1, 0 )
                                             ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:77:50:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L77) *style:* **Trailing whitespace is superfluous.**
```r
  # Ensure data types are the same int -> factors
                                                 ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:79:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L79) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:81:19:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L81) *style:* **Trailing whitespace is superfluous.**
```r
  ## Random Forest
                  ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:83:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L83) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:84:58:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L84) *style:* **Trailing whitespace is superfluous.**
```r
  # Import random forest model from file - has 1400 trees
                                                         ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:85:27:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L85) *style:* **Variable and function names should be all lowercase.**
```r
  rf_cat_model <- readRDS(RandomForestCatModelFile)
                          ^~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:85:27:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L85) *warning:* **no visible binding for global variable ‘RandomForestCatModelFile’**
```r
  rf_cat_model <- readRDS(RandomForestCatModelFile)
                          ^~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:86:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L86) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:89:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L89) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:90:32:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L90) *style:* **Trailing whitespace is superfluous.**
```r
  # Predict using Random Forest
                               ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:92:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L92) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:96:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L96) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:97:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L97) *warning:* **no visible global function definition for ‘h2o.init’**
```r
  h2o.init(nthreads = -1)
  ^~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:98:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L98) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:99:21:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L99) *warning:* **no visible global function definition for ‘as.h2o’**
```r
  x_data_h2o.hex <- as.h2o(x_data_lin)
                    ^~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:100:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L100) *style:* **Variable and function names should be all lowercase.**
```r
  dnnModel <- h2o.loadModel("DNNmodel_cat/DNNmodel_cat")
  ^~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:100:15:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L100) *style:* **Variable and function names should be all lowercase.**
```r
  dnnModel <- h2o.loadModel("DNNmodel_cat/DNNmodel_cat")
              ^~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:100:15:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L100) *warning:* **no visible global function definition for ‘h2o.loadModel’**
```r
  dnnModel <- h2o.loadModel("DNNmodel_cat/DNNmodel_cat")
              ^~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:101:32:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L101) *warning:* **no visible global function definition for ‘h2o.predict’**
```r
  predict.reg <- as.data.frame(h2o.predict(dnnModel, x_data_h2o.hex))
                               ^~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:101:44:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L101) *style:* **Variable and function names should be all lowercase.**
```r
  predict.reg <- as.data.frame(h2o.predict(dnnModel, x_data_h2o.hex))
                                           ^~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:102:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L102) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:103:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L103) *warning:* **no visible global function definition for ‘h2o.shutdown’**
```r
  h2o.shutdown(prompt = FALSE)
  ^~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:104:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L104) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:105:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L105) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:107:17:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L107) *style:* **Trailing whitespace is superfluous.**
```r
  ## Predictions
                ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:109:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L109) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:111:26:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L111) *style:* **Trailing whitespace is superfluous.**
```r
  # Order is DNN, RF, GLM
                         ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:112:28:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L112) *style:* **Commas should never have a space before.**
```r
  Accuracy <- c(.8, 0.356  ,0.6317)
                         ~~^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:112:29:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L112) *style:* **Commas should always have a space after.**
```r
  Accuracy <- c(.8, 0.356  ,0.6317)
                            ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:113:24:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L113) *style:* **Put spaces around all infix operators.**
```r
  weights <- (Accuracy)/sum(Accuracy)
                      ~^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:114:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L114) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:115:73:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L115) *style:* **Trailing whitespace is superfluous.**
```r
  # Turn predictions from factors into integers for combining at the end
                                                                        ^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:116:4:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L116) *style:* **Commented code should be removed.**
```r
  #predict.reg <- as.integer(predict.reg)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:120:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L120) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:122:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L122) *style:* **lines should not be more than 80 characters.**
```r
  predictions <- (weights[1]*predict_dnn + weights[2]*predict_rf + weights[3]*predict_glm)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:122:29:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L122) *style:* **Put spaces around all infix operators.**
```r
  predictions <- (weights[1]*predict_dnn + weights[2]*predict_rf + weights[3]*predict_glm)
                           ~^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:122:54:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L122) *style:* **Put spaces around all infix operators.**
```r
  predictions <- (weights[1]*predict_dnn + weights[2]*predict_rf + weights[3]*predict_glm)
                                                    ~^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:122:78:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L122) *style:* **Put spaces around all infix operators.**
```r
  predictions <- (weights[1]*predict_dnn + weights[2]*predict_rf + weights[3]*predict_glm)
                                                                            ~^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:123:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L123) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:124:28:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L124) *style:* **Trailing whitespace is superfluous.**
```r
  # Make predictions 0 or 1
                           ^
```
[IG-CM-MT-MY_mf850finalproject_iii.R:138:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L138) *style:* **Variable and function names should be all lowercase.**
```r
stockPredictions <- categoricalStockPredictions(df)
^~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:138:21:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L138) *style:* **Variable and function names should be all lowercase.**
```r
stockPredictions <- categoricalStockPredictions(df)
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[IG-CM-MT-MY_mf850finalproject_iii.R:139:7:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/IG-CM-MT-MY_mf850finalproject_iii.R#L139) *style:* **Variable and function names should be all lowercase.**
```r
print(stockPredictions)
      ^~~~~~~~~~~~~~~~
```


Github had incorrectly identified one of the other license files as the license for this repository, so this file was created to prevent it from saying this was licensed under the MIT license, which it is not.


@latobarita: retry


一大 波 rxjava 正在袭来，欢迎服用 😄


r+


Upstreamed, thanks @joto


活在梦里 size是啥，帮你改了


Oops. Updated.


[test_train_split_by_date.R:6:9:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/b148facaeae44c6590cae4c79940e890681514fd/test_train_split_by_date.R#L6) *style:* **Variable and function names should be all lowercase.**
```r
data <- loadLaggedDataSet()
        ^~~~~~~~~~~~~~~~~
```
[test_train_split_by_date.R:77:19:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/b148facaeae44c6590cae4c79940e890681514fd/test_train_split_by_date.R#L77) *style:* **Place a space before left parenthesis, except in a function call.**
```r
MSE_train <- mean((y_train - mean(y_train)) ^ 2)
                  ^
```
[test_train_split_by_date.R:78:18:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/b148facaeae44c6590cae4c79940e890681514fd/test_train_split_by_date.R#L78) *style:* **Place a space before left parenthesis, except in a function call.**
```r
MSE_test <- mean((y_test - mean(y_train)) ^ 2)
                 ^
```
[test_train_split_by_date.R:81:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/b148facaeae44c6590cae4c79940e890681514fd/test_train_split_by_date.R#L81) *style:* **Commented code should be removed.**
```r
# write.csv(test_set, file = "Test_set.csv")
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[test_train_split_by_date.R:82:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/b148facaeae44c6590cae4c79940e890681514fd/test_train_split_by_date.R#L82) *style:* **Commented code should be removed.**
```r
# write.csv(train_set, file = "Train_set.csv")
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[test_train_split_by_date.R:101:33:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/b148facaeae44c6590cae4c79940e890681514fd/test_train_split_by_date.R#L101) *style:* **Trailing whitespace is superfluous.**
```r
train_set5$futurereturns <- NULL
                                ^
```
[test_train_split_by_date.R:103:2:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/b148facaeae44c6590cae4c79940e890681514fd/test_train_split_by_date.R#L103) *style:* **Commented code should be removed.**
```r
#write.csv(train_set5, file = "TestDF_no_returns.csv")
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[test_train_split_by_date.R:104:2:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/b148facaeae44c6590cae4c79940e890681514fd/test_train_split_by_date.R#L104) *style:* **Commented code should be removed.**
```r
#write.csv(train_set_results, file = "TestDF_returns.csv")
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[test_train_split_by_date.R:105:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/b148facaeae44c6590cae4c79940e890681514fd/test_train_split_by_date.R#L105) *style:* **Trailing blank lines are superfluous.**
```r

^
```