[Blotter-commits] r856 - pkg/FinancialInstrument/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Dec 1 15:22:17 CET 2011
Author: gsee
Date: 2011-12-01 15:22:17 +0100 (Thu, 01 Dec 2011)
New Revision: 856
Modified:
pkg/FinancialInstrument/R/instrument.R
pkg/FinancialInstrument/R/load.instruments.R
Log:
clean up extra code that should not be in package
Modified: pkg/FinancialInstrument/R/instrument.R
===================================================================
--- pkg/FinancialInstrument/R/instrument.R 2011-11-28 23:41:46 UTC (rev 855)
+++ pkg/FinancialInstrument/R/instrument.R 2011-12-01 14:22:17 UTC (rev 856)
@@ -194,9 +194,6 @@
instrument(primary_id=primary_id , currency=currency , multiplier=multiplier , tick_size=tick_size, identifiers = identifiers, ... , type="future", underlying_id=underlying_id, assign_i=TRUE )
}
-getRoot <- function(root_id, type=c('future','option')) {
- .Deprecated(new='getInstrument')
-}
#' constructors for series contracts on instruments such as options and futures
#'
Modified: pkg/FinancialInstrument/R/load.instruments.R
===================================================================
--- pkg/FinancialInstrument/R/load.instruments.R 2011-11-28 23:41:46 UTC (rev 855)
+++ pkg/FinancialInstrument/R/load.instruments.R 2011-12-01 14:22:17 UTC (rev 856)
@@ -376,24 +376,3 @@
#' @keywords data
NULL
-
-PCAbetas<-function(ret){
-
- model<-list()
- for(i in 2:ncol(ret)) {
- m<-princomp(~ ret[,1] + ret[,i] )
- slope <- m$loadings[2,1]/m$loadings[1,1]
- intercept <- m$center[2]-slope*m$center[1]
-
- model[[paste(colnames(ret)[1],colnames(ret)[i],sep='.')]]<-
- list(m=m,slope=slope,intercept=intercept)
- }
- model
-}
-
-weighted_mid<-function(x){
- x$Mid.Price<-(x$Bid.Price*x$Ask.Size+x$Ask.Price*x$Bid.Size)/(x$Ask.Size+x$Bid.Size)
- x
-}
-
-
More information about the Blotter-commits
mailing list