[Uwgarp-commits] r202 - in pkg/GARPFRM: R data man sandbox vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jul 1 22:07:28 CEST 2014


Author: tfillebeen
Date: 2014-07-01 22:07:28 +0200 (Tue, 01 Jul 2014)
New Revision: 202

Added:
   pkg/GARPFRM/data/treasuryts.rda
Modified:
   pkg/GARPFRM/R/discountFactorArbitrage.R
   pkg/GARPFRM/data/.Rapp.history
   pkg/GARPFRM/man/bondFullPrice.Rd
   pkg/GARPFRM/sandbox/principleComponent.R
   pkg/GARPFRM/vignettes/FixedIncome.lyx
   pkg/GARPFRM/vignettes/HedgeMetrics.lyx
Log:
appropriate dataset

Modified: pkg/GARPFRM/R/discountFactorArbitrage.R
===================================================================
--- pkg/GARPFRM/R/discountFactorArbitrage.R	2014-07-01 14:04:39 UTC (rev 201)
+++ pkg/GARPFRM/R/discountFactorArbitrage.R	2014-07-01 20:07:28 UTC (rev 202)
@@ -95,7 +95,6 @@
 #' pays to purchase those cash flows. The flat price is p, accrued 
 #' interest is AI, the present value of the cash flows by PV, and the 
 #' full price by P: 
-#' 
 #' P=p+AI=PV
 #' 
 #' This function calculates the price of a fixed rate coupon bond given coupon rate, yield, 

Modified: pkg/GARPFRM/data/.Rapp.history
===================================================================
--- pkg/GARPFRM/data/.Rapp.history	2014-07-01 14:04:39 UTC (rev 201)
+++ pkg/GARPFRM/data/.Rapp.history	2014-07-01 20:07:28 UTC (rev 202)
@@ -6,3 +6,5 @@
 returns[,1]
 returns[,"SPY"]
 load("/Users/tfillebeen/devel/R/UWGARP/uwgarp/pkg/GARPFRM/data/consumption.rda")
+load("/Users/tfillebeen/devel/R/UWGARP/uwgarp/pkg/GARPFRM/data/bonds.rda")
+load("/Users/tfillebeen/devel/R/UWGARP/uwgarp/pkg/GARPFRM/data/treasuryts.RData")

Added: pkg/GARPFRM/data/treasuryts.rda
===================================================================
(Binary files differ)


Property changes on: pkg/GARPFRM/data/treasuryts.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: pkg/GARPFRM/man/bondFullPrice.Rd
===================================================================
--- pkg/GARPFRM/man/bondFullPrice.Rd	2014-07-01 14:04:39 UTC (rev 201)
+++ pkg/GARPFRM/man/bondFullPrice.Rd	2014-07-01 20:07:28 UTC (rev 202)
@@ -28,10 +28,9 @@
 pays to purchase those cash flows. The flat price is p, accrued
 interest is AI, the present value of the cash flows by PV, and the
 full price by P:
+P=p+AI=PV
 }
 \details{
-P=p+AI=PV
-
 This function calculates the price of a fixed rate coupon bond given coupon rate, yield,
 compoundPd, cashFlowPd, face value, previous coupon date, next coupon date.
 }

Modified: pkg/GARPFRM/sandbox/principleComponent.R
===================================================================
--- pkg/GARPFRM/sandbox/principleComponent.R	2014-07-01 14:04:39 UTC (rev 201)
+++ pkg/GARPFRM/sandbox/principleComponent.R	2014-07-01 20:07:28 UTC (rev 202)
@@ -24,15 +24,15 @@
 hedgeRatio = - mDuration_2/mDuration_1
 
 
-# Load Data for historcal analysis tools
-data(crsp.short)
-data = largecap.ts[,2:6]
+# Load Data for historcal analysis tools: load the 2, 5,10. and 30 year
+data(treasuryts)
+data = treasuryts
 head(data)
 
 
 # Empirical application: Linear hedge estimation 
 # OLS Level-on-Level regression 
-deltas = linearHedge(data[,1],data[,2:5])
+deltas = linearHedge(data[,1],data[,2:4])
 # Insert the normalized hedged contract versus hedgeable contract value
 deltas = c(1,deltas)
 
@@ -41,7 +41,7 @@
 plot(hedgedInstruments, type="l", main = "Hedged Price Difference: Level", xlab="Time",ylab="Difference")
 
 # OLS Change-on-Change regression 
-deltas = linearHedge(diff(data[,1]),diff(data[,2:5]))
+deltas = linearHedge(diff(data[,1]),diff(data[,2:4]))
 # Insert the normalized hedged contract versus hedgeable contract value
 deltas = c(1,deltas)
 

Modified: pkg/GARPFRM/vignettes/FixedIncome.lyx
===================================================================
(Binary files differ)

Modified: pkg/GARPFRM/vignettes/HedgeMetrics.lyx
===================================================================
(Binary files differ)



More information about the Uwgarp-commits mailing list