Error Setting Blotter Code
up a futures_series Newsgroups: gmane.comp.lang.r.r-metrics Date: Thursday 6th May 2010 10:46:14 UTC (over 6 years ago) Wolfgang Wu wrote: > It seems like the error occurs when you run updatePortf() for a date where one of the symbols are not defined. So TE_N9 doesn't have a row for the date '2009-01-02' which is causing this error. I guess this will happen often as there might be holidays or non trading days which might be different for different symbols (maybe trading on different exchanges, etc..). Are there any work-arounds to this problem? That sounds like a bug. I'll check and fix it to make sure updatePortf won't try to update a particular instrument beyond it's last traded date. Ideally, the historical instrument data will be tested with 'try' and a warning rather than a fatal error will be generated. I'll try to get to it tomorrow or over the weekend. > Also is it possible to add or remove symbols to a portfolio object later than initPortf? On the list of functions to write... contributed functions welcome. Regards, - Brian > Thanks > > > Wolfgang Wu > > > > ----- Ursprüngliche Mail ---- > Von: Wolfgang Wu <[emailprotected]> > An: Brian G. Peterson
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users http://permalink.gmane.org/gmane.comp.lang.r.r-metrics/5997 Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up R blotter: Error in get(Symbol, pos=env): object … not found up vote 0 http://stackoverflow.com/questions/18308092/r-blotter-error-in-getsymbol-pos-env-object-not-found down vote favorite 1 Ok I've read through the documentation, the updated slides from Guy Yollin and all my past posts, but I cannot find an answer to this problem. After my for loop I still get an error that the object 'USDCHF' cannot be found. Here's my code: ################ # HOUSEKEEPING # ################ setwd("O:/R/R Programs/") rm(list=ls(all=TRUE)) library(blotter) .blotter <- new.env() .instrument <- new.env() Sys.setenv(TZ="UTC") source("VariableAndDataFunctions.R") ############ # SETTINGS # ############ StrategyName<-"Test" CurrencyPair<-"USD_CHF" RiskIndex<-"RiskIndex" MAPeriod <- 10 ParamUp <- 0.96 ParamDown <- 0.95 InitialInvestment <- 10000 Lag=1 #default 1, in order not to peek into the future CrossCurrency <- paste(substrLeft(CurrencyPair, 3), substrRight(CurrencyPair,3),sep="") ############# # DATASETUP # ############# #Import datasets, both as XTS RiskIndicator<-readVariableAsXTS(RiskIndex) FXCrossTable<-read.table(paste("O:/Data/",CurrencyPair, ".asc", sep=""),sep=",",skip=1,header=FALSE) FXCrossTable[,4]<-as.Date(as.character(FXCrossTable[,4]), format="%Y%m%d") colnames(FXCrossTable)<-c("V1","V2","V3", "Date","Close") FXCrossXTS<-xts(FXCrossTable[,5], order.by=FXCrossTable[,4]) MergedXTS<-merge.xts(FXCrossXTS,RiskIndicator,join='inner') MergedXTS[,'RiskIndicator']<-SMA(MergedXTS[,'RiskIndicator'],MAPeriod) colnames(MergedXTS)<-c("Close", "RiskIndicatorMA") currency("USD") currency("CHF") exchange_rate(CrossCurrency) #################################### # Initialize portfolio and account # ##########################
from GoogleSign inHidden fieldsBooksbooks.google.com - "Cases argued and determined in the Court of Appeals, Supreme and lower courts of record of New York State, with key number annotations." (varies)...https://books.google.com/books/about/The_New_York_Supplement.html?id=3oc7AAAAIAAJ&utm_source=gb-gplus-shareThe New York SupplementMy libraryHelpAdvanced Book SearchGet https://books.google.com/books?id=3oc7AAAAIAAJ&pg=PA1157&lpg=PA1157&dq=error+setting+blotter+code&source=bl&ots=kElUvQP7g-&sig=e7ZDVPNG_9KD_nGK40ustIB7F-M&hl=en&sa=X&ved=0ahUKEwiJmqaOj9PPAhWopYMKHX56BPIQ6AEISDAG print bookNo eBook availableAbeBooksAmazonFind in a libraryAll sellers»Get Textbooks on Google PlayRent and save from the world's largest eBookstore. Read, highlight, and take notes, across web, tablet, and phone.Go to Google Play Now »The New York SupplementWest Publishing Company, 1900 - Law reports, digests, etc 0 Reviewshttps://books.google.com/books/about/The_New_York_Supplement.html?id=3oc7AAAAIAAJ"Cases argued and determined in the Court of error setting Appeals, Supreme and lower courts of record of New York State, with key number annotations." (varies) From inside the book What people are saying-Write a reviewWe haven't found any reviews in the usual places.ContentsNew York State Reporter 2 President etc of Delaware H Canal Co 43 X Y Supp 58 58 International Bridge Co 60 error setting blotter N Y Supp 819 79 Copyright 22 other sections not shownOther editions - View allThe New York SupplementSnippet view - 1920The New York SupplementSnippet view - 1913The New York SupplementSnippet view - 1915View all »Common terms and phrases99 New York affidavit affirmed agreement alleged amount answer Appeal from special Appellate Division application Argued assessment attorney authority bank bonds cause of action certificate certiorari charge City Ct Civil Procedure claim commissioners complaint concur contract corporation costs damages deceased decedent deed defendant appeals defendant's denied duty entitled evidence execution executors fact fendant granted held injury interest issue judgment in favor June June 13 June 28 jurisdiction jury Kings county lease liable ment mortgage motion municipal court N. Y. Supp negligence notice owner paid parties payment person plaintiff premises proceedings provides purchase question railroad reason received recover referred relator respondent reversed rule RUMSEY special term statute street Supreme Court surrogate's court testator testified testimony thereof tion trial term trust verdict witness York county York State ReporterBibliographi
be down. Please try the request again. Your cache administrator is webmaster. Generated Fri, 14 Oct 2016 20:43:51 GMT by s_wx1131 (squid/3.5.20)