[Returnanalytics-commits] r2742 - pkg/PerformanceAnalytics/sandbox/pulkit/week6

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Aug 8 20:10:46 CEST 2013


Author: pulkit
Date: 2013-08-08 20:10:46 +0200 (Thu, 08 Aug 2013)
New Revision: 2742

Added:
   pkg/PerformanceAnalytics/sandbox/pulkit/week6/data.csv
Modified:
   pkg/PerformanceAnalytics/sandbox/pulkit/week6/DrawdownBeta.R
Log:
Data For testing Drawdown beta

Modified: pkg/PerformanceAnalytics/sandbox/pulkit/week6/DrawdownBeta.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/week6/DrawdownBeta.R	2013-08-08 17:52:59 UTC (rev 2741)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/week6/DrawdownBeta.R	2013-08-08 18:10:46 UTC (rev 2742)
@@ -83,6 +83,7 @@
     DDbeta<-function(x){
         q = NULL
         q_quantile = quantile(drawdowns_m,1-p)
+        print(drawdowns_m)
         for(i in 1:nrow(Rm)){
 
             if(drawdowns_m[i]<q_quantile){
@@ -102,6 +103,7 @@
             }
         }
         beta_dd = sum((as.numeric(x[index])-x)*q)/CDaR(Rm,p=p)
+        print((as.numeric(x[index])-x)*q)
         return(beta_dd)
     }
 

Added: pkg/PerformanceAnalytics/sandbox/pulkit/week6/data.csv
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/week6/data.csv	                        (rev 0)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/week6/data.csv	2013-08-08 18:10:46 UTC (rev 2742)
@@ -0,0 +1,68 @@
+Date;AORDA;Benchmark
+2008-01-01;0.0389;-0.0612
+2008-02-01;0.0713;-0.0348
+2008-03-01;0.0417;-0.006
+2008-04-01;0.0743;0.0475
+2008-05-01;0.0324;0.0107
+2008-06-01;-0.0013;-0.086
+2008-07-01;0.0849;-0.0099
+2008-08-01;-0.0283;0.0122
+2008-09-01;0.2821;-0.0921
+2008-10-01;0.0964;-0.1683
+2008-11-01;0.0055;-0.0748
+2008-12-01;-0.0288;0.0078
+2009-01-01;-0.0078;-0.0857
+2009-02-01;0.0684;-0.1099
+2009-03-01;0.0599;0.0854
+2009-04-01;-0.038;0.0939
+2009-05-01;0.0419;0.0531
+2009-06-01;-0.0489;2e-04
+2009-07-01;-0.1022;0.0741
+2009-08-01;-0.0166;0.0336
+2009-09-01;-0.0884;0.0357
+2009-10-01;-0.0284;-0.0198
+2009-11-01;-0.0103;0.0574
+2009-12-01;-0.0118;0.0178
+2010-01-01;0.0054;-0.037
+2010-02-01;-0.0224;0.0285
+2010-03-01;0.0085;0.0588
+2010-04-01;-0.0294;0.0148
+2010-05-01;0.1343;-0.082
+2010-06-01;0.0779;-0.0539
+2010-07-01;0.0661;0.0688
+2010-08-01;0.0313;-0.0474
+2010-09-01;0.0367;0.0876
+2010-10-01;0.003;0.0369
+2010-11-01;0.0361;-0.0023
+2010-12-01;-0.0042;0.0653
+2011-01-01;0.0346;0.0226
+2011-02-01;-0.0068;0.032
+2011-03-01;-0.03;-0.001
+2011-04-01;-0.0148;0.0285
+2011-05-01;0.0372;-0.0135
+2011-06-01;-0.0358;-0.0183
+2011-07-01;-0.0056;-0.0215
+2011-08-01;0.1628;-0.0568
+2011-09-01;-0.0504;-0.0718
+2011-10-01;-0.0354;0.1077
+2011-11-01;0.0011;-0.0051
+2011-12-01;-0.0204;0.0085
+2012-01-01;-1e-04;0.0436
+2012-02-01;5e-04;0.0406
+2012-03-01;0.0169;0.0313
+2012-04-01;0.029;-0.0075
+2012-05-01;-0.0634;-0.0627
+2012-06-01;0.0684;0.0396
+2012-07-01;-0.0198;0.0126
+2012-08-01;0.0399;0.0198
+2012-09-01;-0.0323;0.0242
+2012-10-01;0.006;-0.0198
+2012-11-01;-0.0074;0.0028
+2012-12-01;-0.0048;0.0071
+2013-01-01;-0.0117;0.0504
+2013-02-01;-0.0173;0.0111
+2013-03-01;0.0174;0.036
+2013-04-01;-0.0367;0.0181
+2013-05-01;0.0117;0.0208
+2013-06-01;0.005;-0.015
+2013-07-01;-0.0046;0.0495



More information about the Returnanalytics-commits mailing list