[R-SIG-Finance] Imputing Missing Values

Frank frankm60606 at gmail.com
Sun Jun 26 15:09:39 CEST 2016


I use na.locf to replace NAs from FRED. I believe na.rm=TRUE means next
observation is carried backward: 


## Get DGS3MO Treasury yield from FRED

DGS3MO<-na.locf(DGS3MO/100.0,na.rm = TRUE)
file_name <- "DGS3MO.csv"
write.zoo(DGS3MO, file = file_name, append = FALSE, quote = TRUE, sep = ",")


Would you be so kind as to show what you are currently using to imply
yields? And what is your intended use for the implied daily/monthly data.


-----Original Message-----
From: R-SIG-Finance [mailto:r-sig-finance-bounces at r-project.org] On Behalf
Of Pankaj K Agarwal via R-SIG-Finance
Sent: Sunday, June 26, 2016 7:53 AM
To: R-sig-finance; R-Finance
Subject: [R-SIG-Finance] Imputing Missing Values

This might be a very basic query for this erudite group. However, i am
hopeful some help will be forthcoming nevertheless.I have a monthly time
series of annualized t-bill rates on Indian markets. For some months, the
values are missing randomly. I need to convert the annualized yields into
daily as well as monthly yields. I have two questions:1. I am using package
zoo. Which of the methods of NA imputations will be advisable for this
series, viz., na.agggregate, na.locf, na.spline or na.approx etc.?2. Should
the imputation be done on monthly annual yields and then the conversion to
daily and monthly yields be performed or imputation be done afterwards?3.
Are there better methods than above for this task?
I will be extremely grateful for comments. Thanks a ton. Regards,Pankaj
	[[alternative HTML version deleted]]

R-SIG-Finance at r-project.org mailing list
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions
should go.

More information about the R-SIG-Finance mailing list