Publications by Leo Tzang
In class exercise 3
#Resampling Methods library(tidymodels) ## ── 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 �...
43 sym R (11560 sym/39 pcs) 1 img
Homework4
etf6 <- read.table('ETF6_20080101-20200430.csv', sep = ',', header = T) # head(etf6) ## 證券代碼 簡稱 年月日 收盤價.元. ## 1 0050 元大台灣50 20080102 39.6472 ## 2 0052 富邦科技 20080102 27.0983 ## 3 0056 元大高股息 20080102 14.5739 ## 4 0050 元大台灣50 20080103 38....
42 sym R (6621 sym/38 pcs) 1 img
Hw04
etf6 <- read.table('ETF6_20080101-20200430.csv', sep = ',', header = T) # head(etf6) ## 證券代碼 簡稱 年月日 收盤價.元. ## 1 0050 元大台灣50 20080102 39.6472 ## 2 0052 富邦科技 20080102 27.0983 ## 3 0056 元大高股息 20080102 14.5739 ## 4 0050 元大台灣50 20080103 38....
42 sym R (6621 sym/38 pcs) 1 img
Document
# https://bookdown.org/kochiuyu/Technical-Analysis-with-R/technical-indicators.html # This is the case of downloading data from TEJ rm(list=ls()) con = gzcon(url('https://github.com/systematicinvestor/SIT/raw/master/sit.gz', 'rb')) source(con) close(con) install.packages('pacman') ## Installing package into '/cloud/lib/x86_64-pc-linux-gnu-library/...
19 sym R (2621 sym/16 pcs)
Midterm_112035134
# Q1 library(psych) library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.5 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.3 ✔...
61 sym R (24616 sym/54 pcs) 8 img
LDA_Munkhzul
library(MASS) table(iris$Species) ## ## setosa versicolor virginica ## 50 50 50 lookup <- c(setosa='blue', versicolor='green', virginica='orange') col.ind <- lookup[iris$Species] pairs(iris[-5], pch=21, col="gray", bg=col.ind) lda.fit <- lda(Species ~ ., data = iris) lda.fit ## Call: ## lda(Species ~ ., data = iris) ...
606 sym R (2011 sym/15 pcs) 3 img
Document
library(MASS) table(iris$Species) ## ## setosa versicolor virginica ## 50 50 50 lookup <- c(setosa='blue', versicola='green', virginica='orange') col.ind <- lookup[iris$Species] pairs(iris[-5], pch=21, col="gray", bg=col.ind) lda.fit <- lda(Species ~ ., data = iris) lda.fit ## Call: ## lda(Species ~ ., data = iris) #...
20 sym R (1814 sym/14 pcs) 3 img
Document
library(ISLR2) data(Smarket) 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.922000 ...
120 sym R (23281 sym/115 pcs) 2 img
Shurtsetseg
## 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 ...
81 sym Python (11380 sym/37 pcs)
Munkhzul
## 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 ...
81 sym Python (11380 sym/37 pcs)