How can I import data to R from a dynamically(real time) changing excel
sheet.

On Mon, Aug 2, 2010 at 5:00 AM, <r-sig-finance-request@stat.math.ethz.ch>wrote:

> Send R-SIG-Finance mailing list submissions to
>        r-sig-finance@stat.math.ethz.ch
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> or, via email, send a message with subject or body 'help' to
>        r-sig-finance-request@stat.math.ethz.ch
>
> You can reach the person managing the list at
>        r-sig-finance-owner@stat.math.ethz.ch
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of R-SIG-Finance digest..."
>
>
> Today's Topics:
>
>   1. BCa-intervals not defined in boot.ci() for tsboot()
>      (Andreas Klein)
>   2. help in quantstrat (Raghu)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 1 Aug 2010 15:35:01 +0000 (GMT)
> From: Andreas Klein <klein82517@yahoo.de>
> To: r-sig-finance@stat.math.ethz.ch
> Subject: [R-SIG-Finance] BCa-intervals not defined in boot.ci() for
>        tsboot()
> Message-ID: <433898.6951.qm@web24206.mail.ird.yahoo.com>
> Content-Type: text/plain; charset=utf-8
>
> Hello everybody,
>
> when I create an object of class boot with the function tsboot() from the
> package boot and try to compute several types of confidence intervals with
> boot.ci("object of class boot created with tsboot") I obtain the warning
> message, that "BCa-intervals are not defined for time-series bootstraps".
>
> Does this statement hold in general? Or is it just not defined in boot.ci(),
> because I saw several applications of the BCa-methodology in the time-series
> context in the literature?
>
> So maybe someone can end my confusion and give me an advice, if the
> BCa-methodology can be used also with time-series data, but is just not
> implemented in the boot.ci()-function...
>
> Regards,
> Andy.
>
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Sun, 1 Aug 2010 21:42:31 +0100
> From: Raghu <r.raghuraman@gmail.com>
> To: R-Finance <r-sig-finance@stat.math.ethz.ch>
> Subject: [R-SIG-Finance] help in quantstrat
> Message-ID:
>        <AANLkTik9p3qa57=OZyt6QUsUbOxgLiqjDkz0gr8pMouZ@mail.gmail.com>
> Content-Type: text/plain
>
> Hi
>
> I have a function myTTR ( which calculates the 5D SMA) given a price
> series.
> I am trying to use add.indicator, add.signal and add.rule to this function.
> The argument of myTTR is a price series, say ,'IBM'. So I have myTTR(IBM)
> which returns a set of 1s,0s and -1s based on when the 5D SMA crossover has
> happened etc. I have been trying to use this as follows but I keep getting
> an error after applyStrategy. Can someone help please?
>
> Here is the code:
>
> require(quantstrat)
> try(rm("order_book.SMA5D",pos=.strategy),silent=TRUE)
> try(rm("account.SMA5D","portfolio.SMA5D",pos=.blotter),silent=TRUE)
> try(rm("account.st","portfolio.st
> ","stock.str","s","initDate","initEq",'start_t','end_t'),silent=TRUE)
>
> stock.str='IBM' # what are we trying it on
> currency('USD')
> stock(stock.str,currency='USD',multiplier=1)
>
> initDate='2006-12-31'
> initEq=1000000
> portfolio.st='SMA5D'
> account.st='SMA5D'
>
> initPortf(portfolio.st,symbols=stock.str, initDate=initDate)
> initAcct(account.st,portfolios=portfolio.st, initDate=initDate)
> initOrders(portfolio=portfolio.st,initDate=initDate)
>
>
> stratSMA5D <- strategy(portfolio.st)
>
> stratSMA5D <- add.indicator(strategy = stratSMA5D, name = "myTTR",
> arguments
> = list(x=quote(mktdata)))
>
> stratSMA5D <- add.signal(strategy =
> stratSMA5D,name="sigThreshold",arguments
> =
>
> list(data=quote(mktdata),column="signal",relationship="gt",threshold=0,cross=TRUE),label="signal.gt.zero")
> stratSMA5D <- add.signal(strategy =
> stratSMA5D,name="sigThreshold",arguments
> =
>
> list(data=quote(mktdata),column="signal",relationship="lt",threshold=0,cross=TRUE),label="signal.lt.zero")
>
> stratSMA5D <- add.rule(strategy = stratSMA5D,name='ruleSignal', arguments =
> list(data=quote(mktdata),sigcol="signal.gt.zero",sigval=TRUE, orderqty=100,
> ordertype='market', orderside='long', threshold=NULL),type='enter')
> stratSMA5D <- add.rule(strategy = stratSMA5D,name='ruleSignal', arguments =
> list(data=quote(mktdata),sigcol="signal.gt.zero",sigval=TRUE,
> orderqty=-100,
> ordertype='stoplimit', orderside='long',
> threshold=1.1,tmult=TRUE),type='risk')
>
> getSymbols(stock.str,from=initDate)
> start_t<-Sys.time()
> *out<-try(applyStrategy(strategy=stratSMA5D , portfolios=portfolio.st))*
> end_t<-Sys.time()
> end_t-start_t
> updatePortf(Portfolio='SMA5D',Dates=paste('::',as.Date(Sys.time()),sep=''))
> chart.Posn(Portfolio='SMA5D',Symbol=stock.str)
>
> out<-try(applyStrategy(strategy=stratSMA5D , portfolios=portfolio.st))
> Error in is.array(x) : 'x' is missing
>
>
> Many thanks for  your kind assistance.
> --
> 'Raghu'
>
>        [[alternative HTML version deleted]]
>
>
>
> ------------------------------
>
> _______________________________________________
> R-SIG-Finance mailing list
> R-SIG-Finance@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>
>
> End of R-SIG-Finance Digest, Vol 75, Issue 1
> ********************************************
>

	[[alternative HTML version deleted]]

