Re: [R-SIG-Finance] [SPAM] - Re: XTS with unique time stamps? - Email found in subject

2011-01-31 Thread David Reiner
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 [

Re: [R-SIG-Finance] [SPAM] - fOptions American options Implied Volatility - Email found in subject

2011-05-17 Thread David Reiner
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

[R-SIG-Finance] RBloomberg connection options

2011-09-22 Thread David Reiner
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

Re: [R-SIG-Finance] [SPAM] - Re: SMA & large n - Email found in subject

2011-09-27 Thread David Reiner
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:

Re: [R-SIG-Finance] RBloomberg connection options - Email found in subject

2011-09-28 Thread David Reiner
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

Re: [R-SIG-Finance] [SPAM] - Re: Skewness function for intraday data returndistribution - Email found in subject

2011-10-31 Thread David Reiner
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

Re: [R-SIG-Finance] [SPAM] - Monte Carlo simulation for VaR estimation - Email found in subject

2011-11-18 Thread David Reiner
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

Re: [R-SIG-Finance] Bloomberg login through R

2011-12-06 Thread David Reiner
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

Re: [R-SIG-Finance] [SPAM] - RBloomberg: Error in process.result(result, "first.column") - Email found in subject

2012-01-11 Thread David Reiner
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

Re: [R-SIG-Finance] [SPAM] - self-fulfilling prophecies in financial study - Email found in subject

2012-05-09 Thread David Reiner
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

Re: [R-SIG-Finance] [SPAM] - Re: 1 minute time interval in Bloomberg - Email found in subject

2012-05-14 Thread David Reiner
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

Re: [R-SIG-Finance] [SPAM] - Re: [SPAM] - Re: 1 minute time interval in Bloomberg - Email found in subject - Email found in subject

2012-05-14 Thread David Reiner
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

[R-SIG-Finance] getEndOfMonth and getEndOfBizWeek in RcppBDT broken?

2012-08-08 Thread David Reiner
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=

Re: [R-SIG-Finance] getEndOfMonth and getEndOfBizWeek in RcppBDT broken?

2012-08-08 Thread David Reiner
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

Re: [R-SIG-Finance] 4-digit SIC codes

2013-02-05 Thread David Reiner
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:

[R-SIG-Finance] Rbbg in R 3.0.0

2013-04-15 Thread David Reiner
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

Re: [R-SIG-Finance] Rbbg in R 3.0.0

2013-04-16 Thread David Reiner
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

Re: [R-SIG-Finance] [SPAM] - Rbbg(Bloomberg) time zone problem and xtsconstructor - Email found in subject

2013-05-21 Thread David Reiner
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

Re: [R-SIG-Finance] [SPAM] - Re: subset section of trading day from RBloombergbar download - Email found in subject

2013-07-25 Thread David Reiner
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

[R-SIG-Finance] Rbbg::bdp cannot return TIME type?

2013-08-09 Thread David Reiner
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.

Re: [R-SIG-Finance] [SPAM] - Pulling minute bar data with bar() function in Rbbg(RBloomberg) package in R - Email found in subject

2013-08-14 Thread David Reiner
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

Re: [R-SIG-Finance] Pulling minute bar data with bar() function in Rbbg(RBloomberg) package in R

2013-08-19 Thread David Reiner
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:

Re: [R-SIG-Finance] Aligning time series

2014-04-16 Thread David Reiner
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

Re: [R-SIG-Finance] selecting specific rows from an xts object

2014-12-15 Thread David Reiner
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