QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
historicalratesanalysis.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2007 Ferdinando Ametrano
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
24#ifndef quantlib_historical_rates_analysis_hpp
25#define quantlib_historical_rates_analysis_hpp
26
27#include <ql/math/statistics/sequencestatistics.hpp>
28#include <ql/time/date.hpp>
29
30namespace QuantLib {
31
32 class InterestRateIndex;
33
35 SequenceStatistics& statistics,
36 std::vector<Date>& skippedDates,
37 std::vector<std::string>& skippedDatesErrorMessage,
38 const Date& startDate,
39 const Date& endDate,
40 const Period& step,
41 const std::vector<ext::shared_ptr<InterestRateIndex> >& indexes);
42
45 public:
46 HistoricalRatesAnalysis(ext::shared_ptr<SequenceStatistics> stats,
47 const Date& startDate,
48 const Date& endDate,
49 const Period& step,
50 const std::vector<ext::shared_ptr<InterestRateIndex> >& indexes);
51 const std::vector<Date>& skippedDates() const;
52 const std::vector<std::string>& skippedDatesErrorMessage() const;
53 const ext::shared_ptr<SequenceStatistics>& stats() const;
54 private:
55 // calculated data
56 ext::shared_ptr<SequenceStatistics> stats_;
57 std::vector<Date> skippedDates_;
58 std::vector<std::string> skippedDatesErrorMessage_;
59 };
60
61 // inline
62
63 inline const std::vector<Date>&
65 return skippedDates_;
66 }
67
68 inline const std::vector<std::string>&
71 }
72
73 inline const ext::shared_ptr<SequenceStatistics>&
75 return stats_;
76 }
77
78}
79
80#endif
Concrete date class.
Definition: date.hpp:125
Historical rate analysis class
const ext::shared_ptr< SequenceStatistics > & stats() const
const std::vector< std::string > & skippedDatesErrorMessage() const
const std::vector< Date > & skippedDates() const
ext::shared_ptr< SequenceStatistics > stats_
std::vector< std::string > skippedDatesErrorMessage_
Definition: any.hpp:35
GenericSequenceStatistics< Statistics > SequenceStatistics
default multi-dimensional statistics tool
void historicalRatesAnalysis(SequenceStatistics &statistics, std::vector< Date > &skippedDates, std::vector< std::string > &skippedDatesErrorMessage, const Date &startDate, const Date &endDate, const Period &step, const std::vector< ext::shared_ptr< InterestRateIndex > > &indexes)