.chapter1<-function(i=0){ " i Chapter 1: Introduction - ------------------------------------- 1 Self-introduction 2 : my teaching style 3 R : how to download and install R 4 : how to launch and quit R? 5 : One line for this course 6 : R is case-sensitive 7 syllabus 8 : Instructor etc. 9 : Time and location 10 : Description of the course 11 : Course material and software 12 : software: orange 13 14 15 16 17 18 19 Videos 20 Links Example #1:>.c1 # see the above list Example #2:>.c1() # the same as the above Example #3:>.c1(1) # see the first explanation ";.zchapter1(i)} .n1chapter<-20 .zchapter1<-function(i){ if(i==0){ print(.c1) }else{ .printEachQ(1,i,.n1chapter) } } .c1<-.chapter1 .C1EXPLAIN1<-"Self-introduction //////////////////////////////// My name is Paul Yan Since graduating from McGill University with a Ph.D. in finance, Dr. Yan has taught various finance/business statistics/data analytics courses at eight universities (2 in Canada, 1 in Singapore, and 5 in the US). He has 31 publications, including nine books. His research papers were published in the Journal of Fixed Income, Journal of Banking and Finance, and Journal of Empirical Finance. He is good at several programming languages, such as R, Python, SAS, Octave, Matlab, and C. Here are his books: Learning R and Python for Business School Students (2023), Python for Finance (2nd ed., 2017), Python for Finance (Chinese and Korean translations, 2017), Hands-on Data Science with Anaconda (with James Yan,2018), Financial Modeling using R (2018). At least eight finance professors adopted his R and Python books. He is an expert in financial data analytics. From 2003 to 2010, he worked at the Wharton School as a Technical Director, helping researchers with their programs and data issues. Three-word summary of his background: finance, programming, and data. His one-page CV http://datayyy.com/doc_pdf/paul1page.pdf /////////////////////////////// " .C1EXPLAIN2<-"My teaching style //////////////////////////////// 1) hands-on 2) In-class exercises 3) using one of the following computational tools a) excel, b) R, or c) Python 4) In an R-assisted learning environment my paper /////////////////////////////// " .C1EXPLAIN3<-"From where to download R //////////////////////////////// To install R, we have the following steps: Step 1: go to http://r-project.org Step 2: click \"CRAN\" on the left Step 3: Choose a server nearby Step 4: Choose appropriate type, such as Windows, Mac Step 5: download \"Base\" /////////////////////////////// " .C1EXPLAIN4<-"launch/quit R, one line for this course //////////////////////////////// There are several ways to quit R ------------------------------- 1) type q() 2) click \"File\" -> \"Quit\" 3) click the red x on top right Note: after type q(), you will be asked \"Keep the objectives\". If you want to keep your variables or functions, answer \"yes\". Otherwise, no. /////////////////////////////// " .C1EXPLAIN6<-"R is case sensitive //////////////////////////////// One-line R code for this course --------------------------------- After launching R, issue the following line. source(\"http://datayyy.com/fin136.txt\") Note that R is case sensitive. /////////////////////////////// " .C1EXPLAIN7<-" //////////////////////////////// Syllabus http://datayyy.com/fin136/syllabus.pdf /////////////////////////////// " .C1EXPLAIN8<-"instructor etc. //////////////////////////////// INSTRUCTOR’S NAME Dr. John Lynch OFFICE HOURS LOCATION OF OFFICE 430 Leo A. Guthart Hall PHONE EXTENSION ON CAMPUS 516-463-5329 E-MAIL ADDRESS John.Lynch@hofstra.edu GENERAL INFORMATION Location of Department Office Leo A. Guthart Hall, Suite 433 East Telephone number of Department 516-463-5698 Department Chairperson Dr. Nina Wan //////////////////////////////// " .C1EXPLAIN9<-"Description of the course //////////////////////////////// Fall 2024 Semester, Sec. 01 TR : 9:40-11:05AM, CRN : 92950 Location: 104 CV Starr Hall 9/3 9/5 9/10 9/12 9/17 9/19 9/24 9/2 10/1 10/3 //////////////////////////////// " .C1EXPLAIN10<-"Description of the course //////////////////////////////// An overview of recent technological advances that are radically changing the financial services industry. Discussions include how new technologies create value in the financial industry, and the competitive landscape and the market opportunities and threats for incumbents and new entrants. Topics cover an overview of FinTech sector, distributed ledgers, blockchains, initial coin offerings (ICOs), cryptocurrencies, applications of artificial intelligence and machine learning to finance sector, including algorithmic trading and robo-advising. /////////////////////////////// " .C1EXPLAIN11<-"COURSE MATERIALS / SOFTWARE: //////////////////////////////// COURSE MATERIALS / SOFTWARE: The course is taught through lectures, case studies, and some selected articles. There is no required textbook, as there is not yet a comprehensive textbook available in this field. There will be required readings assigned in preparation for several classes. The required HBS cases are available online. In order to purchase the cases, the students need to access the Harvard Business Publishing website at https://hbsp.harvard.edu/import/1188722 and click the Purchase Course button. Additional articles and other materials will be posted directly to Canvas. Finally, we will have hands-on data analysis exercises using the Orange data mining software, which provides an open source machine learning and data visualization toolbox. The assignments may require using basic statistical tools, but programming skills are not required. Students will be given the opportunity to acquire required skills from online tools and supplied materials //////////////////////////////// " .C1EXPLAIN12<-"software: orange //////////////////////////////// https://orangedatamining.com/download/ /////////////////////////////// " .C1EXPLAIN13<-"head() and tail() functions //////////////////////////////// > set.seed(123) > x=rnorm(100) > head(x) [1] -0.56047565 -0.23017749 1.55870831 0.07050839 0.12928774 1.71506499 > tail(x,2) [1] -0.2357004 -1.0264209 /////////////////////////////// " .C1EXPLAIN14<-"mean() for mean and sd() for standard deviation //////////////////////////////// > set.seed(123) > x=rnorm(100) > mean(x) [1] 0.09040591 sd() for estimating standard deviation > set.seed(123) > ret<-rnorm(100) > sd(ret) [1] 0.9128159 //////////////////////////////// " .C1EXPLAIN15<-"put several command lines together //////////////////////////////// We use semicolon to separate them > x<-10;y<-20 # several commands together /////////////////////////////// " .C1EXPLAIN16<-"the simplest function //////////////////////////////// Here is one line function for the present value Example #1: double any input value dd=function(x)2*x dd is the function name function is the keyword x in the parentheses is the input value 2*x is the output put > dd(2.3) [1] 4.6 Example #2: >pv_function<-function(fv,r,n)fv/(1+r)^n >pv_funtion(100,0.1,1) [1] 90.90909 /////////////////////////////// " .C1EXPLAIN17<-"use .nLetterFunction() to show all n-letter functions //////////////////////////////// To see how to use this function, just type its name >.nLetterFunctions To find out all embedded functions with just 3-letter long > .nLetterFunctions(3) [1] \"$<-\" \"%*%\" \"%/%\" \"%o%\" \"%x%\" \".gt\" \":::\" \"@<-\" \"[<-\" \"<<-\" \"abs\" \"acf\" [13] \"AIC\" \"all\" \"any\" \"aov\" \"Arg\" \"ave\" \"BIC\" \"bmp\" \"BOD\" \"box\" \"bxp\" \"cat\" [25] \"ccf\" \"co2\" \"CO2\" \"col\" \"cor\" \"cos\" \"cov\" \"cut\" \"det\" \"dim\" \"dir\" \"end\" [37] \"exp\" \"fft\" \"fix\" \"for\" \"get\" \"glm\" \"hat\" \"hcl\" \"hsv\" \"IQR\" \"lag\" \"lcm\" [49] \"log\" \"mad\" \"Map\" \"max\" \"min\" \"Mod\" \"new\" \"nlm\" \"nls\" \"npk\" \"Ops\" \"par\" [61] \"pdf\" \"pie\" \"png\" \"ppr\" \"raw\" \"rep\" \"rev\" \"rgb\" \"rle\" \"row\" \"rug\" \"seq\" [73] \"sin\" \"SSD\" \"stl\" \"str\" \"sub\" \"sum\" \"svd\" \"svg\" \"tan\" \"tar\" \"try\" \"tsp\" [85] \"unz\" \"url\" \"var\" \"x11\" \"X11\" \"xor\" \"zip\" /////////////////////////////// " .C1EXPLAIN18<-"Using help() function //////////////////////////////// For example, we want to know more about the mean() function > help(mean) /////////////////////////////// " .C1EXPLAIN19<-"Videos //////////////////////////////// YouTube: how to download and install R (6m39s) [for windows) https://www.youtube.com/watch?v=ZoPJGmpYJzw YouTube: Programming in R - Getting Started - Installing R and RStudio on a Mac (5m59s) https://www.youtube.com/watch?v=Ywj6yNfc5nM Why couldn't I launch RStudio? ------------------------------------- For Mac users https://www.youtube.com/watch?v=20XiBheVsck For Windows users (control + RStudio) https://www.youtube.com/watch?v=t7DStkaOULs /////////////////////////////// " .C1EXPLAIN20<-"Links //////////////////////////////// Home page for R http://r-project.org Orange download website https://orangedatamining.com/ /////////////////////////////// "