1 /* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 
3 /*
4  Copyright (C) 2006 Ferdinando Ametrano
5  Copyright (C) 2006 Mario Pucci
6  Copyright (C) 2006 StatPro Italia srl
7  Copyright (C) 2015 Peter Caspers
8  Copyright (C) 2019 Klaus Spanderen
9 
10  This file is part of QuantLib, a free-software/open-source library
11  for financial quantitative analysts and developers - http://quantlib.org/
12 
13  QuantLib is free software: you can redistribute it and/or modify it
14  under the terms of the QuantLib license.  You should have received a
15  copy of the license along with this program; if not, please email
16  <quantlib-dev@lists.sf.net>. The license is also available online at
17  <http://quantlib.org/license.shtml>.
18 
19  This program is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
21  FOR A PARTICULAR PURPOSE.  See the license for more details.
22 */
23 
24 /*! \file sabr.hpp
25     \brief SABR functions
26 */
27 
28 #ifndef quantlib_sabr_hpp
29 #define quantlib_sabr_hpp
30 
31 #include <ql/types.hpp>
32 
33 namespace QuantLib {
34 
35     Real unsafeSabrVolatility(Rate strike,
36                               Rate forward,
37                               Time expiryTime,
38                               Real alpha,
39                               Real beta,
40                               Real nu,
41                               Real rho);
42 
43     Real unsafeShiftedSabrVolatility(Rate strike,
44                               Rate forward,
45                               Time expiryTime,
46                               Real alpha,
47                               Real beta,
48                               Real nu,
49                               Real rho,
50                               Real shift);
51 
52     Real sabrVolatility(Rate strike,
53                         Rate forward,
54                         Time expiryTime,
55                         Real alpha,
56                         Real beta,
57                         Real nu,
58                         Real rho);
59 
60     Real shiftedSabrVolatility(Rate strike,
61                                  Rate forward,
62                                  Time expiryTime,
63                                  Real alpha,
64                                  Real beta,
65                                  Real nu,
66                                  Real rho,
67                                  Real shift);
68 
69     Real sabrFlochKennedyVolatility(Rate strike,
70                                     Rate forward,
71                                     Time expiryTime,
72                                     Real alpha,
73                                     Real beta,
74                                     Real nu,
75                                     Real rho);
76 
77     void validateSabrParameters(Real alpha,
78                                 Real beta,
79                                 Real nu,
80                                 Real rho);
81 }
82 
83 #endif
84