Hi,
while in need of the seasonality described in the Lehmann/Kerkhoff Paper "Inflation Derivatives explained" i specialized the multiplicativepriceseasonality class. When overwriting the seasonal correction and the seasonalityFactor Methods i found that the seasonal factor obtained from seasonalityFactor() was not reproduced when i calculated the ratio of the adjusted forecasted fixing (obtained by calling setSeasonality("myseasonality") devided by the unadjusted value (obtained with setSeasonality() thus removing seasonality). But this is a basic requirement. I was able to track this down to a (seemingly) mismatch in the call to the index forecast method. Which is in intlationindex.cpp at line 186 (QL1.5). And the call to the seasonalCorrction() at inflationtermstructure.cpp at line 173. They use a different base for the zero rate sometimes. In my view it should never differ. So the quotient of adjusted index forecast/unadjusted index forecast is no longer what it should be. To make a long story short i would suggest either coying the behavior in the forecast so to always pass the same baseDate to the seasonality correction as the one used in forecasting the index. Or, if we keep the call to seasoaalityCorretion() as it is, that is we use a default, it seems to me a better default would be the first day of the inflation reference month. That would at least fit well in case of an uninterpolated HICP Index and an application of the kerhoff paper seasonality. Any Suggestions? ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hello, did you try the change already? May you send a patch I can apply? Thanks, Luigi On Mon, Jun 29, 2015 at 10:09 AM BL BL <[hidden email]> wrote: Hi, -- <http://leanpub.com/implementingquantlib/> ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi,
thanks for your answer. I will prepare a patch. For the moment i applied the change as a workaround in a new seasonality class. I did this to minimize changes to other parts of QL. I wanted to discuss it further. But the targeted change will be clear from the modification of the passed day in the derived class. the change worked for me. it hit the seasonality as expected. Bernd 2015-07-06 10:15 GMT+02:00, Luigi Ballabio <[hidden email]>: > Hello, > did you try the change already? May you send a patch I can apply? > > Thanks, > Luigi > > On Mon, Jun 29, 2015 at 10:09 AM BL BL <[hidden email]> wrote: > >> Hi, >> >> >> while in need of the seasonality described in the Lehmann/Kerkhoff >> Paper "Inflation Derivatives explained" i specialized the >> multiplicativepriceseasonality class. >> >> >> When overwriting the seasonal correction and the seasonalityFactor >> Methods i found that the seasonal factor obtained from >> seasonalityFactor() was not reproduced when i calculated the ratio of >> the adjusted forecasted fixing (obtained by calling >> setSeasonality("myseasonality") devided by the unadjusted value >> (obtained with setSeasonality() thus removing seasonality). >> >> >> But this is a basic requirement. I was able to track this down to a >> (seemingly) mismatch in the call to the index forecast method. Which >> is in intlationindex.cpp at line 186 (QL1.5). And the call to the >> seasonalCorrction() at inflationtermstructure.cpp at line 173. They >> use a different base for the zero rate sometimes. In my view it should >> never differ. >> >> >> So the quotient of adjusted index forecast/unadjusted index forecast >> is no longer what it should be. >> >> To make a long story short i would suggest either coying the behavior >> in the forecast so to always pass the same baseDate to the seasonality >> correction as the one used in forecasting the index. >> >> >> Or, if we keep the call to seasoaalityCorretion() as it is, that is we >> use a default, it seems to me a better default would be the first day >> of the inflation reference month. That would at least fit well in case >> of an uninterpolated HICP Index and an application of the kerhoff >> paper seasonality. >> >> >> Any Suggestions? >> >> >> ------------------------------------------------------------------------------ >> Monitor 25 network devices or servers for free with OpManager! >> OpManager is web-based network management software that monitors >> network devices and physical & virtual servers, alerts via email & sms >> for fault. Monitor 25 devices for free with no restriction. Download now >> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o >> _______________________________________________ >> QuantLib-users mailing list >> [hidden email] >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > -- > > <http://leanpub.com/implementingquantlib/> > <http://implementingquantlib.com> > <http://twitter.com/lballabio> > ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi Luigi, the patch file is attached.Please let me know if you have any trouble applying it. 2015-07-07 14:00 GMT+02:00 BL BL <[hidden email]>: Hi, ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users QuantLib-1.6.patch (49K) Download Attachment |
Thanks. On Wed, Jul 8, 2015 at 9:30 PM BL BL <[hidden email]> wrote:
-- <http://leanpub.com/implementingquantlib/> ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi Bernd, apologies, I only just managed to look at your patch. Would you prefer to keep the separate class (in which case we might need a more descriptive name...) or the idea would be to merge the change into MultiplicativePriceSeasonality, possibly with a switch between the two behaviors? Luigi On Thu, Jul 16, 2015 at 3:13 PM Luigi Ballabio <[hidden email]> wrote:
-- <http://leanpub.com/implementingquantlib/> ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi Luigi, thanks for coming back to this topic.2015-10-01 14:48 GMT+02:00 Luigi Ballabio <[hidden email]>:
------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Ok, thanks. I'll do that. On Fri, Oct 2, 2015 at 9:43 AM BL BL <[hidden email]> wrote:
-- <http://leanpub.com/implementingquantlib/> ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |