Publications by Khongorzul
makeup test
## Loading required package: Matrix ## Loaded glmnet 4.1-8 ## [1] 14.88459 ## [1] 1.184701 ## [1] 1.23797 ## alpha mse fit.name ## 1 0.0 14.918840 alpha0 ## 2 0.1 2.256924 alpha0.1 ## 3 0.2 1.472927 alpha0.2 ## 4 0.3 1.362394 alpha0.3 ## 5 0.4 1.259794 alpha0.4 ## 6 0.5 1.252103 alpha0.5 ## 7 0.6 1.253330 alpha...
9 sym
Khongorzul
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
final-exam_part2
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 (6893 sym/37 pcs) 5 img
Midterm
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 (16150 sym/62 pcs) 2 img
Khongorzul
## ## 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
Khongorzul
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
Final
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.4 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggplot2 3.4.4 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.3 ✔ tidyr 1.3.0 ## ✔ purrr 1.0.2...
344 sym Python (8662 sym/12 pcs) 1 img
Final
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.4 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggplot2 3.4.4 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.3 ✔ tidyr 1.3.0 ## ✔ purrr 1.0.2...
236 sym R (6937 sym/13 pcs)