[R-SIG-Finance] Confidence Intervals

frednovo at pipeline.com frednovo at pipeline.com
Tue May 1 20:29:40 CEST 2007


Have you considered using bootstrap regression (see Efron and Tibshirani).  You consider a sample of regression models with bootstrapped data samples.  From that, you can construct confidence intervals on the parameters of interest.

Best regards,

Frederick Novomestky

-----Original Message-----
>From: Warren Loken <WLoken at clayton.com>
>Sent: May 1, 2007 1:26 PM
>To: r-sig-finance <r-sig-finance at stat.math.ethz.ch>
>Subject: [R-SIG-Finance] Confidence Intervals
>
>Anyone - 
>
>We have been working on a predictive default model for residential
>mortgages using the logistic regression functions in r.  We have had
>satisfactory results in finding predictive independent variables. We are
>now attempting to build confidence intervals.  We used the vcov function
>to obtain the variance and covariance coefficients.  Is there a function
>in r that will use the results of the vcov function that can be run
>against the data to obtain the covariance value?  We have numerous
>variables and are finding it difficult at best to accomplish outside of
>a program.
>
>Any help would be much appreciated
>
>Warren Loken
>Clayton Fixed Income Services
>1700 lincoln street, suite 1600
>denver, colorado 80203
>T: 720.947.6909
>F: 720.947.5181
>
>wloken at clayton.com
>
>
>-----Original Message-----
>From: r-sig-finance-bounces at stat.math.ethz.ch
>[mailto:r-sig-finance-bounces at stat.math.ethz.ch] On Behalf Of Paul
>DeBruicker
>Sent: Tuesday, May 01, 2007 9:18 AM
>To: r-sig-finance
>Subject: [R-SIG-Finance] Bloomberg bulk data download - example code
>
>Anyone -
>
>RBloomberg doesn't support downloading bulk data items from Bloomberg.
>I wanted to download the option chains and dividend histories for
>several equities.  I read the sources for RBloomberg to try to see if
>I could patch it, but stopped short because I was getting distracted
>from the goal of downloading the data.    Below is the code and some
>notes I used to download the information I wanted using WinXP and
>R-2.5.0.  I'm sure there are more robust ways, but this one met my
>needs.
>
>If you run the code below you should get an error returned for the
>option chain (OPT_CHAIN) for the Vanguard S&P 500 index fund (VFINX
>Equity) but everything else will return usable data.  Its my
>understanding that there are over 400 bulk download fields available,
>and I've only tested these functions with 10 of them.  You must have
>Bloomberg installed on the machine you run this code on.
>
>Paul
>
>
>
>
>
>
>
>
>library(RDCOMClient)
>c<-COMCreate("Bloomberg.Data.1") #open a COM connection
>
>secs<-c("VFINX Equity","INTC Equity")
>flds<-c("EQY_DVD_HIST_ALL","OPT_CHAIN")
>
># blpGetBulkData just calls the BlpSubscribe function
>
>blpGetBulkData<-function(connection=c,securities=secs,fields=flds){
>	dat<-connection$BlpSubscribe(Security=securities,Fields=fields)
>	return(dat)
>	}
>
>
>blpb.data<-blpGetBulkData(c,flds,secs)
>
># Bloomberg returns the data in a nested list (data.frame?). If there
>is an error from Bloomberg
># the data comes in as list(list("Error Message")) and if its
>successful the data
># comes in as list(list(list(DATA))) where DATA is comprised of any
>number of equal
># length lists.  The outer most list is for the fields, the second one
>in is for the securities
># the third one in is for each list of data.
>
>
># The blpBulkDataFormat function names the outer most list after the
>fields in the download
># and the next list in after the securities
>
>blpBulkDataFormat<-function(data=blpb.data,
>fields=flds,securities=secs){
>
>	names(data)<-fields
>	for (i in 1:length(flds)) names(data[[i]])<-sub("
>+",".",securities)
>	retval<-data
>	return(retval)
>}
>
>bdf<-blpBulkDataFormat(blpb.data,flds,secs)
>bdf
>
>_______________________________________________
>R-SIG-Finance at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>-- Subscriber-posting only. 
>-- If you want to post, subscribe first.
>IMPORTANT NOTICE:
>
>This message is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law.  If you have received this message in error, you are hereby notified that we do not consent to any reading, dissemination, distribution or copying of this message.  If you have received this communication in error, please notify the sender immediately and destroy the transmitted information.
>
>_______________________________________________
>R-SIG-Finance at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>-- Subscriber-posting only. 
>-- If you want to post, subscribe first.



More information about the R-SIG-Finance mailing list