Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am izamryan on github.
  • I am izamryan (https://keybase.io/izamryan) on keybase.
  • I have a public key ASCKwGbOeN-fLJGOaBRQPCrXhwkGMXO8WQA816W60cq5-Ao

To claim this, I am signing this object:

@izamryan
izamryan / BenchmarkVsSP500
Created August 22, 2013 06:51
Putting a benchmark of monthly continuously compounded returns into a Z ordered object
options(digits=4, width=70)
# load packages
library(PerformanceAnalytics)
library(zoo)
library(boot)
library(tseries)
VBLTX.prices = get.hist.quote(instrument="vbltx", start="1981-12-31",
end="2012-11-01", quote="AdjClose",
@izamryan
izamryan / ASEANEconometrics.R
Last active December 21, 2015 10:59
Analysis of #ASEAN #econometrics in #Rstats
library(WDI)
library(ggplot2)
library(zoo)
countries <- c('BN','ID','MY','PH','SG','TH','KH','LA','MM','VN')
indicators <- 'NY.GDP.MKTP.KD.ZG'
dat = WDI(indicator='NY.GDP.MKTP.KD.ZG', country=countries, start=1982, end=2012)
@izamryan
izamryan / covariance.R
Created July 28, 2013 08:25
Calculating covariance and correlation with #rstats
options(digits=4)
# Definitions
Table1 = matrix(data=c(1/8,0,2/8,1/8,1/8,2/8,0,1/8),nrow=4,ncol=2,byrow=T)
Table1
X=c(0,1,2,3)
Y=c(0,1)
X1=c(0,0,1,1,2,2,3,3)
Y1=c(0,1,0,1,0,1,0,1)
Table2 <- data.frame (X1,Y1)