Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

BermudanOption.h

Go to the documentation of this file.
00001 /* WARANTY NOTICE AND COPYRIGHT
00002 This program is free software; you can redistribute it and/or
00003 modify it under the terms of the GNU General Public License
00004 as published by the Free Software Foundation; either version 2
00005 of the License, or (at your option) any later version.
00006 
00007 This program is distributed in the hope that it will be useful,
00008 but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 GNU General Public License for more details.
00011 
00012 You should have received a copy of the GNU General Public License
00013 along with this program; if not, write to the Free Software
00014 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00015 
00016 Copyright (C) Michael J. Meyer
00017 spyqqqdia@yahoo.com
00018 
00019 */
00020 
00021 
00022  
00023  
00024 #ifndef martingale_bermudanoption_h    
00025 #define martingale_bermudanoption_h
00026 
00027 #include "Option.h"
00028 #include "Trigger.h"
00029                 
00030 
00031 
00032 MTGL_BEGIN_NAMESPACE(Martingale)
00033 
00034 // dependencies
00035 class LiborMarketModel;
00036 class StandardBrownianNode;
00037 class LmmLattice; 
00038 
00039 
00040 
00041 
00042 
00050 /*******************************************************************************
00051  *
00052  *                     BERMUDAN SWAPTION
00053  *
00054  ******************************************************************************/
00055  
00056 
00063 class BermudanSwaption : public LiborDerivative {
00064    
00065         int  p,q;                // initial swap period [T_p,T_q]
00066         int nPath;               // number of training paths for the exercise trigger
00067     Real kappa;              // strike rate
00068         
00069         PjTrigger trigger;       // the exercise trigger
00070         friend class PjTrigger;
00071                      
00072 public:
00073 
00075 Real getStrike(){ return kappa; }
00076 
00078 bool isExercisable(Real t);
00079 
00080 // CONSTRUCTOR
00081 
00089 BermudanSwaption
00090 (int p_, int q_, int paths, Real strike, LiborMarketModel* lmm, bool verbose=false);
00091         
00092 
00102 static BermudanSwaption* sample
00103 (int p, int q, int paths, 
00104  bool verbose=false,
00105  int lmmType = 0,    // LiborMarketModel::DL, we use literals to avoid includes 
00106  int volType = 2,    // VolSurface::CONST
00107  int corrType =1     // Correlations::CS
00108 );
00109         
00110          
00111     
00112 // FORWARD TRANSPORTED PAYOFF AND CONTROL VARIATE
00113 
00114                     
00117 Real nextForwardPayoff();
00118 
00122 Real currentForwardPayoff(int s);
00123 
00128 Real forwardPayoff(StandardBrownianNode* node, LmmLattice* theLattice, int s);
00129   
00131 std::ostream& printSelf(std::ostream& os) const;
00132 
00133 }; // end swaption
00134 
00135 
00136 
00137 MTGL_END_NAMESPACE(Martingale)
00138 
00139 #endif

Generated on Mon Sep 22 02:16:32 2003 for Libor-Library by doxygen1.3-rc3