date.hpp
Go to the documentation of this file.
1 /* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 
3 /*
4  Copyright (C) 2006, 2009, 2015 Ferdinando Ametrano
5  Copyright (C) 2015 Maddalena Zanzi
6 
7  This file is part of QuantLib, a free-software/open-source library
8  for financial quantitative analysts and developers - http://quantlib.org/
9 
10  QuantLib is free software: you can redistribute it and/or modify it
11  under the terms of the QuantLib license. You should have received a
12  copy of the license along with this program; if not, please email
13  <quantlib-dev@lists.sf.net>. The license is also available online at
14  <http://quantlib.org/license.shtml>.
15 
16  This program is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18  FOR A PARTICULAR PURPOSE. See the license for more details.
19 */
20 
21 #ifndef qla_date_hpp
22 #define qla_date_hpp
23 
24 #include <ql/time/frequency.hpp>
25 
26 #include <string>
27 #include <vector>
28 
29 namespace QuantLib {
30  class Period;
31  class Date;
32 }
33 
34 namespace QuantLibAddin {
35 
36  // to be removed using coercion
37  QuantLib::Period periodFromFrequency(QuantLib::Frequency f);
38 
39  // to be removed using coercion
40  QuantLib::Frequency frequencyFromPeriod(const QuantLib::Period& p);
41 
42  // it is not a dummy function!
43  // e.g. it returns "11M" when the input is "1Y-1M"
44  QuantLib::Period periodEquivalent(const QuantLib::Period& p);
45 
46  std::vector<QuantLib::Date> qlIMMNextDates(const QuantLib::Date& d,
47  const std::vector<bool>& mainCycle);
48 
49  std::vector<std::string> qlIMMNextCodes(const QuantLib::Date& d,
50  const std::vector<bool>& mainCycle);
51  std::vector<QuantLib::Date> qlASXNextDates(const QuantLib::Date& d,
52  const std::vector<bool>& mainCycle);
53 
54  std::vector<std::string> qlASXNextCodes(const QuantLib::Date& d,
55  const std::vector<bool>& mainCycle);
56  std::vector<QuantLib::Date> qlECBKnownDates();
57 }
58 
59 #endif
std::vector< QuantLib::Date > qlECBKnownDates()
QuantLib::Period periodEquivalent(const QuantLib::Period &p)
std::vector< std::string > qlASXNextCodes(const QuantLib::Date &d, const std::vector< bool > &mainCycle)
QuantLib::Frequency frequencyFromPeriod(const QuantLib::Period &p)
std::vector< QuantLib::Date > qlASXNextDates(const QuantLib::Date &d, const std::vector< bool > &mainCycle)
Definition: abcd.hpp:38
std::vector< QuantLib::Date > qlIMMNextDates(const QuantLib::Date &d, const std::vector< bool > &mainCycle)
Definition: abcd.hpp:30
QuantLib::Period periodFromFrequency(QuantLib::Frequency f)
std::vector< std::string > qlIMMNextCodes(const QuantLib::Date &d, const std::vector< bool > &mainCycle)