Publications by Nomundari
Nomundari
library(MASS) library(caret) ## Loading required package: ggplot2 ## Loading required package: lattice library(ISLR) library(e1071) library(class) library(glmnet) ## Loading required package: Matrix ## Loaded glmnet 4.1-8 library(pls) ## ## Attaching package: 'pls' ## The following object is masked from 'package:caret': ## ## R2 ## The follow...
599 sym R (17752 sym/86 pcs) 2 img
Publish Document
1. Import ETF Data ## Loading required package: lubridate ## ## Attaching package: 'lubridate' ## The following objects are masked from 'package:base': ## ## date, intersect, setdiff, union ## Loading required package: PerformanceAnalytics ## Loading required package: xts ## Loading required package: zoo ## ## Attaching package: 'zoo' ## The...
322 sym Python (7707 sym/26 pcs)
Homework
By following the 5 factor model and 10 industry monthly returns based on Fama-French database website. (https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html), you can construct the MVP portfolio and its monthly returns using the previous 5-year monthly returns data. Show its cumulative returns starting from 1969. library(tidyve...
351 sym R (4782 sym/11 pcs) 1 img
homework
## ── Attaching packages ────────────────────────────────────── tidymodels 1.2.0 ── ## ✔ broom 1.0.5 ✔ recipes 1.0.10 ## ✔ dials 1.2.1 ✔ rsample 1.2.1 ## ✔ dplyr 1.1.4 ✔ tibble 3.2.1 ## ✔ ggplot2 ...
43 sym Python (6895 sym/37 pcs) 5 img
Publish Document
Q1. This question should be answered with data mtcars. (a) Descriptive statistics for mtcars dataset: # Load required packages install.packages(c("psych", "tidyverse", "tidymodels", "vip", "ISLR2")) ## Installing packages into '/cloud/lib/x86_64-pc-linux-gnu-library/4.3' ## (as 'lib' is unspecified) library(psych) library(tidyverse) ## ── Atta...
1690 sym R (16142 sym/62 pcs) 2 img
Nomundari
## ## setosa versicolor virginica ## 50 50 50 ## Call: ## lda(Species ~ ., data = iris) ## ## Prior probabilities of groups: ## setosa versicolor virginica ## 0.3333333 0.3333333 0.3333333 ## ## Group means: ## Sepal.Length Sepal.Width Petal.Length Petal.Width ## setosa 5.006 3...
11 sym 3 img
Nomundari
The Stock Market Data Logistic Regression ## Call: ## lda(Direction ~ Lag1 + Lag2, data = Smarket, subset = train) ## ## Prior probabilities of groups: ## Down Up ## 0.491984 0.508016 ## ## Group means: ## Lag1 Lag2 ## Down 0.04279022 0.03389409 ## Up -0.03954635 -0.03132544 ## ## Coefficients of linear discri...
91 sym 1 img
midterm
## Loading required package: lubridate ## ## Attaching package: 'lubridate' ## The following objects are masked from 'package:base': ## ## date, intersect, setdiff, union ## Loading required package: PerformanceAnalytics ## Loading required package: xts ## Loading required package: zoo ## ## Attaching package: 'zoo' ## The following objects ...
88 sym Python (11380 sym/37 pcs)
HW-2
The Stock Market Data library(ISLR) names(Smarket) ## [1] "Year" "Lag1" "Lag2" "Lag3" "Lag4" "Lag5" ## [7] "Volume" "Today" "Direction" dim(Smarket) ## [1] 1250 9 summary(Smarket) ## Year Lag1 Lag2 Lag3 ## Min. :2001 Min. :-4.922000 Min. :-4.9...
95 sym R (6055 sym/44 pcs) 2 img
Homework1
# 3.6.1 to 3.6.6. library(ISLR2) data("Boston") attach(Boston) lm.fit <- lm(medv ~ lstat, data = Boston) lm.fit ## ## Call: ## lm(formula = medv ~ lstat, data = Boston) ## ## Coefficients: ## (Intercept) lstat ## 34.55 -0.95 summary(lm.fit) ## ## Call: ## lm(formula = medv ~ lstat, data = Boston) ## ## Residuals: ## M...
56 sym R (10312 sym/44 pcs) 9 img