[Uwgarp-commits] r191 - in pkg/GARPFRM: sandbox vignettes
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jun 16 23:15:09 CEST 2014
Author: tfillebeen
Date: 2014-06-16 23:15:08 +0200 (Mon, 16 Jun 2014)
New Revision: 191
Added:
pkg/GARPFRM/vignettes/FixedIncome.lyx
pkg/GARPFRM/vignettes/HedgeMetrics.lyx
Modified:
pkg/GARPFRM/sandbox/principleComponent.R
pkg/GARPFRM/sandbox/test_discountFactorArbitrage.R
Log:
vignette drafts
Modified: pkg/GARPFRM/sandbox/principleComponent.R
===================================================================
--- pkg/GARPFRM/sandbox/principleComponent.R 2014-06-13 23:42:55 UTC (rev 190)
+++ pkg/GARPFRM/sandbox/principleComponent.R 2014-06-16 21:15:08 UTC (rev 191)
@@ -38,8 +38,18 @@
# In sample illustration: random, mean reverting spreads
hedgedInstruments = data%*%deltas
-plot(hedgedInstruments, type="l", main = "Hedged Price Difference", xlab="Time",ylab="Difference")
+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]))
+# Insert the normalized hedged contract versus hedgeable contract value
+deltas = c(1,deltas)
+
+# In sample illustration: random, mean reverting spreads
+hedgedInstruments = data%*%deltas
+plot(hedgedInstruments, type="l", main = "Hedged Price Difference: Change", xlab="Time",ylab="Difference")
+
+
# Have a single, empirical description of the behavior of the term structure that can be applied across all
# assets. Principal Compnents (PCs) provide such an emperical description
# Retain components that combined account for x% of the cumulative variance
Modified: pkg/GARPFRM/sandbox/test_discountFactorArbitrage.R
===================================================================
--- pkg/GARPFRM/sandbox/test_discountFactorArbitrage.R 2014-06-13 23:42:55 UTC (rev 190)
+++ pkg/GARPFRM/sandbox/test_discountFactorArbitrage.R 2014-06-16 21:15:08 UTC (rev 191)
@@ -67,7 +67,7 @@
r = seq(0, 0.15, 0.025)
length(r)
maturity = 10
-# Illustraton #1 for standard theta and initial r estimate yield path
+# Illustration #1 for standard theta and initial r estimate yield path
yieldCurves = yieldCurveVasicek(r, k, theta, sigma, maturity)
# Plot using matplot-plot the columns of one matrix against the columns of another
maturity = seq(1,maturity,1)
@@ -77,6 +77,7 @@
# Illustration #2 for high theta and low initial r estimate yield path
theta = 0.45
+maturity = 10
yieldCurves = yieldCurveVasicek(r, k, theta, sigma, maturity)
# Plot using matplot-plot the columns of one matrix against the columns of another
maturity = seq(1,maturity,1)
Added: pkg/GARPFRM/vignettes/FixedIncome.lyx
===================================================================
(Binary files differ)
Property changes on: pkg/GARPFRM/vignettes/FixedIncome.lyx
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: pkg/GARPFRM/vignettes/HedgeMetrics.lyx
===================================================================
(Binary files differ)
Property changes on: pkg/GARPFRM/vignettes/HedgeMetrics.lyx
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
More information about the Uwgarp-commits
mailing list