I am looking for a framework for running MC simulations in finance and
I am trying to see if Quantlib fits the bill. I have download/installed/built Quantlib successfully, and am now trying to figure out what modifications I need to do in order to run simulations. As an example task, I have selected to try to model a mileage option. A mileage option is a European option with an expiry date ethe earlier of matuirty and T, where T is the date at which the mileage runs out. The mileage of an option is defined as sum_i=1^n ( (S_i-S_{i-1})/S_i )^2 (basically the realized variance) and, for a given mileage M, the option expires at the earlier of maturity and the first time T for which the sum exceeds M. At the time the option expires, the holder receives max(S-K,0), i.e. a plain European payoff. What derived classes would I need to define in order to model this? I have read and understood (cursorily) the EquityOption.cpp example code. Can someone show me how I would model a mileage option? Thanks, David ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
On Sun, 2007-06-10 at 13:32 +0300, David Klein wrote:
> I am looking for a framework for running MC simulations in finance and > I am trying to see if Quantlib fits the bill. I have > download/installed/built Quantlib successfully, and am now trying to > figure out what modifications I need to do in order to run > simulations. > > As an example task, I have selected to try to model a mileage option. > [...] > > What derived classes would I need to define in order to model this? Have a look at the MCEuropeanEngine class and how it interacts with the VanillaOption instrument. (The draft documentation at <http://luigi.ballabio.googlepages.com/qlbook> might help.) You'll have to define an option class, an engine class, and a path pricer. You can start cloning VanillaOption and MCEuropeanEngine and working your way in. You're welcome to post further questions if you get stuck. And of course, you're welcome to contribute your class if your employer doesn't object. Later, Luigi ---------------------------------------- Better to remain silent and be thought a fool than to speak out and remove all doubt. -- Abraham Lincoln ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |