|
From: Simon I. <Sim...@fs...> - 2010-10-15 15:50:26
|
Hi All, I'm doing some work on path generation (Monte-Carlo) for the CIR process. I've written some code for generating random numbers for the Gamma distribution, the Chi-squared distribution and the Non-Central Chi-Squared distribution but I need to wrap these up into a path generator for CIR which can then be used for Monte-Carlo pricing. I can see some examples of random-sequence generators within the MonteCarlo framework. But I don't want to use the InverseCumulativeRsg as inverting the CIR distribution is really slow compared to sampling from the Non-Central Chi-Squared. So, I'm assuming that (to use the Monte Carlo framework) I need to create 1) A CIR sequence generator. 2) A RNG traits template class which enables the CIR sequence generator class. Is this correct? Or is there something that I've missed? Thanks, Simon -----Original Message----- From: Luigi Ballabio [mailto:lui...@gm...] Sent: 13 October 2010 15:34 To: Kamtsa Dragoslav Cc: qua...@li... Subject: Re: [Quantlib-users] Hull-White and CIR path generation On Sat, 2010-10-02 at 12:49 +1000, Kamtsa Dragoslav wrote: > I want to use the Hull White 1F and the CIR 1F implementations to > generate explicit short rate/intensity paths. Could someone please > point me to the relevant example or unit test to get me started, > especially for the latter? I'm afraid we're short on examples, but you might want to look in <ql/processes>, especially hullwhiteprocess.hpp. I don't remember exactly what paths are generated if you plug the processes there in a PathGenerator (short-rate, I guess, but I'm not certain) but at least it might give you an idea on how to implement a CIR process (which, I'm afraid, we don't have at this time.) Luigi -- When all else fails, pour a pint of Guinness in the gas tank, advance the spark 20 degrees, cry "God Save the Queen!", and pull the starter knob. -- MG "Series MGA" Workshop Manual ------------------------------------------------------------------------ ------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ QuantLib-users mailing list Qua...@li... https://lists.sourceforge.net/lists/listinfo/quantlib-users This communication and any attachments contains information which is confidential and may be subject to legal privilege. It is for intended recipients only. If you are not the intended recipient you must not copy, distribute, publish, rely on or otherwise use it without our consent. Some of our communications may contain confidential information which it could be a criminal offence for you to disclose or use without authority. If you have received this email in error please notify pos...@fs... immediately and delete the email from your computer. The FSA reserves the right to monitor all email communications for compliance with legal, regulatory and professional standards. This email is not intended to nor should it be taken to create any legal relations or contractual relationships. This email has originated from The Financial Services Authority (FSA) 25 The North Colonnade, Canary Wharf, London E14 5HS United Kingdom Registered as a Limited Company in England and Wales No.1920623. Registered Office as above Switchboard: 020 7066 1000 Web Site: http://www.fsa.gov.uk ***************************************************************** |