[R-SIG-Finance] fOptions American options Implied Volatility

2011-05-17 Thread msalese
Hi guys, working with RMetrics/fOptions library I see there isn't a function to compute iv on American Options so I've build this function to do the job: library(fOptions) impVolAmCall<-function(pmkPrice,Und,Strike,expTime,rInt,pb){ auxAmCall<-function(pVol,pmkPrice,pUnd,pStrike,pexpTime,prInt)

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] Universal Portfolios

2011-05-17 Thread des Mazis, Pierre-Alexandre
Hi everyone, Have you ever heard of any implementation in R of the theory developped by Thomas Cover regarding "Universal Portfolios"? Any help would be greatly appreciated. Thank you. Regards, Sent using BlackBerry® from Orange ___ R-SIG-Finance@r-p

[R-SIG-Finance] fOptions American options Implied Volatility

2011-05-17 Thread msalese
Thanks much David , the problem is that RMetrics/fOptions has only this valuation code: RollGeskeWhaleyOptionRoll, Geske and Whaley Approximation, BAWAmericanApproxOption Barone-Adesi and Whaley Approximation, BSAmericanApproxOption Bjerksund and Stensland Approximation. Onl

Re: [R-SIG-Finance] fOptions American options Implied Volatility

2011-05-17 Thread stefano iacus
On 17 May 2011, at 11:36, msalese wrote: > Hi guys, > working with RMetrics/fOptions library I see there isn't a function to > compute iv on American Options so I've build this function to do the job: > > library(fOptions) > > impVolAmCall<-function(pmkPrice,Und,Strike,expTime,rInt,pb){ > auxAm

Re: [R-SIG-Finance] Universal Portfolios

2011-05-17 Thread Marc Delvaux
Yes, I did start implementing a package that implements a number of log optimal portfolios (or closely related ideas). I did somehow stop of implementing all the algorithms I wanted to tackle, but Cover's algorithm is done. Because it was and remains not in perfect shape, I never advertised it on

[R-SIG-Finance] rolling regression estimate std. error / t value

2011-05-17 Thread Lu Fan
Dear all, The following codes is for a multi-factor rolling regression with rolling window = 60: > z<-read.table("C:/.../dataset.txt") > library(zoo) > mydata=zoo(z) > coef=rollapply(mydata,width=60,function(x) coef(lm(y~f1+f2+f3+f4+f5, data=as.data.frame(x))),by.column=FALSE,align="right") The

Re: [R-SIG-Finance] Universal Portfolios

2011-05-17 Thread des Mazis, Pierre-Alexandre
Hi thanks first. Brian, I was confused reading Cover's paper but your explanation with centers of gravity made me realise were i was wrong! Marc, I had a quick look on the site before you mentionned it but could not find any code. Will definitely try again tomorrow. If you have any recommandat

Re: [R-SIG-Finance] Universal Portfolios

2011-05-17 Thread Brian G. Peterson
To the list... -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. "Brian G. Peterson" wrote: You could construct an implementation in R using PortfolioAnalytics, but its not done for you. The universal portfolio concept is an interesting one, but I've never seen it as pra

Re: [R-SIG-Finance] rolling regression estimate std. error / t value

2011-05-17 Thread des Mazis, Pierre-Alexandre
Hi Lu Fan, I think you should change the FUN function in your rollapply to something that computes the coefficients and the stats you are interested in and returns the concatenation of the results using as.numeric format. Regards Sent using BlackBerry® from Orange -Original Message- Fr

Re: [R-SIG-Finance] rolling regression estimate std. error / t value

2011-05-17 Thread Lu Fan
Hi Des Mazis, Thank you for your reply. Yes, I am looking for that function too. I tried to use summary(lm(y~f1+f2+f3+f4+f5, data=as.data.frame(x)) instead of coef(lm(y~f1+f2+f3+f4+f5, data=as.data.frame(x)) , but unfortunately it didn't work. -Lu On Tue, May 17, 2011 at 4:04 PM, des Mazis, Pi

Re: [R-SIG-Finance] rolling regression estimate std. error / t value

2011-05-17 Thread des Mazis, Pierre-Alexandre
Lu Fan, You shoud write something like: fct_computeCoeffAndStats<-function(zooObject) { Reg_lm = lm(Y~X,data=...) Reg_coeff = Reg_lm$coefficients Tstat = summary(Reg_lm)$tstat #check names of the summary to find the right #"tstat" name to apply to summary() i think it is #Pr<... But i cant remem

Re: [R-SIG-Finance] rolling regression estimate std. error / t value

2011-05-17 Thread Lu Fan
Des Mazis, Thanks a lot. I appreciate your help. I will try it. -Lu On Tue, May 17, 2011 at 4:31 PM, des Mazis, Pierre-Alexandre < p.desma...@gmail.com> wrote: > Lu Fan, > > You shoud write something like: > > fct_computeCoeffAndStats<-function(zooObject) > { > Reg_lm = lm(Y~X,data=...) > Reg_c

Re: [R-SIG-Finance] rolling regression estimate std. error / t value

2011-05-17 Thread des Mazis, Pierre-Alexandre
That was for the structure of the code. The argument of the function "zooObject" is the data cut by rollapply function and is an array you might have to rename to make it work with lm and so on. If you still have question tomorrow i will be able to give you a more exact answer. Good luck Sent u

[R-SIG-Finance] Multivariate cointegration framework in R?

2011-05-17 Thread Jeff Yan
Hey everyone I was wondering if there is any library/framework in R that handles multivariate cointegration, like one-variate is handled. Thanks, Jeff The information contained in this electronic message is ...{{dropped:21}} ___ R-SIG-Finance@r-proj

Re: [R-SIG-Finance] Multivariate cointegration framework in R?

2011-05-17 Thread s
check out the 'ca.jo' function in the 'urca' package. HTH On 5/17/11 4:54 PM, Jeff Yan wrote: > Hey everyone > > > I was wondering if there is any library/framework in R that handles > multivariate cointegration, like one-variate is handled. > > Thanks, Jeff > > The information contained in this