Jeff,
When you do extend it to remove duplicates, you might want to
give a choice whether to keep the first or last duplicated value.
I know I've used both for various reasons.
Thanks for such a great set of packages!
-- David
-Original Message-
From: r-sig-finance-boun...@r-project.org
[
Massimo,
This stock has dividends, so you might have to use a different valuation model
for American valuation.
Some sort of discrete dividend model should work.
HTH,
-- David
-Original Message-
From: r-sig-finance-boun...@r-project.org
[mailto:r-sig-finance-boun...@r-project.org] On Be
Thanks to Ana and John for this great package!
I am intrigued by the options shown in one example, but clueless as to how to
take advantage of them.
How do we set useUTCTime to FALSE ?
Here's the example that shows there is such an option:
> library(RBloomberg)
> conn <- blpConnect()
> conn$BOOL
I suppose an interface to Wikipedia might be possible?
http://en.wikipedia.org/wiki/377_%28number%29#370s
"377 = 13 × 29, Fibonacci number, sum of the squares of the first six primes."
Not directly in answer to your question, but I have found these sites very
useful for decimals and sequences:
d base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] zoo_1.7-3 RBloomberg_0.4-150 rJava_0.9-1
loaded via a namespace (and not attached):
[1] grid_2.13.1 lattice_0.19-31
-----Original Message-
From: John Laing [m
Pretty sure the first one is a typo - if the last power is 3/2, they match up.
HTH,
-- David
-Original Message-
From: r-sig-finance-boun...@r-project.org
[mailto:r-sig-finance-boun...@r-project.org] On Behalf Of Patrick Burns
Sent: Monday, October 31, 2011 3:10 AM
To: r-sig-finance@r-proj
I'm guessing that you would want to specify the correlation as given as you
have the volatilities,
hence use a covariance matrix in MASS::mvrnorm to generate your 'sh'.
That shuld get you started anyway.
Rolling your own with use of Cholesky is OK, too, of course, but others have
done lots of har
I have a windows task scheduled to run a script to login to Bloomberg at a time
before I need to get Bloomberg data.
I suppose you could run the script from within R if you prefer.
(I actually moved on to a C# program, but that is really off-topic.)
As John said, one seems to be able to get data w
Bloomberg allows going only so far in the past for intraday data
(50 trading days, I thought, although your query works for any date after
2001-09-11.)
HTH,
-- David
From: r-sig-finance-boun...@r-project.org
[mailto:r-sig-finance-boun...@r-project.org] On Behalf Of
scott.ly...@instinet.com
Sent
This book has some good examples:
An Engine, Not a Camera: How Financial Models Shape Markets
by Donald Mackenzie
-- David
-Original Message-
From: r-sig-finance-boun...@r-project.org
[mailto:r-sig-finance-boun...@r-project.org] On Behalf Of Wei-han Liu
Sent: Wednesday, May 09, 2012 7:02
My workaround would be similar to this, but the OP perhaps knows of the
optional arguments available in the Bloomberg API
that allow one to specify how empty periods should be treated (e.g., previous
value, nil.)
See pp. 115-116 in the API Version 3.x Developer's Guide (2041121.pdf).
It would be
t is
available through the Excel API. Go figure.
-- David
-Original Message-
From: r-sig-finance-boun...@r-project.org
[mailto:r-sig-finance-boun...@r-project.org] On Behalf Of David Reiner
Sent: Monday, May 14, 2012 2:11 PM
To: John Laing; krisan haria
Cc: r-sig-finance@r-project.org
At least on my setup, they don't seem to work:
> getEndOfBizWeek(date=as.Date('2012-09-05'))
[1] "2012-08-10"
> getEndOfMonth(date=as.Date('2012-09-05'))
[1] "2012-08-31"
> sessionInfo()
R version 2.15.1 Patched (2012-06-25 r59634)
Platform: x86_64-pc-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=
Thanks, Dirk. You're the best!
-- David
-Original Message-
From: Dirk Eddelbuettel [mailto:e...@debian.org]
Sent: Wednesday, August 08, 2012 1:02 PM
To: David Reiner
Cc: r-sig-finance@r-project.org; d...@eddelbuettel.com
Subject: Re: [R-SIG-Finance] getEndOfMonth and getEndOfBizWe
t attached):
[1] tools_2.15.2
Thanks,
-- David Reiner
-Original Message-
From: r-sig-finance-boun...@r-project.org
[mailto:r-sig-finance-boun...@r-project.org] On Behalf Of G See
Sent: Monday, February 04, 2013 9:30 PM
To: Bastian Offermann
Cc: r-sig-finance@r-project.org
Subject:
I tried Rbbg in R 3.0.0, but I'm getting a Java-related error I think.
Hints?
> install.packages("Rbbg", repos="http://r.findata.org/";, dependencies = TRUE)
trying URL 'http://r.findata.org/bin/windows/contrib/3.0/Rbbg_0.4-155.zip'
Content type 'application/zip' length 41069 bytes (40 Kb)
opened
27;s major for many of us!
-- David
From: John Laing [mailto:john.la...@gmail.com]
Sent: Tuesday, April 16, 2013 6:16 AM
To: George Wang
Cc: David Reiner; r-sig-finance@r-project.org
Subject: Re: [R-SIG-Finance] Rbbg in R 3.0.0
This isn't an installation problem. If the desktop API we
new<-xts(bid[,3:4],order.by=strptime(x=bid$time,format="%Y-%m-%dT%H:%M:%OS")-4*3600)
should work for you (until DST ends.)
Note that bid$time was already character. Always look to see what you are
getting back.
Also, it's considered polite to give the commands you used to get your results
so he
Actually, the "T", while part of the standard, has to be specified in the
format for as.POSIXct, or removed.
Then the xts command has to pass the core data and the index as POSIXct
separately:
ftse.xts <- xts(ftse_Bars[,-1], as.POSIXct(sub("T"," ",ftse_Bars[,1])))
Then the subsetting can be don
I was hoping to retrieve a field called "ACT_TIME_LAST_SETTLE_RECEIVED_RT",
but I got an error: "Error in convert.to.type(df.data, data_types) : unknown
type TIME"
Any chance of getting Rbbg extended to handle this type?
Or did I do something wrong? (I can got other fields OK.)
Thanks,
David L.
4-01T18:30:00.000 2013-04-01T18:30:00.000 801.155 801.330 799.550 799.750
1299 185598
HTH,
-- David Reiner
PS:
localToUTC <- function(x) {
if (class(x)[1] == "character") {
x <- as.POSIXct(x) # Assume strings are in the correct format
}
format(x, "%Y-%m-%d %H:%M:%OS3
h xts
object with your other xts object.
You'll get NA's where there's no data, and you can leave them or use locf from
zoo.
HTH,
-- David
-Original Message-
From: Alex Bennett [mailto:ppminer...@yahoo.com]
Sent: Wednesday, August 14, 2013 4:04 PM
To: David Reiner
Subject:
Definitely use xts !
For Question 2, I would merge all, leaving NA's for missing data.
Then what you do next depends on what you are trying to accomplish,
but sometimes LOCF can be appropriate,
for example if these are trades for less liquid instruments.
However, you may need to do some hard think
If you include the date, or use fractional seconds to create an interval, it
should work.
xts uses half open/half closed intervals so ["T09:30:00/T09:30:00"] is empty.
> (nobj <- xts(1:5, as.POSIXct('2014-12-15 09:30')+(-2):2))
[,1]
2014-12-15 09:29:581
2014-12-15 09:29:59
24 matches
Mail list logo