Search for you projects
////////////////////////////////
 You can use a keyword or phrase to get some projects

 Step 1: go to https://github.com/

 Step 2:

////////////////////////////////

Manually download a zip file:Twitter Sentiment Analsysis
////////////////////////////////
 Twitter Sentiment Analsysis

 Step 1: go to the following website
         https://github.com/abdulfatir/twitter-sentiment-analysis

 Step 2: click Code

 Step 3: choose 'Download Zip file'

 Step 4: unzipit

////////////////////////////////

What is git?
////////////////////////////////
 Git is a free and open source distributed version control 
     system designed to handle everything from small to very
     large projects with speed and efficiency.
////////////////////////////////

Efficient frontier 
//////////////////////////////////////
library(fPortfolio)
begdate<-as.Date('1978-01-01')
enddate<-as.Date('2009-12-01')

stock1<-.monthlyRetTickerAsRet('IBM') 
stock2<-.monthlyRetTickerAsRet('WMT')
sp500 <-.monthlyRetTickerAsRet('^GSPC') 

d<-merge(stock1,stock2) 
d2<-subset(d,d[,1]>=begdate & d[,1]<=enddate) 
d3<-merge(d2,sp500)

data<-d3[,2:4] 
data<-as.matrix(d3[,2:4])

factors<-d3[,3] 
attr(data,'factors') <- factors 
tailoredFrontierPlot(portfolioFrontier(data))#Long-only Markow M 

//////////////////////////////////////

Correlation (correlation coefficient)
//////////////////////////////////////
Correlation is defined below. 
                   cov(A,B)
    corr(A,B) = ---------------
                 std_A * std_B

    where corr(A,B) is the correlation between stocks A and B
                    note we could use rho(A,B) for corr(A,B)

          cov(A,B) is the covariance between stocks A and B
           std_A   is the standard deviation of stock A
           std_B   is the standard deviation of stock B

//////////////////////////////////////

Why correlation is a bettern measure than covariance?
//////////////////////////////////////
 Let's use an example. 
    cov(A,B) =0.45
    cov(A,C) =1.2

  We could tell that both B and C are positively correlated with A. 
     However, we could not tell which one is more closely 
     correlated with A. 
  
  On the other hand, if we know that 
    corr(A,B) =0.15
    corr(A,C) =0.22

  we could say that C is more closely correlated with A than B. 
//////////////////////////////////////