Hi Eric and all,
1.) After successfully constructing a term structure object, a call to qlParRate() failed with a log message of "at least two times are required". Can you please explain what this error message means? 2.) Looking up the parameters to this function it is stated as: qlParRate(curveobj,tenor,startdate,freq,extrapolate,trigger) I am wondering the financially correct values for these params. My guess is: tenor=year fraction from spot date startdate=spot date freq=any compounding within the period extrapolate=calculate extrapolation I have tried different combination of tenor but what I have experienced was if tenor is bigger than certain value (1 in my case) QuantlibXL will actually crash Excel. In any case no par rate can be correctly calculated. Can you please help to look into that as per attached? Regards, Wilkie __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com qlParRate.xls (78K) Download Attachment |
Hi Wilkie,
The tenor is not a year fraction but an integer offset in years from the start date. This is why you get an error when specifying a value less than one for this parameter. Integral values >= 1 are valid but the application crashes because of a bug, the fix has been applied in CVS: http://quantlib.cvs.sourceforge.net/quantlib/QuantLib/ql/yieldtermstructure.hpp?r1=1.5&r2=1.6 To fix your 0.3.13 copy of the app you'd need to apply the above patch to the source and recompile. Many thanks for pointing this out. Kind Regards, Eric On 9/25/06, Wilkie Lai <[hidden email]> wrote: > Hi Eric and all, > 1.) After successfully constructing a term structure > object, a call to qlParRate() failed with a log > message of "at least two times are required". Can you > please explain what this error message means? > 2.) Looking up the parameters to this function it is > stated as: > qlParRate(curveobj,tenor,startdate,freq,extrapolate,trigger) > I am wondering the financially correct values for > these params. My guess is: > tenor=year fraction from spot date > startdate=spot date > freq=any compounding within the period > extrapolate=calculate extrapolation > > I have tried different combination of tenor but what I > have experienced was if tenor is bigger than certain > value (1 in my case) QuantlibXL will actually crash > Excel. In any case no par rate can be correctly > calculated. Can you please help to look into that as > per attached? > > Regards, > Wilkie > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users > > > > |
Hi Eric,
I am not sure if I got what you've said right. Tenor is "an integer offset in years" so value less than 1 is invalid. When I look at par rate I am expecting a value in the term structure that corresponds to the convention(compounding, source etc.) of that portion of the curve, and it can be under 1 year. Take the simplest case to obtain an interpolated value of a 5 month rate by interpolating using market 3M and 6M rate, I would expect qlParRate() to be able to produce such result and these tenors are all under 1 year. Am I missing the whole idea about qlParRate(), or there are more to the meaning of "tenor in years" that you can help to explain? Much appreciate your advice. Also it would be useful if you can explain what the log message "at least two times are required" as occurred in the original question. Thanks. Regards, Wilkie --- eric ehlers <[hidden email]> wrote: > Hi Wilkie, > > The tenor is not a year fraction but an integer > offset in years from > the start date. This is why you get an error when > specifying a value > less than one for this parameter. Integral values > >= 1 are valid but > the application crashes because of a bug, the fix > has been applied in > CVS: > > > > To fix your 0.3.13 copy of the app you'd need to > apply the above patch > to the source and recompile. > > Many thanks for pointing this out. > > Kind Regards, > Eric > > On 9/25/06, Wilkie Lai <[hidden email]> > wrote: > > Hi Eric and all, > > 1.) After successfully constructing a term > structure > > object, a call to qlParRate() failed with a log > > message of "at least two times are required". Can > you > > please explain what this error message means? > > 2.) Looking up the parameters to this function it > is > > stated as: > > > > > I am wondering the financially correct values for > > these params. My guess is: > > tenor=year fraction from spot date > > startdate=spot date > > freq=any compounding within the period > > extrapolate=calculate extrapolation > > > > I have tried different combination of tenor but > what I > > have experienced was if tenor is bigger than > certain > > value (1 in my case) QuantlibXL will actually > crash > > Excel. In any case no par rate can be correctly > > calculated. Can you please help to look into that > as > > per attached? > > > > Regards, > > Wilkie > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > > > > > > Take Surveys. Earn Cash. Influence the Future of > IT > > Join SourceForge.net's Techsay panel and you'll > get the chance to share your > > opinions on IT & business topics through brief > surveys -- and earn cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > _______________________________________________ > > QuantLib-users mailing list > > [hidden email] > > > https://lists.sourceforge.net/lists/listinfo/quantlib-users > > > > > > > > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
Hi all
parRate are just a quick way to calculate swap rate from the yield curve. It's called parRate to enforce the fact that is NOT calculated taking into account all market conventions. As you probably know you can describe a yield curve using discount factors, forward rate, zero rate, or par rate, so QuantLib do provide a way to calculate all these quantities from a given YieldTermStructure If you bootstrap a curve using e.g. the 5Y swap rate, and then ask the parRate with tenor 5 (and the correct swap start date) you will get back a rate very near (not equal to) to the 5Y swap rate ciao -- Nando On 9/27/06, Wilkie Lai <[hidden email]> wrote: > Hi Eric, > I am not sure if I got what you've said right. Tenor > is "an integer offset in years" so value less than 1 > is invalid. > When I look at par rate I am expecting a value in the > term structure that corresponds to the > convention(compounding, source etc.) of that portion > of the curve, and it can be under 1 year. Take the > simplest case to obtain an interpolated value of a 5 > month rate by interpolating using market 3M and 6M > rate, I would expect qlParRate() to be able to produce > such result and these tenors are all under 1 year. > > Am I missing the whole idea about qlParRate(), or > there are more to the meaning of "tenor in years" that > you can help to explain? Much appreciate your advice. > Also it would be useful if you can explain what the > log message "at least two times are required" as > occurred in the original question. Thanks. > > Regards, > Wilkie > > --- eric ehlers <[hidden email]> wrote: > > > Hi Wilkie, > > > > The tenor is not a year fraction but an integer > > offset in years from > > the start date. This is why you get an error when > > specifying a value > > less than one for this parameter. Integral values > > >= 1 are valid but > > the application crashes because of a bug, the fix > > has been applied in > > CVS: > > > > > http://quantlib.cvs.sourceforge.net/quantlib/QuantLib/ql/yieldtermstructure.hpp?r1=1.5&r2=1.6 > > > > To fix your 0.3.13 copy of the app you'd need to > > apply the above patch > > to the source and recompile. > > > > Many thanks for pointing this out. > > > > Kind Regards, > > Eric > > > > On 9/25/06, Wilkie Lai <[hidden email]> > > wrote: > > > Hi Eric and all, > > > 1.) After successfully constructing a term > > structure > > > object, a call to qlParRate() failed with a log > > > message of "at least two times are required". Can > > you > > > please explain what this error message means? > > > 2.) Looking up the parameters to this function it > > is > > > stated as: > > > > > > qlParRate(curveobj,tenor,startdate,freq,extrapolate,trigger) > > > I am wondering the financially correct values for > > > these params. My guess is: > > > tenor=year fraction from spot date > > > startdate=spot date > > > freq=any compounding within the period > > > extrapolate=calculate extrapolation > > > > > > I have tried different combination of tenor but > > what I > > > have experienced was if tenor is bigger than > > certain > > > value (1 in my case) QuantlibXL will actually > > crash > > > Excel. In any case no par rate can be correctly > > > calculated. Can you please help to look into that > > as > > > per attached? > > > > > > Regards, > > > Wilkie > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Tired of spam? Yahoo! Mail has the best spam > > protection around > > > http://mail.yahoo.com > > > > > > > > > ------------------------------------------------------------------------- > > > Take Surveys. Earn Cash. Influence the Future of > > IT > > > Join SourceForge.net's Techsay panel and you'll > > get the chance to share your > > > opinions on IT & business topics through brief > > surveys -- and earn cash > > > > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > > > _______________________________________________ > > > QuantLib-users mailing list > > > [hidden email] > > > > > > https://lists.sourceforge.net/lists/listinfo/quantlib-users > > > > > > > > > > > > > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
There is a potential problem with the variance calculation for stochastic process. For instance in the ornsteinuhlenbeckprocess.cpp Real OrnsteinUhlenbeckProcess::variance(Time, Real, Time dt) const{ return 0.5*volatility_*volatility_/speed_*(1.0 - std::exp(-2.0*speed_*dt); } Since the value of the speed_ (the mean reversion rate) is quite volatile, it even can be very close to zero (say 1.0e-15), it is potentially cause problem in the calculation. Thanks, Guowen ________________________________________________________ DTCC DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify us immediately and delete the email and any attachments from your system. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. |
On Fri, 2006-09-29 at 10:31 -0400, Guowen Han wrote:
> > There is a potential problem with the variance calculation for > stochastic process. For instance in the ornsteinuhlenbeckprocess.cpp > > Real OrnsteinUhlenbeckProcess::variance(Time, Real, Time dt) const{ > return 0.5*volatility_*volatility_/speed_*(1.0 - > std::exp(-2.0*speed_*dt); > } This is now fixed, thanks. Did you find any other problems? Luigi ---------------------------------------- Steinbach's Guideline for Systems Programming: Never test for an error condition you don't know how to handle. |
Hi Luigi, I checked also the hullwhiteprocess.cpp, there are some functions have the mean reversion rate (a) on the denominator, all processes have the similar functions might have to be changed as well. Thanks, Guowen
On Fri, 2006-09-29 at 10:31 -0400, Guowen Han wrote: > > There is a potential problem with the variance calculation for > stochastic process. For instance in the ornsteinuhlenbeckprocess.cpp > > Real OrnsteinUhlenbeckProcess::variance(Time, Real, Time dt) const{ > return 0.5*volatility_*volatility_/speed_*(1.0 - > std::exp(-2.0*speed_*dt); > } This is now fixed, thanks. Did you find any other problems? Luigi ---------------------------------------- Steinbach's Guideline for Systems Programming: Never test for an error condition you don't know how to handle. ________________________________________________________ DTCC DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify us immediately and delete the email and any attachments from your system. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. |
Free forum by Nabble | Edit this page |