Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv2620/qlo
Added Files:
assetswap.cpp assetswap.hpp
Log Message:
--- NEW FILE: assetswap.cpp ---
/*
Copyright (C) 2006 Chiara Fornarola
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modify it under the
terms of the QuantLib license. You should have received a copy of the
license along with this program; if not, please email qua...@li...
The license is also available online at http://quantlib.org/html/license.html
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the license for more details.
*/
#if defined(HAVE_CONFIG_H)
#include <qlo/config.hpp>
#endif
#include <qlo/assetswap.hpp>
#include <ql/Instruments/assetswap.hpp>
namespace QuantLibAddin {
AssetSwap::AssetSwap(
bool payFixedRate,
QuantLib::Real nominal,
const boost::shared_ptr<QuantLib::Bond>& bond,
const QuantLib::Real bondCleanPrice,
const boost::shared_ptr<QuantLib::Schedule>& floatSchedule,
const boost::shared_ptr<QuantLib::Xibor>& index,
QuantLib::Spread spread,
const QuantLib::DayCounter& floatingDayCount,
const QuantLib::Handle<QuantLib::YieldTermStructure>& hYTS)
{
libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::AssetSwap(payFixedRate,
nominal,
bond,
bondCleanPrice,
*floatSchedule,
index,
spread,
floatingDayCount,
hYTS));
}
}
--- NEW FILE: assetswap.hpp ---
/*
Copyright (C) 2006 Chiara Fornarola
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modify it under the
terms of the QuantLib license. You should have received a copy of the
license along with this program; if not, please email qua...@li...
The license is also available online at http://quantlib.org/html/license.html
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the license for more details.
*/
#ifndef qla_asset_swap_hpp
#define qla_asset_swap_hpp
#include <qlo/swap.hpp>
namespace QuantLibAddin {
class AssetSwap : public Swap {
public:
AssetSwap(bool payFixedRate,
QuantLib::Real nominal,
const boost::shared_ptr<QuantLib::Bond>& bond,
const QuantLib::Real bondCleanPrice,
const boost::shared_ptr<QuantLib::Schedule>& floatSchedule,
const boost::shared_ptr<QuantLib::Xibor>& index,
QuantLib::Spread spread,
const QuantLib::DayCounter& floatingDayCount,
const QuantLib::Handle<QuantLib::YieldTermStructure>& hYTS);
std::vector<std::vector<boost::any> > fixedLeg() {
return Swap::legAnalysis(0);
}
std::vector<std::vector<boost::any> > floatingLeg() {
return Swap::legAnalysis(1);
}
};
}
#endif
|