Displaying 2 results from an estimated 2 matches for "bondid".
Did you mean:
bonded
2012 Jul 11
1
do I need plyr, apply or something else?
Dear all,
This is what I'd like to do (I have an implementation using for loops, which I designed before I realised just how slow R is at executing them - this process currently takes days to run).
I have a large dataframe containing corporate bond data, columns are:
BondID
Date (goes back 5years)
Var1
Var2
Term2Maturity
What I want to do is this:
1) For each bond, at each given date, look back over 1 year and append some statistics to each row ( sd(Var1), cor(Var1,Var2) over that year etc)
a. It seems I might be able to use ddply for this, but I can'...
2015 Jul 11
1
User Input
...or 100-2 (2/64) or 100-2+ (5/128).?
Once passed these variables must have a steady state (in decimal). ?After reading the R documentation and Hadley's book I think the way to do this is via a class but I can quite get my head around how to do it. ?A nominal model is:
Analytics <- function(bondid = cusip, tradedate = trade.date, settledate = settle.date, price = 100.125){
BondAnalytics <- BondAnalytics(tradedate = tradedate, settledate = settledate, price = price)
New("BondAnalytics ...)
} ?
So, price is an input to a constructor function which calls other functions to create the c...