SlideShare a Scribd company logo
1 of 13
Download to read offline
An Introduction to R
     for Traders
       Ram Venkat
      Dawn Analytics
R environment
• R is an open source environment for statistical
  computing
• An Integrated environment for data manipulation,
  calculation and graphical output
• R is also a dynamic and object-oriented
  programming language
• Standard install consists of around 30 core
  packages that cover most common statistical and
  other tasks
• CRAN contains over 4000 contributed packages
  and it is growing
R , RStudio installation
• Both R and RStudio are available in
  Windows, Mac, unix and Linux
• R installation instruction : http://cran.r-
  project.org/doc/manuals/R-admin.html
• Rstudio is a free open source IDE for R, we
  will be using Rstudio for this tutorial
• RStudio can be downloaded from
  http://rstudio.org/download/
R packages and sample
 datasets
• Installing an R package:
     e.g >install.packages(“quantmod “)
• “quantmod” is package for trading and we
  will be using this for this tutorial
• Using quantmod to load some basic data
• Using in-built data sets of R
R as an object-oriented
language
• Everything is an Object in R
• A brief look at an R program
• Calling R programs in batch mode
• R functions and packages
  http://www.r-bloggers.com/create-an-r-package-
  in-under-6-minutes/
• Calling R from other languages
• R Programming Model
• Parallel R
R Objects and classes
• Core Objects
   – Vector
   – List
   – Functions
• Other Objects
    Matrix
   – Array
   – Data Frames
   – Factors
Data inputs and Data Cleaning
• Through package interfaces
• From CSV
• From Databases
• Excel interface
• Data Cleaning facilities
R Graphics
• graphics, lattice and grid packages
• graphics Package charts:
   – barplot,dot chart,histogram,density
     plots,strp charts, quantile plots, scatter
     plots, image plots, contour plots,
     interaction plots, sunflower plots
• Lattice splits a chart into different panels
  or groups , making multiple plots on same
   page easy
Statistical computing
• Data Analysis : Summary, Correlation, principal
  Component Analysis, Factor Analysis
• Time Series
• Probablity Distributions
• Statistical tests
• Regression Models
• Classification Models
• Clustering
quantmod package
• “A rapid prototyping environment, where
  quant traders can quickly and cleanly
  explore and build trading models. “
• Quantmod example on data handling
• Quantmod example on charting
• Quantmod example on modelling
• For more : www.quantmod.com/examples/
Other packages of interest to
Traders
• R-sig-finance is your best bet to keep
  track of the packages:
  https://stat.ethz.ch/pipermail/r-sig-finance/
• Other packages mentioned frequently :
  Rmetrics(fportfolio),portfolio,
  Rglpk_solve_LP (portfolio optimization)
• Broker-specific: Ibrokers (IB)
R Books and Tutorials
• Book - “R in a Nutshell” by Joseph Adler (O'Reilly)
• cran-R “An introduction to R”
  http://cran.r-project.org/doc/manuals/R-intro.html
•    Quck-R site : http://www.statmethods.net/ gives
    a discount on the book “R in Action” from
    Manning
• R and time-series:
  http://www.stat.pitt.edu/stoffer/tsa3/
Thank You

For any clarification, send e-mail to
ram@dawnanalytics.com

More Related Content

What's hot

Big Data Analytics with R
Big Data Analytics with RBig Data Analytics with R
Big Data Analytics with RGreat Wide Open
 
Introduction to Microsoft R Services
Introduction to Microsoft R ServicesIntroduction to Microsoft R Services
Introduction to Microsoft R ServicesGregg Barrett
 
Data Analytics with R and SQL Server
Data Analytics with R and SQL ServerData Analytics with R and SQL Server
Data Analytics with R and SQL ServerStéphane Fréchette
 
Introduction to data analysis using R
Introduction to data analysis using RIntroduction to data analysis using R
Introduction to data analysis using RVictoria López
 
Moving From SAS to R Webinar Presentation - 07Aug14
Moving From SAS to R Webinar Presentation - 07Aug14Moving From SAS to R Webinar Presentation - 07Aug14
Moving From SAS to R Webinar Presentation - 07Aug14Revolution Analytics
 
An R primer for SQL folks
An R primer for SQL folksAn R primer for SQL folks
An R primer for SQL folksThomas Hütter
 
Microsoft R Server for Data Sciencea
Microsoft R Server for Data ScienceaMicrosoft R Server for Data Sciencea
Microsoft R Server for Data ScienceaData Science Thailand
 
Accelerating R analytics with Spark and Microsoft R Server for Hadoop
Accelerating R analytics with Spark and  Microsoft R Server  for HadoopAccelerating R analytics with Spark and  Microsoft R Server  for Hadoop
Accelerating R analytics with Spark and Microsoft R Server for HadoopWilly Marroquin (WillyDevNET)
 
High Performance Predictive Analytics in R and Hadoop
High Performance Predictive Analytics in R and HadoopHigh Performance Predictive Analytics in R and Hadoop
High Performance Predictive Analytics in R and HadoopRevolution Analytics
 
Intro to data science module 1 r
Intro to data science module 1 rIntro to data science module 1 r
Intro to data science module 1 ramuletc
 
Introduction to basic statistics
Introduction to basic statisticsIntroduction to basic statistics
Introduction to basic statisticsIBM
 
Hadoop - A Very Short Introduction
Hadoop - A Very Short IntroductionHadoop - A Very Short Introduction
Hadoop - A Very Short Introductiondewang_mistry
 
Survey of Graph Indexing
Survey of Graph IndexingSurvey of Graph Indexing
Survey of Graph IndexingKisung Kim
 
AgensGraph Presentation at PGConf.us 2017
AgensGraph Presentation at PGConf.us 2017AgensGraph Presentation at PGConf.us 2017
AgensGraph Presentation at PGConf.us 2017Kisung Kim
 
E-ARK-iPRES2016-Bern-October-2016
E-ARK-iPRES2016-Bern-October-2016E-ARK-iPRES2016-Bern-October-2016
E-ARK-iPRES2016-Bern-October-2016Sven Schlarb
 

What's hot (20)

Big Data Analytics with R
Big Data Analytics with RBig Data Analytics with R
Big Data Analytics with R
 
R tutorial
R tutorialR tutorial
R tutorial
 
Big data business case
Big data   business caseBig data   business case
Big data business case
 
Introduction to Microsoft R Services
Introduction to Microsoft R ServicesIntroduction to Microsoft R Services
Introduction to Microsoft R Services
 
Data Analytics with R and SQL Server
Data Analytics with R and SQL ServerData Analytics with R and SQL Server
Data Analytics with R and SQL Server
 
Introduction to data analysis using R
Introduction to data analysis using RIntroduction to data analysis using R
Introduction to data analysis using R
 
LD4KD 2015 - Demos and tools
LD4KD 2015 - Demos and toolsLD4KD 2015 - Demos and tools
LD4KD 2015 - Demos and tools
 
Moving From SAS to R Webinar Presentation - 07Aug14
Moving From SAS to R Webinar Presentation - 07Aug14Moving From SAS to R Webinar Presentation - 07Aug14
Moving From SAS to R Webinar Presentation - 07Aug14
 
An R primer for SQL folks
An R primer for SQL folksAn R primer for SQL folks
An R primer for SQL folks
 
Microsoft R Server for Data Sciencea
Microsoft R Server for Data ScienceaMicrosoft R Server for Data Sciencea
Microsoft R Server for Data Sciencea
 
Accelerating R analytics with Spark and Microsoft R Server for Hadoop
Accelerating R analytics with Spark and  Microsoft R Server  for HadoopAccelerating R analytics with Spark and  Microsoft R Server  for Hadoop
Accelerating R analytics with Spark and Microsoft R Server for Hadoop
 
High Performance Predictive Analytics in R and Hadoop
High Performance Predictive Analytics in R and HadoopHigh Performance Predictive Analytics in R and Hadoop
High Performance Predictive Analytics in R and Hadoop
 
Intro to data science module 1 r
Intro to data science module 1 rIntro to data science module 1 r
Intro to data science module 1 r
 
Introduction to basic statistics
Introduction to basic statisticsIntroduction to basic statistics
Introduction to basic statistics
 
Hadoop - A Very Short Introduction
Hadoop - A Very Short IntroductionHadoop - A Very Short Introduction
Hadoop - A Very Short Introduction
 
R at Microsoft (useR! 2016)
R at Microsoft (useR! 2016)R at Microsoft (useR! 2016)
R at Microsoft (useR! 2016)
 
Survey of Graph Indexing
Survey of Graph IndexingSurvey of Graph Indexing
Survey of Graph Indexing
 
AgensGraph Presentation at PGConf.us 2017
AgensGraph Presentation at PGConf.us 2017AgensGraph Presentation at PGConf.us 2017
AgensGraph Presentation at PGConf.us 2017
 
E-ARK-iPRES2016-Bern-October-2016
E-ARK-iPRES2016-Bern-October-2016E-ARK-iPRES2016-Bern-October-2016
E-ARK-iPRES2016-Bern-October-2016
 
Basic introduction into R
Basic introduction into RBasic introduction into R
Basic introduction into R
 

Viewers also liked

rsdmx - Tools for reading SDMX data and metadata in R
rsdmx - Tools for reading SDMX data and metadata in Rrsdmx - Tools for reading SDMX data and metadata in R
rsdmx - Tools for reading SDMX data and metadata in REmmanuel Blondel
 
How to use hadoop and r for big data parallel processing
How to use hadoop and r for big data  parallel processingHow to use hadoop and r for big data  parallel processing
How to use hadoop and r for big data parallel processingBryan Downing
 
A Review Of Statistic
A Review Of StatisticA Review Of Statistic
A Review Of Statisticjesulito1716
 
Taraf signifikan
Taraf signifikanTaraf signifikan
Taraf signifikanRapul anwar
 
Statistic project 22
Statistic project 22Statistic project 22
Statistic project 22Jenny Lee
 
Basic Concepts of Inferential statistics
Basic Concepts of Inferential statisticsBasic Concepts of Inferential statistics
Basic Concepts of Inferential statisticsStatistics Consultation
 
Inferential statistics powerpoint
Inferential statistics powerpointInferential statistics powerpoint
Inferential statistics powerpointkellula
 
Basic Descriptive Statistics
Basic Descriptive StatisticsBasic Descriptive Statistics
Basic Descriptive Statisticssikojp
 
Descriptive statistics
Descriptive statisticsDescriptive statistics
Descriptive statisticskemdoby
 
descriptive and inferential statistics
descriptive and inferential statisticsdescriptive and inferential statistics
descriptive and inferential statisticsMona Sajid
 
Concepts of Strategic Management
Concepts of Strategic ManagementConcepts of Strategic Management
Concepts of Strategic Managementsaberkhosravi
 
An Interactive Introduction To R (Programming Language For Statistics)
An Interactive Introduction To R (Programming Language For Statistics)An Interactive Introduction To R (Programming Language For Statistics)
An Interactive Introduction To R (Programming Language For Statistics)Dataspora
 
What is a T-test?
What is a T-test?What is a T-test?
What is a T-test?YanoLabLT
 
Chapter 4-RESEARCH HYPOTHESIS AND DEFINING VARIABLES
Chapter 4-RESEARCH HYPOTHESIS AND DEFINING VARIABLESChapter 4-RESEARCH HYPOTHESIS AND DEFINING VARIABLES
Chapter 4-RESEARCH HYPOTHESIS AND DEFINING VARIABLESLudy Mae Nalzaro,BSM,BSN,MN
 
Introduction to t-tests (statistics)
Introduction to t-tests (statistics)Introduction to t-tests (statistics)
Introduction to t-tests (statistics)Dr Bryan Mills
 
Hypothesis
HypothesisHypothesis
Hypothesis17somya
 

Viewers also liked (20)

R programming
R programmingR programming
R programming
 
rsdmx - Tools for reading SDMX data and metadata in R
rsdmx - Tools for reading SDMX data and metadata in Rrsdmx - Tools for reading SDMX data and metadata in R
rsdmx - Tools for reading SDMX data and metadata in R
 
How to use hadoop and r for big data parallel processing
How to use hadoop and r for big data  parallel processingHow to use hadoop and r for big data  parallel processing
How to use hadoop and r for big data parallel processing
 
A Review Of Statistic
A Review Of StatisticA Review Of Statistic
A Review Of Statistic
 
Taraf signifikan
Taraf signifikanTaraf signifikan
Taraf signifikan
 
Statistic project 22
Statistic project 22Statistic project 22
Statistic project 22
 
Two sample t-test
Two sample t-testTwo sample t-test
Two sample t-test
 
Basic Concepts of Inferential statistics
Basic Concepts of Inferential statisticsBasic Concepts of Inferential statistics
Basic Concepts of Inferential statistics
 
Understanding inferential statistics
Understanding inferential statisticsUnderstanding inferential statistics
Understanding inferential statistics
 
Inferential statistics powerpoint
Inferential statistics powerpointInferential statistics powerpoint
Inferential statistics powerpoint
 
Basic Descriptive Statistics
Basic Descriptive StatisticsBasic Descriptive Statistics
Basic Descriptive Statistics
 
Descriptive statistics
Descriptive statisticsDescriptive statistics
Descriptive statistics
 
descriptive and inferential statistics
descriptive and inferential statisticsdescriptive and inferential statistics
descriptive and inferential statistics
 
Concepts of Strategic Management
Concepts of Strategic ManagementConcepts of Strategic Management
Concepts of Strategic Management
 
An Interactive Introduction To R (Programming Language For Statistics)
An Interactive Introduction To R (Programming Language For Statistics)An Interactive Introduction To R (Programming Language For Statistics)
An Interactive Introduction To R (Programming Language For Statistics)
 
Linguagem R
Linguagem RLinguagem R
Linguagem R
 
What is a T-test?
What is a T-test?What is a T-test?
What is a T-test?
 
Chapter 4-RESEARCH HYPOTHESIS AND DEFINING VARIABLES
Chapter 4-RESEARCH HYPOTHESIS AND DEFINING VARIABLESChapter 4-RESEARCH HYPOTHESIS AND DEFINING VARIABLES
Chapter 4-RESEARCH HYPOTHESIS AND DEFINING VARIABLES
 
Introduction to t-tests (statistics)
Introduction to t-tests (statistics)Introduction to t-tests (statistics)
Introduction to t-tests (statistics)
 
Hypothesis
HypothesisHypothesis
Hypothesis
 

Similar to Intro to R statistic programming

Analytics Beyond RAM Capacity using R
Analytics Beyond RAM Capacity using RAnalytics Beyond RAM Capacity using R
Analytics Beyond RAM Capacity using RAlex Palamides
 
Data processing with spark in r & python
Data processing with spark in r & pythonData processing with spark in r & python
Data processing with spark in r & pythonMaloy Manna, PMP®
 
In-Database Analytics Deep Dive with Teradata and Revolution
In-Database Analytics Deep Dive with Teradata and RevolutionIn-Database Analytics Deep Dive with Teradata and Revolution
In-Database Analytics Deep Dive with Teradata and RevolutionRevolution Analytics
 
microsoft r server for distributed computing
microsoft r server for distributed computingmicrosoft r server for distributed computing
microsoft r server for distributed computingBAINIDA
 
An introduction to R is a document useful
An introduction to R is a document usefulAn introduction to R is a document useful
An introduction to R is a document usefulssuser3c3f88
 
Big data analytics with R tool.pptx
Big data analytics with R tool.pptxBig data analytics with R tool.pptx
Big data analytics with R tool.pptxsalutiontechnology
 
Unit1_Introduction to R.pdf
Unit1_Introduction to R.pdfUnit1_Introduction to R.pdf
Unit1_Introduction to R.pdfMDDidarulAlam15
 
PPT - Introduction to R.pdf
PPT - Introduction to R.pdfPPT - Introduction to R.pdf
PPT - Introduction to R.pdfssuser65af26
 
FOSDEM 2014: Social Network Benchmark (SNB) Graph Generator
FOSDEM 2014:  Social Network Benchmark (SNB) Graph GeneratorFOSDEM 2014:  Social Network Benchmark (SNB) Graph Generator
FOSDEM 2014: Social Network Benchmark (SNB) Graph GeneratorLDBC council
 
"R, Hadoop, and Amazon Web Services (20 December 2011)"
"R, Hadoop, and Amazon Web Services (20 December 2011)""R, Hadoop, and Amazon Web Services (20 December 2011)"
"R, Hadoop, and Amazon Web Services (20 December 2011)"Portland R User Group
 
How to obtain and install R.ppt
How to obtain and install R.pptHow to obtain and install R.ppt
How to obtain and install R.pptrajalakshmi5921
 
Slides on introduction to R by ArinBasu MD
Slides on introduction to R by ArinBasu MDSlides on introduction to R by ArinBasu MD
Slides on introduction to R by ArinBasu MDSonaCharles2
 

Similar to Intro to R statistic programming (20)

Analytics Beyond RAM Capacity using R
Analytics Beyond RAM Capacity using RAnalytics Beyond RAM Capacity using R
Analytics Beyond RAM Capacity using R
 
Step By Step Guide to Learn R
Step By Step Guide to Learn RStep By Step Guide to Learn R
Step By Step Guide to Learn R
 
R- Introduction
R- IntroductionR- Introduction
R- Introduction
 
Data processing with spark in r & python
Data processing with spark in r & pythonData processing with spark in r & python
Data processing with spark in r & python
 
In-Database Analytics Deep Dive with Teradata and Revolution
In-Database Analytics Deep Dive with Teradata and RevolutionIn-Database Analytics Deep Dive with Teradata and Revolution
In-Database Analytics Deep Dive with Teradata and Revolution
 
LSESU a Taste of R Language Workshop
LSESU a Taste of R Language WorkshopLSESU a Taste of R Language Workshop
LSESU a Taste of R Language Workshop
 
microsoft r server for distributed computing
microsoft r server for distributed computingmicrosoft r server for distributed computing
microsoft r server for distributed computing
 
An introduction to R is a document useful
An introduction to R is a document usefulAn introduction to R is a document useful
An introduction to R is a document useful
 
Big data analytics with R tool.pptx
Big data analytics with R tool.pptxBig data analytics with R tool.pptx
Big data analytics with R tool.pptx
 
Unit1_Introduction to R.pdf
Unit1_Introduction to R.pdfUnit1_Introduction to R.pdf
Unit1_Introduction to R.pdf
 
PPT - Introduction to R.pdf
PPT - Introduction to R.pdfPPT - Introduction to R.pdf
PPT - Introduction to R.pdf
 
FOSDEM 2014: Social Network Benchmark (SNB) Graph Generator
FOSDEM 2014:  Social Network Benchmark (SNB) Graph GeneratorFOSDEM 2014:  Social Network Benchmark (SNB) Graph Generator
FOSDEM 2014: Social Network Benchmark (SNB) Graph Generator
 
"R, Hadoop, and Amazon Web Services (20 December 2011)"
"R, Hadoop, and Amazon Web Services (20 December 2011)""R, Hadoop, and Amazon Web Services (20 December 2011)"
"R, Hadoop, and Amazon Web Services (20 December 2011)"
 
R, Hadoop and Amazon Web Services
R, Hadoop and Amazon Web ServicesR, Hadoop and Amazon Web Services
R, Hadoop and Amazon Web Services
 
Python ml
Python mlPython ml
Python ml
 
Essentials of R
Essentials of REssentials of R
Essentials of R
 
How to obtain and install R.ppt
How to obtain and install R.pptHow to obtain and install R.ppt
How to obtain and install R.ppt
 
17641.ppt
17641.ppt17641.ppt
17641.ppt
 
Slides on introduction to R by ArinBasu MD
Slides on introduction to R by ArinBasu MDSlides on introduction to R by ArinBasu MD
Slides on introduction to R by ArinBasu MD
 
17641.ppt
17641.ppt17641.ppt
17641.ppt
 

Intro to R statistic programming

  • 1. An Introduction to R for Traders Ram Venkat Dawn Analytics
  • 2. R environment • R is an open source environment for statistical computing • An Integrated environment for data manipulation, calculation and graphical output • R is also a dynamic and object-oriented programming language • Standard install consists of around 30 core packages that cover most common statistical and other tasks • CRAN contains over 4000 contributed packages and it is growing
  • 3. R , RStudio installation • Both R and RStudio are available in Windows, Mac, unix and Linux • R installation instruction : http://cran.r- project.org/doc/manuals/R-admin.html • Rstudio is a free open source IDE for R, we will be using Rstudio for this tutorial • RStudio can be downloaded from http://rstudio.org/download/
  • 4. R packages and sample datasets • Installing an R package: e.g >install.packages(“quantmod “) • “quantmod” is package for trading and we will be using this for this tutorial • Using quantmod to load some basic data • Using in-built data sets of R
  • 5. R as an object-oriented language • Everything is an Object in R • A brief look at an R program • Calling R programs in batch mode • R functions and packages http://www.r-bloggers.com/create-an-r-package- in-under-6-minutes/ • Calling R from other languages • R Programming Model • Parallel R
  • 6. R Objects and classes • Core Objects – Vector – List – Functions • Other Objects Matrix – Array – Data Frames – Factors
  • 7. Data inputs and Data Cleaning • Through package interfaces • From CSV • From Databases • Excel interface • Data Cleaning facilities
  • 8. R Graphics • graphics, lattice and grid packages • graphics Package charts: – barplot,dot chart,histogram,density plots,strp charts, quantile plots, scatter plots, image plots, contour plots, interaction plots, sunflower plots • Lattice splits a chart into different panels or groups , making multiple plots on same page easy
  • 9. Statistical computing • Data Analysis : Summary, Correlation, principal Component Analysis, Factor Analysis • Time Series • Probablity Distributions • Statistical tests • Regression Models • Classification Models • Clustering
  • 10. quantmod package • “A rapid prototyping environment, where quant traders can quickly and cleanly explore and build trading models. “ • Quantmod example on data handling • Quantmod example on charting • Quantmod example on modelling • For more : www.quantmod.com/examples/
  • 11. Other packages of interest to Traders • R-sig-finance is your best bet to keep track of the packages: https://stat.ethz.ch/pipermail/r-sig-finance/ • Other packages mentioned frequently : Rmetrics(fportfolio),portfolio, Rglpk_solve_LP (portfolio optimization) • Broker-specific: Ibrokers (IB)
  • 12. R Books and Tutorials • Book - “R in a Nutshell” by Joseph Adler (O'Reilly) • cran-R “An introduction to R” http://cran.r-project.org/doc/manuals/R-intro.html • Quck-R site : http://www.statmethods.net/ gives a discount on the book “R in Action” from Manning • R and time-series: http://www.stat.pitt.edu/stoffer/tsa3/
  • 13. Thank You For any clarification, send e-mail to ram@dawnanalytics.com